Skip to content

Make error on Ubuntu Systems

abraunegg edited this page May 15, 2020 · 2 revisions

Sometimes when attempting to compile the application, this may fail with the following error:

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for dmd... dmd
checking version of D compiler... 2.091.1
checking for curl... yes
checking for sqlite... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating contrib/pacman/PKGBUILD
config.status: creating contrib/spec/onedrive.spec
config.status: creating onedrive.1
config.status: creating contrib/systemd/onedrive.service
config.status: creating contrib/systemd/onedrive@.service

$ make clean; make;
rm -f onedrive onedrive.o version
rm -rf autom4te.cache
rm -f config.log config.status
if [ -f .git/HEAD ] ; then \
	git describe --tags > version ; \
else \
	echo v2.4.1-dev > version ; \
fi
dmd -w -g -O -J. -L-lcurl -L-lsqlite3  -L-ldl 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 src/progress.d -ofonedrive
/home/gfemer/anaconda2/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lcurl
/home/gfemer/anaconda2/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
make: *** [Makefile:100: onedrive] Error 1

The error is that the linker cannot find any of the required dependencies, even if they have been installed:

  • sqlite
  • curl

For this situation, the following may resolve your issue:

make dist-clean; ./configure; make;

Reference: https://github.com/abraunegg/onedrive/issues/882