RejectedSoftware Forums

Sign up

Installing DUB on OpenSuse

I recently tried to install DUB on OpenSuse 12.2, but ran into problems with it linking with libcurl and was hoping to get some help on getting DUB up on running.

My first attempt was to download the dub binary from the RS website. When I attempted to run dub I get the following error:

dub: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

However, libcurl is right there in /usr/lib64 (which is in the linker path according to /etc/ld.so.conf):

/usr/lib64$ ls -l libcurl*

lrwxrwxrwx 1 root root 27 Aug 7 14:05 libcurl-gnutls.so.4 -> /usr/lib64/libcurl.so.4.2.0
lrwxrwxrwx 1 root root 16 Jul 9 05:00 libcurl.so -> libcurl.so.4.2.0
lrwxrwxrwx 1 root root 16 Jul 9 05:00 libcurl.so.4 -> libcurl.so.4.2.0
-rwxr-xr-x 1 root root 406656 Jun 25 06:23 libcurl.so.4.2.0

When that failed I tried downloading DUB from gitHub and building it locally. At first it complained about
not being able to find libcurl-gnutls.so.4, so I created the symlink above since this library is not available in
openSuse.

After I generated the libcurl-gnutls.so.4 I get the following errors:

./build.sh
Generating version file...
Running dmd...
/usr/lib64/libphobos2.so: undefined reference to curl_global_init@CURL_GNUTLS_3'<br>/usr/lib64/libphobos2.so: undefined reference to curleasycleanup@CURLGNUTLS3'
/usr/lib64/libphobos2.so: undefined reference to curl_slist_append@CURL_GNUTLS_3'<br>/usr/lib64/libphobos2.so: undefined reference to curleasyinit@CURLGNUTLS3'
/usr/lib64/libphobos2.so: undefined reference to curl_easy_pause@CURL_GNUTLS_3'<br>/usr/lib64/libphobos2.so: undefined reference to curlslistfreeall@CURLGNUTLS3'<br>/usr/lib64/libphobos2.so: undefined reference to `curleasyduphandle@CURLGNUTLS3'<br>/usr/lib64/libphobos2.so: undefined reference to `curleasystrerror@CURLGNUTLS3'<br>/usr/lib64/libphobos2.so: undefined reference to `curleasyperform@CURLGNUTLS3'<br>/usr/lib64/libphobos2.so: undefined reference to `curlglobalcleanup@CURLGNUTLS3'<br>/usr/lib64/libphobos2.so: undefined reference to `curleasysetopt@CURLGNUTLS_3'
collect2: error: ld returned 1 exit status

Not sure if the following information will be helpful, but just in case:

/usr/lib64$ objdump -fp libphobos2.so

libphobos2.so: file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000150:
HASSYMS, DYNAMIC, DPAGED
start address 0x00000000001aa600

Program Header:

LOAD off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**21
     filesz 0x00000000002db984 memsz 0x00000000002db984 flags r-x
LOAD off    0x00000000002dbeb0 vaddr 0x00000000004dbeb0 paddr 0x00000000004dbeb0 align 2**21
     filesz 0x000000000005e978 memsz 0x0000000000060dd8 flags rw-

DYNAMIC off 0x00000000002dd730 vaddr 0x00000000004dd730 paddr 0x00000000004dd730 align 2**3

 filesz 0x00000000000001f0 memsz 0x00000000000001f0 flags rw-

NOTE off 0x0000000000000200 vaddr 0x0000000000000200 paddr 0x0000000000000200 align 2**2

 filesz 0x0000000000000024 memsz 0x0000000000000024 flags r--

TLS off 0x00000000002dbeb0 vaddr 0x00000000004dbeb0 paddr 0x00000000004dbeb0 align 2**4

 filesz 0x0000000000001040 memsz 0x00000000000010f0 flags r--

EH_FRAME off 0x00000000002da8b8 vaddr 0x00000000002da8b8 paddr 0x00000000002da8b8 align 2**2

 filesz 0x0000000000000374 memsz 0x0000000000000374 flags r--

STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3

 filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-

RELRO off 0x00000000002dbeb0 vaddr 0x00000000004dbeb0 paddr 0x00000000004dbeb0 align 2**0

 filesz 0x0000000000004150 memsz 0x0000000000004150 flags r--

Dynamic Section:
NEEDED libcurl-gnutls.so.4
NEEDED libpthread.so.0
NEEDED libm.so.6
NEEDED librt.so.1
NEEDED libc.so.6
NEEDED ld-linux-x86-64.so.2
SONAME libphobos2.so.0.2
INIT 0x000000000019a468
FINI 0x00000000002a2fd8
GNU_HASH 0x0000000000000228
STRTAB 0x0000000000053e48
SYMTAB 0x00000000000147a0
STRSZ 0x00000000000d4052
SYMENT 0x0000000000000018
PLTGOT 0x00000000004dffe8
PLTRELSZ 0x0000000000018228
PLTREL 0x0000000000000007
JMPREL 0x0000000000182240
RELA 0x000000000012d418
RELASZ 0x0000000000054e28
RELAENT 0x0000000000000018
TEXTREL 0x0000000000000000
VERNEED 0x000000000012d328
VERNEEDNUM 0x0000000000000006
VERSYM 0x0000000000127e9a
RELACOUNT 0x0000000000001556

Version References:
required from librt.so.1:

0x09691a75 0x00 09 GLIBC_2.2.5

required from ld-linux-x86-64.so.2:

0x0d696913 0x00 08 GLIBC_2.3

required from libcurl-gnutls.so.4:

0x0b103d23 0x00 07 CURL_GNUTLS_3

required from libm.so.6:

0x09691a75 0x00 05 GLIBC_2.2.5

required from libpthread.so.0:

0x09691972 0x00 04 GLIBC_2.3.2
0x09691a75 0x00 03 GLIBC_2.2.5

required from libc.so.6:

0x0d696918 0x00 10 GLIBC_2.8
0x09691974 0x00 06 GLIBC_2.3.4
0x09691a75 0x00 02 GLIBC_2.2.5

Note, my DMD version: DMD64 D Compiler v2.063.2

Any ideas on what I should do next to try and fix this.

Re: Installing DUB on OpenSuse

On Wed, 07 Aug 2013 16:36:31 GMT, Craig Dillabaugh wrote:

I recently tried to install DUB on OpenSuse 12.2, but ran into problems with it linking with libcurl and was hoping to get some help on getting DUB up on running.

My first attempt was to download the dub binary from the RS website. When I attempted to run dub I get the following error:

dub: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

However, libcurl is right there in /usr/lib64 (which is in the linker path according to /etc/ld.so.conf):

/usr/lib64$ ls -l libcurl*

clip

Any ideas on what I should do next to try and fix this.

Well I still haven't been able to build DUB from source, but I have solved my problem of getting a working copy of DUB, so I figured I should report back.

I had downloaded the 32bit version of DUB on my 64-bit OpenSuse install, which is undoubtedly why I had linking issues. I downloaded the proper binary ( dub-0.9.17-linux-x86_64.tar.gz ) and now everything works perfectly.

On the positive side, since I haven't had any replies, I hopefully haven't wasted too many peoples time.

Cheers,
Craig

Re: Installing DUB on OpenSuse

Am 08.08.2013 19:42, schrieb Craig Dillabaugh:

On Wed, 07 Aug 2013 16:36:31 GMT, Craig Dillabaugh wrote:

I recently tried to install DUB on OpenSuse 12.2, but ran into problems with it linking with libcurl and was hoping to get some help on getting DUB up on running.

My first attempt was to download the dub binary from the RS website. When I attempted to run dub I get the following error:

dub: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

However, libcurl is right there in /usr/lib64 (which is in the linker path according to /etc/ld.so.conf):

/usr/lib64$ ls -l libcurl*

clip

Any ideas on what I should do next to try and fix this.

Well I still haven't been able to build DUB from source, but I have solved my problem of getting a working copy of DUB, so I figured I should report back.

I had downloaded the 32bit version of DUB on my 64-bit OpenSuse install, which is undoubtedly why I had linking issues. I downloaded the proper binary ( dub-0.9.17-linux-x86_64.tar.gz ) and now everything works perfectly.

On the positive side, since I haven't had any replies, I hopefully haven't wasted too many peoples time.

Cheers,
Craig

I can't say what exactly goes wrong there, but one possible thing to try
would be to replace the $LIBS variable in build.sh:34 with
"-defaultlib=libphobos2.so" to link against the shared library version
of Phobos, which should already be linked against libcurl. I'll set up a
SuSE VM at some point, but that will have to wait a little.

Re: Installing DUB on OpenSuse

On Sun, 11 Aug 2013 11:03:26 +0200, Sönke Ludwig wrote:

Am 08.08.2013 19:42, schrieb Craig Dillabaugh:

On Wed, 07 Aug 2013 16:36:31 GMT, Craig Dillabaugh wrote:

I recently tried to install DUB on OpenSuse 12.2, but ran into problems with it linking with libcurl and was hoping to get some help on getting DUB up on running.

My first attempt was to download the dub binary from the RS website. When I attempted to run dub I get the following error:

dub: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

However, libcurl is right there in /usr/lib64 (which is in the linker path according to /etc/ld.so.conf):

/usr/lib64$ ls -l libcurl*

clip

Any ideas on what I should do next to try and fix this.

Well I still haven't been able to build DUB from source, but I have solved my problem of getting a working copy of DUB, so I figured I should report back.

I had downloaded the 32bit version of DUB on my 64-bit OpenSuse install, which is undoubtedly why I had linking issues. I downloaded the proper binary ( dub-0.9.17-linux-x86_64.tar.gz ) and now everything works perfectly.

On the positive side, since I haven't had any replies, I hopefully haven't wasted too many peoples time.

Cheers,
Craig

I can't say what exactly goes wrong there, but one possible thing to try
would be to replace the $LIBS variable in build.sh:34 with
"-defaultlib=libphobos2.so" to link against the shared library version
of Phobos, which should already be linked against libcurl. I'll set up a
SuSE VM at some point, but that will have to wait a little.

I changed the lines in question to:

echo Running $DC...
$DC -ofbin/dub -g -debug -w -Isource $* -defaultlib=libphobos2.so @build-files.txt

and still get the same errors. If I can find some free time I will see if I can get it
to compile and post back here.