Re: Call for tester: VirtualBox 3.1.2 for FreeBSD

From: James R. Van Artsdalen <james-freebsd-current_at_jrv.org>
Date: Mon, 04 Jan 2010 02:15:09 -0600
John Baldwin wrote:
>> I'm seeing this as well:
>>
>> kernel: link_elf_obj: symbol _Z6strlenPKc undefined
>>
>> ...which, I suppose, is the real kldload error message.
>
> Looks like it is trying to use a C++ named-version of strlen():
>
> % echo _Z6strlenPKc | c++filt
> strlen(char const*)
>
> Is the kernel module compiled using c++ instead of cc? 

Here is where the symbol is coming from:

[root_at_xwin /usr/ports/emulators/virtualbox-ose-additions]# find . -name
\*.o | while read X; do nm "$X" | grep _Z6strlenPKc && echo $X; done
                 U _Z6strlenPKc
./work/VirtualBox-3.1.2_OSE/out/freebsd.amd64/release/obj/RuntimeGuestR0/common/misc/thread.o
                 U _Z6strlenPKc
./work/VirtualBox-3.1.2_OSE/out/freebsd.amd64/release/obj/RuntimeGuestR0/common/log/log.o
                 U _Z6strlenPKc
./work/VirtualBox-3.1.2_OSE/out/freebsd.amd64/release/obj/RuntimeGuestR0/common/path/RTPathAbsEx.o
                 U _Z6strlenPKc
./work/VirtualBox-3.1.2_OSE/out/freebsd.amd64/release/obj/RuntimeGuestR0/common/path/RTPathAppend.o
                 U _Z6strlenPKc
./work/VirtualBox-3.1.2_OSE/out/freebsd.amd64/release/obj/RuntimeGuestR0/common/string/strformattype.o
                 U _Z6strlenPKc
./work/VirtualBox-3.1.2_OSE/out/freebsd.amd64/release/obj/RuntimeGuestR0/common/string/string.o
[root_at_xwin /usr/ports/emulators/virtualbox-ose-additions]#

And here are some presumed source files:

[root_at_xwin /usr/ports/emulators/virtualbox-ose-additions]# find . -name
thread.c\*
./work/VirtualBox-3.1.2_OSE/src/VBox/Runtime/common/misc/thread.cpp
./work/VirtualBox-3.1.2_OSE/src/VBox/Additions/x11/VBoxClient/thread.cpp
./work/VirtualBox-3.1.2_OSE/src/libs/xpcom18a4/nsprpub/pr/src/cplus/tests/thread.cpp
[root_at_xwin /usr/ports/emulators/virtualbox-ose-additions]#

src/VBox/Runtime/common/misc/thread.cpp contains:

#include <iprt/string.h>

include/iprt/string.h has this:

#elif defined(RT_OS_FREEBSD) && defined(_KERNEL)
# include <sys/libkern.h>

It seems sys/libkern.h is C namespace but thread.cpp or iprt/string.h
isn't using extern "C" to make it that.
Received on Mon Jan 04 2010 - 07:15:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:59 UTC