0

while installing nix I am getting this error.when I doing make.

LD    src/libstore/libnixstore.so
/usr/bin/ld: cannot find -lsqlite3 
/usr/bin/ld: cannot find -lbz2 
collect2: error: ld returned 1 exit status 
make: *** [src/libstore/libnixstore.so] Error 1

I already set LDFLAGS to the directory containing libsqlite3.* and libbz2.*

update: here is output of make V=1

Makefile:28: Makefile.config: No such file or directory
rm -f Makefile.config && ./config.status --quiet --file=Makefile.config
g++ -o /home/kapil/nix/src/nix-1.8/src/libstore/libnixstore.so -shared -Wl,--no-copy-dt-needed-entries src/libstore/build.o src/libstore/derivations.o src/libstore/gc.o src/libstore/globals.o src/libstore/local-store.o src/libstore/misc.o src/libstore/optimise-store.o src/libstore/pathlocks.o src/libstore/references.o src/libstore/remote-store.o src/libstore/store-api.o -lsqlite3 -lbz2 -Wl,-z,defs -Wl,-soname=libnixstore.so    -Wl,-rpath,/home/kapil/nix/src/nix-1.8/src/libutil -Lsrc/libutil -lnixutil    -Wl,-rpath,/home/kapil/nix/src/nix-1.8/src/boost/format -Lsrc/boost/format -lnixformat  
/usr/bin/ld: cannot find -lsqlite3
/usr/bin/ld: cannot find -lbz2
collect2: error: ld returned 1 exit status
make: *** [src/libstore/libnixstore.so] Error 1
Kapil
  • 817
  • 2
  • 13
  • 25
  • Run the make with `V=1` or `VERBOSE=1` or whatever appropriate flag it requires and see what command it is actually running there. – Etan Reisner Apr 07 '15 at 15:36
  • it gives something like this Makefile:28: Makefile.config: No such file or directory – Kapil Apr 07 '15 at 15:44
  • Do you see your `LDFLAGS` added paths on that `g++` line? – Etan Reisner Apr 07 '15 at 15:45
  • yes but its just -lsqlite3 -lbz2. not an absolute path – Kapil Apr 07 '15 at 15:48
  • Um... you said you set `LDFLAGS` to have the directory containing those files. Is that not what you did? Where are those libraries on your system? You shouldn't need to add `-lsqlite3 -lbz2` manually. Either the software uses those libraries and it will list them or it doesn't use them and manually listing them is unlikely to do anything of any use. What are you trying to do here exactly? – Etan Reisner Apr 07 '15 at 16:43
  • I am installing nix as per the steps mentioned [here](https://nixos.org/wiki/How_to_install_nix_in_home_%28on_another_distribution%29#Manual_Installation) – Kapil Apr 07 '15 at 16:49
  • So you run `export LDFLAGS="-L$HOME/nix-boot/lib $LDFLAGS"` in your current shell session? Which step is failing now? The `nix` install step itself? – Etan Reisner Apr 07 '15 at 16:51
  • upto this step ./configure --prefix=$HOME/nix-boot --with-store-dir=$HOME/nix/store --localstatedir=$HOME/nix/var everything works fine.but when I run make it gives above mentioned error. – Kapil Apr 07 '15 at 16:56
  • And you ran the full set of steps for sqlite3 and bzip2 listed before that step? You didn't miss running the commands for sqlite3 because the directions only list them once for both curl and sqlite3? – Etan Reisner Apr 07 '15 at 16:57
  • yeah I already repeated same steps for installing sqlite3,curl,bzip2 – Kapil Apr 07 '15 at 17:01
  • What files do you have in `$HOME/nix-boot/lib`? – Etan Reisner Apr 07 '15 at 17:45
  • libsqlite3.a,libsqlite.so any much more – Kapil Apr 09 '15 at 11:14
  • `libsqlite.so`? Not `libsqlite3.so`? – Etan Reisner Apr 09 '15 at 12:38
  • sorry.its libsqlite3.so – Kapil Apr 09 '15 at 13:20
  • `LDFLAGS` is either not exported or, despite the instructions, that is the wrong thing to set. Try exporting it again (and confirming it has the value you expect) and then see about finding out what variable/etc. is actually going to affect that compilation line. – Etan Reisner Apr 09 '15 at 13:28

0 Answers0