dlang / dub

Package and build management system for D
MIT License
678 stars 227 forks source link

dub build failure with the latest dmd, missing dl* #691

Closed Passw closed 9 years ago

Passw commented 9 years ago
sun@sun:~/dub$ ./build.sh
Generating version file...
Running dmd...
source/dub/internal/vibecompat/core/file.d(20): Deprecation: module std.stream is deprecated - It will be removed from Phobos in October 2016. If you still need it, go to https://github.com/DigitalMars/undeaD
source/dub/internal/sdlang/lexer.d(16): Deprecation: module std.stream is deprecated - It will be removed from Phobos in October 2016. If you still need it, go to https://github.com/DigitalMars/undeaD
/home/sun/INSTALL/dmd/include/d2/std/range/package.d(945): Deprecation: function std.algorithm.iteration.splitter!("a == b", string, string).splitter.Result.back is deprecated - splitter!(Range, Range) cannot be iterated backwards (due to separator overlap).
/home/sun/INSTALL/dmd/include/d2/std/range/package.d(955): Deprecation: function std.algorithm.iteration.splitter!("a == b", string, string).splitter.Result.popBack is deprecated - splitter!(Range, Range) cannot be iterated backwards (due to separator overlap).
source/dub/internal/sdlang/lexer.d-mixin-1260(1260): Deprecation: constructor std.datetime.SysTime.this is deprecated - Please use the overload which takes a Duration instead of a FracSec.
source/dub/internal/sdlang/lexer.d-mixin-1268(1268): Deprecation: constructor std.datetime.SysTime.this is deprecated - Please use the overload which takes a Duration instead of a FracSec.
/home/sun/INSTALL/dmd/lib/libphobos2.a(curl.o): In function `_D3std3net4curl7CurlAPI21_sharedStaticDtor1581FZv':
std/net/curl.d:(.text._D3std3net4curl7CurlAPI21_sharedStaticDtor1581FZv+0x1f): undefined reference to `dlclose'
/home/sun/INSTALL/dmd/lib/libphobos2.a(curl_1a6e_27a.o): In function `_D3std3net4curl7CurlAPI7loadAPIFZPv':
std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0x1c): undefined reference to `dlopen'
std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0x2b): undefined reference to `dlsym'
std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0x3c): undefined reference to `dlclose'
std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0x7d): undefined reference to `dlopen'
std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0xcf): undefined reference to `dlsym'
std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0x10f): undefined reference to `dlsym'
std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0x145): undefined reference to `dlsym'
std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0x17b): undefined reference to `dlsym'
std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0x1b1): undefined reference to `dlsym'
/home/sun/INSTALL/dmd/lib/libphobos2.a(curl_1a6e_27a.o):std/net/curl.d:(.text._D3std3net4curl7CurlAPI7loadAPIFZPv+0x1e7): more undefined references to `dlsym' follow
collect2: error: ld returned 1 exit status
--- errorlevel 1
sun@sun:~/dub$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu Wily Werewolf (development branch)
Release:        15.10
Codename:       wily
sun@sun:~/dub$ uname -a
Linux sun 4.2.0-10-generic #12-Ubuntu SMP Tue Sep 15 19:43:01 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
sun@sun:~/dub$
sun@sun:~/dub$ dmd --version
DMD64 D Compiler v2.069-devel-37f53da
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright
sun@sun:~/dub$
Passw commented 9 years ago

Workaround for this, by add -ldl

sun@sun:~/dub$ git diff build.sh
diff --git a/build.sh b/build.sh
index 3ce8c2c..b820a59 100755
--- a/build.sh
+++ b/build.sh
@@ -22,7 +22,7 @@ LIBS=`pkg-config --libs libcurl 2>/dev/null || echo "-lcurl"`
 # fix for modern GCC versions with --as-needed by default
 if [ "$DMD" = "dmd" ]; then
        if [ `uname` = "Linux" ]; then
-               LIBS="-l:libphobos2.a $LIBS"
+               LIBS="-l:libphobos2.a $LIBS -ldl"
        else
                LIBS="-lphobos2 $LIBS"
        fi
s-ludwig commented 9 years ago

Duplicate of #660.