dlang / dub

Package and build management system for D
MIT License
672 stars 230 forks source link

error while loading shared libraries #764

Open pkoretic opened 8 years ago

pkoretic commented 8 years ago

Hi all.

So I was setting up cross platform testing of around 10 programming languages and this is the first that really does make me work

Trying to run binaries for ARM or X86_64 Linux results in library errors I'm using latest Arch Linux with latest packages DUB package in Arch ARM Linux repository has linker errors which I should probably take to arch team:

dub: error while loading shared libraries: libphobos2-ldc-debug.so.66: cannot open shared object file: No such file or directory

Installed version from repo comes with libphobos2-ldc-debug.so.67, just linking it created unresolved symbols so I've decided to make a shortcut and fetch precompiled binary, which resulted in:

ARM

./dub: /usr/lib/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by ./dub)

Even though my x86_64 dlang installation is working I've decided to test precompiled binary too X86_64

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

I've found this older issue #120 where @s-ludwig resolved second issue more or less. Is there something else to be done instead of workarounds for Arch Linux or is this something happening only to me?

For ARM I've tried downgrading curl library to some older version but it was a no-go. I can pursue it later if that is expected to solve this problem since I'm very short on time and setting up complete dlang/vibe.d cross platform environment turned into minor PITA :)

Thanks!

TETYYS commented 8 years ago

Are you sure you downloaded x86_64 for 64bit or x86 for 32bit? This happens when you try to run 32bit dub on 64bit system.

Geod24 commented 8 years ago

I'm also on Arch Linux and I don't see any problem for x64 -> x64.

I haven't X compiled in a while (I used GDC packages at that time), but LDC should be able to handle it well. However, dub is not well tested in this situation, and I would recommend a voodoo chroot (chroot + binfmt + qemu-static) if you want to save yourself some pain.

dub is not dynamically linked to liblphobos AFAICS.

That's what I got:

pacman -Q ldc dub liblphobos
ldc 1:0.16.1-4
dub 0.9.24-1
liblphobos 1:0.16.1-4
pkoretic commented 8 years ago

@Geod24 @TETYYS I probably confused you Arch linux x64 dub package from the repo works, static binary from dub homepage doesn't work, that is a minor problem Dub package for arm in arch linux repo doesn't work, which I reported yesterday to archarm on IRC and I don't see them fixing it soon Dub package for arm from homepage doesn't work and results in above error

s-ludwig commented 8 years ago

I'll have to set up an Arch VM for ARM to generate specialized binaries. The current bare binaries are all built on Ubuntu machines. The fastest immediate solution would be to get the GDC ARM binaries from http://gdcproject.org/downloads and then build DUB locally using GDC=/path/to/downloaded/gdc ./build-gdc.sh. It should be really quick, as no installation of any sort is needed, I just don't really know if the pre-compiled GDC will run on Arch.

pkoretic commented 8 years ago

@s-ludwig That was plain simple, gdc from repo works so I just used that and there it is, working dub, didn't expect that building from source would work after everything, sorry

on the other note using that dub with vibe.d gets me Unknown dependency: libasync just ran dub in example package of http_static_serve as mentioned on vibe.d github page

tried subconfigurations": { "vibe-d": "libasync"} see something that I don't think I have in #494

and read stuff from https://github.com/etcimon/libasync http://code.dlang.org/packages/libasync

not sure what should I do though as I have libevent, libev installed and libasync is D library

gdc is at version 5.3.0 DUB version 0.9.24+138-g9a4302c

here is dub -v output if that is something useful http://pastebin.com/raw/MSqXV5GV