New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build on OpenSUSE Tumbleweed - -lphonos2 not found #252

Closed
cbcoutinho opened this Issue Nov 21, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@cbcoutinho

cbcoutinho commented Nov 21, 2017

I tried to build this project with the system-installed version of dmd, :

$ dmd --version
DMD64 D Compiler v2.076.1
Copyright (c) 1999-2017 by Digital Mars written by Walter Bright

Building the project resulted in an error not able to find the phobos2 library:

$ cd /path/to/onedrive && make
dmd -g -inline -O -release -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl -J. src/config.d src/itemdb.d src/log.d src/main.d src/monitor.d src/onedrive.d src/qxor.d src/selective.d src/sqlite.d src/sync.d src/upload.d src/util.d
sed "s|@PREFIX@|/usr/local|g" onedrive.service.in > onedrive.service
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lphobos2
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
make: *** [Makefile:31: onedrive] Error 1

I double checked by trying to install everything related to phobos2, but it looks like I have the required phobos library:

$ sudo zypper in libphobos2*
Loading repository data...
Reading installed packages...
'libphobos2-ldc68' providing 'libphobos2*' is already installed.
No update candidate for 'libphobos2-ldc68-0.17.4-2.2.x86_64'. The highest available version is already installed.
'libphobos2-0_76' providing 'libphobos2*' is already installed.
No update candidate for 'libphobos2-0_76-2.076.1-1.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.
@piovisqui

This comment has been minimized.

piovisqui commented Nov 21, 2017

For compiling you probably need devel packages.

ldc-phobos-devel.i686 : Support for developing D application
ldc-phobos-devel.x86_64 : Support for developing D application

I'm using Fedora, but OpenSuse should have something similar, it's worth to try them.

@cbcoutinho

This comment has been minimized.

cbcoutinho commented Nov 21, 2017

This was a bit difficult to determine at first - on OpenSUSE there is a phobos-devel package, and a ldc-phobos-devel package, both of which did not get rid of the error.

Then I found a package containing the static library, phobos-devel-static, which once installed got rid of the errors. I'll keep on moving along to see if the service is able to connect. Anyways, I'm able to build it now. Thanks for your help

@cbcoutinho

This comment has been minimized.

cbcoutinho commented Dec 7, 2017

I can report that the issue with requiring phobos-devel-static also exists when using the more stable version of OpenSUSE - OpenSUSE Leap 42.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment