dmd with shared lib

Dejan Lekic via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 26 03:59:44 PDT 2014


bioinfornatics wrote:

> Hi, after building and installing dmd i fail to use generated
> executable because they are an undefined symbol.
> 
> 
> $ /opt/dmd/bin/dmd -L-lcurl testDelegate.d
> 
> $ ./testDelegate
> ./testDelegate: symbol lookup error:
> /opt/dmd/lib/libphobos2.so.0.66: undefined symbol:
> curl_version_info
> 
> $ ldd ./testDelegate
> linux-vdso.so.1 =>  (0x00007fff2d4e8000)
> libcurl.so.4 => /opt/dmd/lib/libcurl.so.4 (0x00007f82fd060000)
> libdl.so.2 => /lib64/libdl.so.2 (0x00007f82fce58000)
> libphobos2.so.0.66 => /opt/dmd/lib/libphobos2.so.0.66
> (0x00007f82fc810000)
> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f82fc5f0000)
> libm.so.6 => /lib64/libm.so.6 (0x00007f82fc2e8000)
> librt.so.1 => /lib64/librt.so.1 (0x00007f82fc0e0000)
> libc.so.6 => /lib64/libc.so.6 (0x00007f82fbd20000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f82fd288000)
> 
> given executable is link with libcurl provided by dmd
> 
> when i look into these curl lib they are any curl_version_info
> symbol
> 
> # readelf -Ws /opt/dmd/lib/libcurl.so.4 | grep curl_version_info
> 
> # readelf -Ws /opt/dmd/lib/libcurl_stub.so | grep
> curl_version_info
> 
> while this symbol exist on libcurl provided by my fedora
> 
> #  readelf -Ws /usr/lib64/libcurl.so.4| grep curl_version_info
>        346: 0000000000023f20   140 FUNC    GLOBAL DEFAULT   11
> curl_version_info

You are probably using DMD provided @ dlang.org... That one has issues 
(curl) on Fedora. DMD built with my SPEC from 
https://www.gitorious.org/dejan-fedora/dejan-fedora does not have these 
problems as far as I know.

-- 
http://dejan.lekic.org


More information about the Digitalmars-d-learn mailing list