VBoxNetFlt linking error in VBox 3.0.2 OSE

Discussions related to using the OSE version of VirtualBox.
Post Reply
Rankin
Posts: 50
Joined: 25. May 2009, 18:24
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: Linux Debian Lenny

VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by Rankin »

Hello,
I'm trying to build the last version of VBox OSE but I encounter a problem close from the end of compilation with the VBoxNetFlt driver for Windows.

Here is the error :

Code: Select all

kBuild: Linking VBoxNetFlt
   Création de la bibliothèque D:/zBuild/VirtualBox-3.0.2_OSE/out/win.x86/release/obj/VBoxNetFlt/VBoxNetFlt.lib et de l'objet D:/zBuild/VirtualBox-3.0.2_OSE/out/win.x86/release/obj/VBoxNetFlt/VBoxNetFlt.exp
VBoxNetFlt-win.obj : error LNK2019: symbole externe non résolu __alloca_probe_16 référencé dans la fonction _vboxNetFltWinPtInitBind@12
D:/zBuild/VirtualBox-3.0.2_OSE/out/win.x86/release/obj/VBoxNetFlt/VBoxNetFlt.sys : fatal error LNK1120: 1 externes non résolus
kmk.exe[2]: *** [D:/zBuild/VirtualBox-3.0.2_OSE/out/win.x86/release/obj/VBoxNetFlt/VBoxNetFlt.sys] Error 1120
The failing command:
@ D:/UTILIT~1/PROGRA~1/MICROS~3/VC/bin/link.exe -nologo -machine:x86                           -Driver -Subsystem:NATIVE -Incremental:NO -Align:64 -MapInfo:Exports -NoD -Debug    -Entry:DriverEntry@8  /OUT:D:/zBuild/VirtualBox-3.0.2_OSE/out/win.x86/release/obj/VBoxNetFlt/VBoxNetFlt.sys /MAPINFO:EXPORTS /INCREMENTAL:NO /MAP:D:/zBuild/VirtualBox-3.0.2_OSE/out/win.x86/release/obj/VBoxNetFlt/VBoxNetFlt.map    /LIBPATH:D:/WINDDK/3790~1.183/lib/wnet/i386 D:\\zBuild\\VirtualBox-3.0.2_OSE\\out\\win.x86\\release\\obj\\VBoxNetFlt\\VBoxNetFlt.obj D:\\zBuild\\VirtualBox-3.0.2_OSE\\out\\win.x86\\release\\obj\\VBoxNetFlt\\win\\VBoxNetFlt-win.obj D:\\zBuild\\VirtualBox-3.0.2_OSE\\out\\win.x86\\release\\obj\\VBoxNetFlt\\win\\VBoxNetFltPt-win.obj D:\\zBuild\\VirtualBox-3.0.2_OSE\\out\\win.x86\\release\\obj\\VBoxNetFlt\\win\\VBoxNetFlt-win.res D:\\zBuild\\VirtualBox-3.0.2_OSE\\out\\win.x86\\release\\obj\\VBoxNetFlt\\win\\VBoxNetFltMp-win.obj    D:\\WINDDK\\3790~1.183\\lib\\wnet\\i386\\ntoskrnl.lib D:\\WINDDK\\3790~1.183\\lib\\wnet\\i386\\hal.lib D:\\WINDDK\\3790~1.183\\lib\\wnet\\i386\\ndis.lib D:\\zBuild\\VirtualBox-3.0.2_OSE\\out\\win.x86\\release\\lib\\RuntimeR0Drv.lib  D:\\zBuild\\VirtualBox-3.0.2_OSE\\out\\win.x86\\release\\lib\\SUPR0IdcClient.lib                           
kmk.exe[2]: *** [D:/zBuild/VirtualBox-3.0.2_OSE/out/win.x86/release/obj/VBoxNetFlt/VBoxNetFlt.sys] Deleting file `D:/zBuild/VirtualBox-3.0.2_OSE/out/win.x86/release/obj/VBoxNetFlt/VBoxNetFlt.map'
kmk.exe[2]: Leaving directory `D:/zBuild/VirtualBox-3.0.2_OSE'
kmk.exe[1]: *** [pass_binaries_this] Error 2
kmk.exe[1]: Leaving directory `D:/zBuild/VirtualBox-3.0.2_OSE'
kmk: *** [pass_binaries_order] Error 2
It seems to be a linking error with an unresolved extern symbol (__alloca_probe_16 in _vboxNetFltWinPtInitBind@12 function).
Before to post my config files, I'd like to know if this problem has been encountered with others than me (and if they managed to fix it).

Thanks !
Rankin
Posts: 50
Joined: 25. May 2009, 18:24
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: Linux Debian Lenny

Re: VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by Rankin »

Any idea ?
aspirefhaha
Posts: 2
Joined: 24. Jul 2009, 04:21
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: MS Windows

Re: VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by aspirefhaha »

I got the same error ,how to solve?
garlik
Posts: 6
Joined: 24. Jul 2009, 15:08
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: win, linux

Re: VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by garlik »

the same error here :(
any solution?
garlik
Posts: 6
Joined: 24. Jul 2009, 15:08
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: win, linux

Re: VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by garlik »

aspirefhaha
Posts: 2
Joined: 24. Jul 2009, 04:21
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: MS Windows

Re: VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by aspirefhaha »

I read the solution is
Re: [vbox-dev] Unable to compile OSE 3.0.2 win32: VBoxNetFlt, __alloca_probe_16
Mikhail Sennikovsky
Mon, 13 Jul 2009 05:52:51 -0700

Not sure why alloca is not available for you, anyway I'll make a fix to aviod alloca and make it available with the OSE soon

I reported the same issue. I had to modifiy alloca() to ExAllocatePool(), pls see attached diff, wonder if can check in the fix to SVN.
i haven't got the diff file,anybody could tell more details,i am a newbie ,thanks
my email:aspirevirtualbox@gmail.com
garlik
Posts: 6
Joined: 24. Jul 2009, 15:08
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: win, linux

Re: VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by garlik »

the diff file is there just under the message.
you can use this link to it: http://www.mail-archive.com/vbox-dev@vi ... t-win.diff
here's its content:

Code: Select all

--- C:/Users/huisinro/AppData/Local/Temp/VBoxNetFlt-win.c-revBASE.svn000.tmp.c	Sat Jul 11 07:07:18 2009
+++ C:/virtualbox-dev/vbox/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.c	Wed Jul  8 13:00:50 2009
@@ -2184,7 +2184,7 @@
         int rc;
         PVBOXNETFLTINS pInstance;
         USHORT cbAnsiName = pBindToMiniportName->Length;/* the lenght is is bytes ; *2 ;RtlUnicodeStringToAnsiSize(pBindToMiniportName)*/
-        char* pAnsiName = alloca(cbAnsiName);
+        char* pAnsiName = ExAllocatePool(NonPagedPool, cbAnsiName); //alloca(cbAnsiName);
         CREATE_INSTANCE_CONTEXT Context;
         RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
 
@@ -2204,13 +2204,14 @@
         Assert(KeGetCurrentIrql() == PASSIVE_LEVEL);
 
         Status = RtlUnicodeStringToAnsiString(&AnsiString, pBindToMiniportName, false);
-
+		
         if(Status != STATUS_SUCCESS)
         {
             break;
         }
 
         rc = vboxNetFltSearchCreateInstance(&g_VBoxNetFltGlobals, pAnsiName, &pInstance, &Context);
+		ExFreePool(pAnsiName);
         if(RT_FAILURE(rc))
         {
         	Assert(0);
Rankin
Posts: 50
Joined: 25. May 2009, 18:24
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: Linux Debian Lenny

Re: VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by Rankin »

Thanks for the diff ! The build is working now. But I got a problem with the comregister command : zlib1.dll file is missing, and if I copy the one from tools\win.x86\bin\, it tells me that the "ordinal 73" is missing in the library...
Where can I find a correct version of this file ?
garlik
Posts: 6
Joined: 24. Jul 2009, 15:08
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: win, linux

Re: VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by garlik »

Rankin wrote:Thanks for the diff ! The build is working now. But I got a problem with the comregister command : zlib1.dll file is missing, and if I copy the one from tools\win.x86\bin\, it tells me that the "ordinal 73" is missing in the library...
Where can I find a correct version of this file ?
I got similar problem. Check the libcurl library you are using, there should be some information about which zlib1.dll version to use. In my I copied libcurl.dll from distribution I downloaded and there was a readme file with link to zlib1.dll that should be used with given libcurl version.
Hope it will help you.
Rankin
Posts: 50
Joined: 25. May 2009, 18:24
Primary OS: MS Windows XP
VBox Version: OSE self-compiled
Guest OSses: Linux Debian Lenny

Re: VBoxNetFlt linking error in VBox 3.0.2 OSE

Post by Rankin »

Thanks for your help ! I give the link written in the libcurl readme file if it can help others :
http://gnuwin32.sourceforge.net/packages/zlib.htm
Post Reply