Building 5.2 on Ubuntu 16.10 : FAILED - libcurl is not used when linking scm

Discussions related to using the OSE version of VirtualBox.

Building 5.2 on Ubuntu 16.10 : FAILED - libcurl is not used when linking scm

Postby Gigi75 » 11. Apr 2018, 19:59

When building 5.2.8 on Ubuntu 16.10 with ;
Code: Select all   Expand viewCollapse view
./configure --disable-hardening -d
source env.sh
kmk BUILD_TYPE=debug
....
kBuild: Linking tstRTBase64
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_easy_getinfo@CURL_OPENSSL_3 »
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_slist_free_all@CURL_OPENSSL_3 »
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_easy_setopt@CURL_OPENSSL_3 »
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_easy_perform@CURL_OPENSSL_3 »
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_slist_append@CURL_OPENSSL_3 »
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_easy_cleanup@CURL_OPENSSL_3 »
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_global_init@CURL_OPENSSL_3 »
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_easy_init@CURL_OPENSSL_3 »
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_easy_reset@CURL_OPENSSL_3 »
/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so : référence indéfinie vers « curl_global_cleanup@CURL_OPENSSL_3 »
collect2: error: ld returned 1 exit status
kmk: *** [/home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scm] Error 1
The failing command:
@g++  -g             '-Wl,-rpath,$(VBOX_ORIGIN)/..' '-Wl,-rpath,$(VBOX_ORIGIN)'  -Wl,-z,noexecstack,-z,relro -Wl,--as-needed -Wl,-z,origin -m64   -o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scm /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scm.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmdiff.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmrw.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmparser.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmstream.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmsubversion.o     /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so   -lpthread   -lm   -lrt   -ldl

and other errors that look the same (no -lcurl on command line)
....
Code: Select all   Expand viewCollapse view
> locate libcurl.so
/usr/lib/x86_64-linux-gnu/libcurl.so
/usr/lib/x86_64-linux-gnu/libcurl.so.3
/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0
/usr/local/lib/libcurl.so
/usr/local/lib/libcurl.so.4
/usr/local/lib/libcurl.so.4.5.0

When I manually add -lcurl at the end of the command line ;
Code: Select all   Expand viewCollapse view
g++  -g             '-Wl,-rpath,$(VBOX_ORIGIN)/..' '-Wl,-rpath,$(VBOX_ORIGIN)'  -Wl,-z,noexecstack,-z,relro -Wl,--as-needed -Wl,-z,origin -m64   -o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scm /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scm.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmdiff.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmrw.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmparser.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmstream.o /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/obj/scm/scmsubversion.o     /home/gigi/VirtualBox-5.2.8/out/linux.amd64/debug/bin/VBoxRT.so   -lpthread   -lm   -lrt   -ldl -lcurl

scm.o is well generated...
The problem is that I cannot figure out how the build system works... and so I cannot commit the change on the good Makefile.kmk or .dep
If I then try to resume the kmk build, the system build delete scm.o scm.o.dep and so on... and the build failed.

How to modify the Makefile.kmk or .dep files (or other files) probably in src directory in order to fix it?
I tried for three days without success, any help will be appreciated!

Thanks.
Last edited by socratis on 11. Apr 2018, 21:33, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
Gigi75
 
Posts: 1
Joined: 11. Apr 2018, 19:17

Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 3 guests