Ticket #3919 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

FreeBSD: Linking VBoxSDLHardened undefined reference to `RTStrPrintf' => fixed in svn

Reported by: decke Owned by:
Component: other Version: VirtualBox 2.2.2
Keywords: FreeBSD VBoxSDLHardened Cc:
Guest type: other Host type: other


Linking VBoxSDLHardened fails on FreeBSD because of an undefined reference to `RTStrPrintf' from src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp:88

kBuild: Linking tstInt
kBuild: Linking tstLow
kBuild: Linking tstPin
kBuild: Linking tstGIP-2
kBuild: Linking tstGetPagingMode
kBuild: Linking tstShflSizes
kBuild: Linking tstShflCase
kBuild: Linking tstGuestPropSvc
kBuild: Linking VBoxManage
kBuild: Linking VBoxSDLHardened
/usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox/work/virtualbox-2.2.1r19283/out/freebsd.amd64/release/lib/SUPR3HardenedStatic.a(SUPLib-freebsd.o)(.text+0x65): In function `kBuild: Linking tstSDL
/usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox/work/virtualbox-2.2.1r19283/src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp:88: undefined reference to `RTStrPrintf'
kmk[2]: *** [/usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox/work/virtualbox-2.2.1r19283/out/freebsd.amd64/release/obj/VBoxSDLHardened/VBoxSDL] Error 1
The failing command:
@g++                  -m64   -o /usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox/work/virtualbox-2.2.1r19283/out/freebsd.amd64/release/obj/VBoxSDLHardened/VBoxSDL /usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox/work/virtualbox-2.2.1r19283/out/freebsd.amd64/release/obj/VBoxSDLHardened/VBoxSDLHardened.o   -L/usr/lib  -L/usr/local/lib   /usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox/work/virtualbox-2.2.1r19283/out/freebsd.amd64/release/lib/SUPR3HardenedStatic.a   -lpthread 
kmk[2]: *** Waiting for unfinished jobs....
kmk[2]: Leaving directory `/usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox/work/virtualbox-2.2.1r19283'
kmk[2]: Entering directory `/usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox/work/virtualbox-2.2.1r19283'
kmk[2]: *** Exiting with status 2
kmk[1]: *** [pass_binaries_this] Error 2
kmk[1]: Leaving directory `/usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox/work/virtualbox-2.2.1r19283'
kmk: *** [pass_binaries_order] Error 2
*** Error code 2

Stop in /usr/home/decke/.workspace/blueports/blueports/emulators/virtualbox.

Change History

comment:1 Changed 11 years ago by aeichner

Can you try if passing --disable-hardening to configure and rebuilding works? I didn't tested hardened builds so far because it makes debugging much more difficult.

comment:2 Changed 11 years ago by frank

Alexander, the problem is indeed related to hardening. Neither RTStrPrintf() nor any other Runtime function must not be used at this place as this piece of software is used in the SUID root stub as well and we don't have the Runtime available at this point.

comment:3 Changed 11 years ago by aeichner

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from FreeBSD: Linking VBoxSDLHardened undefined reference to `RTStrPrintf' to FreeBSD: Linking VBoxSDLHardened undefined reference to `RTStrPrintf' => fixed in svn

Fixed in svn. Replaced RTStrPrintf with snprintf. VirtualBox builds now with the hardened option. The fix should appear in the public svn soon.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use