Discussion:
[vbox-dev] virtialBox-4.3.14 wont compile on 64-bit linux amd64cpu
lux-integ
2014-07-24 15:18:37 UTC
Permalink
Greetings,

I am attempting to build VirtualBox-4.3.14 on a machine with these:-
--CPU: AMD64 3 cores
--OS- pure 64bit DLFS linux, gcc-4.8.1,glibc-2.17, qt-4.8.5, linux-3.14.13,
dev86

I trust I have all the prequisites installed.

I run configure successfully then
running 'kmk all ends like so:-

########
kBuild: Linking VBoxExtPackHelperApp
kBuild: Linking tstRTAssertCompile
kBuild: Linking tstRTAvl
/home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so: undefined reference to
`crypt_r at GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
kmk: ***
[/home/linteg/OUTvbox/linux.amd64/release/obj/VBoxExtPackHelperApp/VBoxExtPackHelperApp]
Error 1
The failing command:
@g++ '-Wl,-rpath,/opt/VirtualBox' -Wl,-z,noexecstack -Wl,--as-
needed -m64 -o
/home/linteg/OUTvbox/linux.amd64/release/obj/VBoxExtPackHelperApp/VBoxExtPackHelperApp
/home/linteg/OUTvbox/linux.amd64/release/obj/VBoxExtPackHelperApp/src-helper-
apps/VBoxExtPackHelperApp.o
/home/linteg/OUTvbox/linux.amd64/release/obj/VBoxExtPackHelperApp/src-
all/ExtPackUtil.o /home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so
kmk: *** Waiting for unfinished jobs....
/home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so: undefined reference to
`crypt_r at GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
kmk: *** [/home/linteg/OUTvbox/linux.amd64/release/obj/tstRTAvl/tstRTAvl]
Error 1
The failing command:
@g++ '-Wl,-rpath,/opt/VirtualBox' '-Wl,-rpath,/opt/VirtualBox'
-Wl,-z,noexecstack -Wl,--as-needed -m64 -o
/home/linteg/OUTvbox/linux.amd64/release/obj/tstRTAvl/tstRTAvl
/home/linteg/OUTvbox/linux.amd64/release/obj/tstRTAvl/tstRTAvl.o
/home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so -lpthread -lm -
lrt -ldl
kmk: *** Exiting with status 2

#########
I am compiling as a normal user not root. Curiously I have compiled it with
the same instructions months ago on similar distribution. It is unclear if I
am missing something now.



Help would be appreciated


sincerely
luxInteg
Sérgio Basto
2014-07-24 18:51:16 UTC
Permalink
Post by lux-integ
Greetings,
I am attempting to build VirtualBox-4.3.14 on a machine with these:-
--CPU: AMD64 3 cores
--OS- pure 64bit DLFS linux, gcc-4.8.1,glibc-2.17, qt-4.8.5, linux-3.14.13,
dev86
I trust I have all the prequisites installed.
I run configure successfully then
running 'kmk all ends like so:-
########
kBuild: Linking VBoxExtPackHelperApp
kBuild: Linking tstRTAssertCompile
kBuild: Linking tstRTAvl
/home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so: undefined reference to
`crypt_r at GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
kmk: ***
[/home/linteg/OUTvbox/linux.amd64/release/obj/VBoxExtPackHelperApp/VBoxExtPackHelperApp]
Error 1
@g++ '-Wl,-rpath,/opt/VirtualBox' -Wl,-z,noexecstack -Wl,--as-
needed -m64 -o
/home/linteg/OUTvbox/linux.amd64/release/obj/VBoxExtPackHelperApp/VBoxExtPackHelperApp
/home/linteg/OUTvbox/linux.amd64/release/obj/VBoxExtPackHelperApp/src-helper-
apps/VBoxExtPackHelperApp.o
/home/linteg/OUTvbox/linux.amd64/release/obj/VBoxExtPackHelperApp/src-
all/ExtPackUtil.o /home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so
kmk: *** Waiting for unfinished jobs....
/home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so: undefined reference to
`crypt_r at GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
kmk: *** [/home/linteg/OUTvbox/linux.amd64/release/obj/tstRTAvl/tstRTAvl]
Error 1
@g++ '-Wl,-rpath,/opt/VirtualBox' '-Wl,-rpath,/opt/VirtualBox'
-Wl,-z,noexecstack -Wl,--as-needed -m64 -o
/home/linteg/OUTvbox/linux.amd64/release/obj/tstRTAvl/tstRTAvl
/home/linteg/OUTvbox/linux.amd64/release/obj/tstRTAvl/tstRTAvl.o
/home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so -lpthread -lm -
lrt -ldl
kmk: *** Exiting with status 2
#########
I am compiling as a normal user not root. Curiously I have compiled it with
the same instructions months ago on similar distribution. It is unclear if I
am missing something now.
Help would be appreciated
I think I had a similar issue. I patch Makefile with

--- ./src/VBox/Storage/testcase/Makefile.kmk.libcxx 2013-10-15
12:13:42.000000000 +0100
+++ ./src/VBox/Storage/testcase/Makefile.kmk 2013-10-28
03:38:30.036141172 +0000
@@ -113,7 +113,7 @@ if defined(VBOX_WITH_TESTCASES) || defin
$(SDK_VBOX_ZLIB_LIBS)
endif
ifeq ($(KBUILD_TARGET),linux)
- vbox-img_LIBS += crypt
+ vbox-img_LIBS += crypto
ifdef SDK_VBOX_LIBXML2_LIBS
vbox-img_LIBS += xml2
endif
--
S?rgio M. B.
lux-integ
2014-07-25 08:25:35 UTC
Permalink
Post by Sérgio Basto
I think I had a similar issue. I patch Makefile with
--- ./src/VBox/Storage/testcase/Makefile.kmk.libcxx 2013-10-15
12:13:42.000000000 +0100
+++ ./src/VBox/Storage/testcase/Makefile.kmk 2013-10-28
03:38:30.036141172 +0000
@@ -113,7 +113,7 @@ if defined(VBOX_WITH_TESTCASES) || defin
$(SDK_VBOX_ZLIB_LIBS)
endif
ifeq ($(KBUILD_TARGET),linux)
- vbox-img_LIBS += crypt
+ vbox-img_LIBS += crypto
ifdef SDK_VBOX_LIBXML2_LIBS
vbox-img_LIBS += xml2
endif
thanks for your help. I applied the patch and it was not rejected but the
result was the same. I got the dreaded

/OUTvbox/linux.amd64/release/bin/VBoxRT.so -lpthread -lm -
lrt -ldl
kmk: *** Exiting with status 2


Curiously I compiled version 4.3.8 months ago without these errors. (and
even 4.3.8 is giving the same linker errors now) Mysetup is pure 64bit
(non-multilib) and I am wondering if the linker errors are due to the
absense of /usr/lib/lib32 mentioned here:-


https://www.virtualbox.org/wiki/Linux build instructions

Special tweaks for 64 bit binaries
Building on a 64bit host still requires 32bit libraries and build tools as the
Guest Additions which are part of the build process are 32bit. Note that on
64bit Ubuntu systems some links to shared libraries are missing. This can be
fixed with
ln -s libX11.so.6 /usr/lib32/libX11.so
ln -s libXTrap.so.6 /usr/lib32/libXTrap.so
ln -s libXt.so.6 /usr/lib32/libXt.so
ln -s libXtst.so.6 /usr/lib32/libXtst.so
ln -s libXmu.so.6 /usr/lib32/libXmu.so
ln -s libXext.so.6 /usr/lib32/libXext.so


################


Sincerely
luxInteg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140725/17f47016/attachment.html
Sérgio Basto
2014-07-25 15:59:22 UTC
Permalink
This post might be inappropriate. Click to display it.
lux-integ
2014-07-26 06:53:29 UTC
Permalink
Post by Sérgio Basto
is your libcrypt updated , you have to find what kmk fails and change
libcrypt to libcrypto , I think
If I pass nothing to configure relating to openssl no errors relating to
openssl are generated but running kmk generates the the dreaded :-
#####################
kBuild: Linking tstRTAvl
/home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so: undefined reference to
`crypt_r at GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
kmk: ***
##############

I have openssl-1.0.1h installed in /usr/local. so I passed
--with-openssl-dir=/usr/local to configure and it failed with
" openssl not found in /usr/local/include /usr/local/lib/libssl.a,
/usr/local/lib/libcrypto.a or headers not fould

I looked at the configue script and noted some of the ENVARS that point to
libraries and headers needed for the build.
I edited the configure script with these
LIBCRYPTO="-L/usr/local/lib -lcrypto -lssl"
INCCRYPTO="/usr/local/include/openssl"


on running configure it again responded with openssl not found
lux-integ
2014-07-26 13:42:52 UTC
Permalink
Post by lux-integ
#####################
kBuild: Linking tstRTAvl
/home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so: undefined reference
to `crypt_r at GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
kmk: ***
#############
I fixed the problem I had a link named libcrypt to another program
erroneously named libcryptXX somewhere in the filesystem
Klaus Espenlaub
2014-07-28 10:02:47 UTC
Permalink
Hi,
Post by lux-integ
Post by lux-integ
#####################
kBuild: Linking tstRTAvl
/home/linteg/OUTvbox/linux.amd64/release/bin/VBoxRT.so: undefined reference
to `crypt_r at GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
kmk: ***
#############
I fixed the problem I had a link named libcrypt to another program
erroneously named libcryptXX somewhere in the filesystem
Was about to point out that crypt_r is NOT related to openssl at all,
it's extended libc functionality, not libcrypto/libssl.

Good that you sorted this out as a system specific library misconfig.

Klaus

Loading...