SOURCEPARK / Readpst

GNU General Public License v3.0
0 stars 1 forks source link

Getting linker error: cannot find -l-lz: No such file or directory #2

Open saubhaagyapurna opened 1 week ago

saubhaagyapurna commented 1 week ago

It seems that there is a Makefile misconfigureation or I am missing a dependency. Would you please help we understand this error?

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I./.. -I./../src -I -g -O2 -MT python-libpst.lo -MD -MP -MF .deps/python-libpst.Tpo -c python-libpst.cpp -o python-libpst.o >/dev/null 2>&1 mv -f .deps/python-libpst.Tpo .deps/python-libpst.Plo /bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -module -avoid-version -o _libpst.la -rpath /usr/local/lib/python/site-packages python-libpst.lo -l ../src/libpst.la libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/12/crtbeginS.o .libs/python-libpst.o -Wl,--whole-archive ../src/.libs/libpst.a -Wl,--no-whole-archive -l -lz -L/usr/lib/gcc/x86_64-linux-gnu/12 -L/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/12/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/12/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/12/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/crtn.o -g -O2 -Wl,-soname -Wl,_libpst.so -o .libs/_libpst.so /usr/bin/ld: cannot find -l-lz: No such file or directory collect2: error: ld returned 1 exit status make[2]: *** [Makefile:500: _libpst.la] Error 1 make[2]: Leaving directory '/home/eric/src/Readpst/libpst-0.6.76/python' make[1]: *** [Makefile:575: all-recursive] Error 1 make[1]: Leaving directory '/home/eric/src/Readpst/libpst-0.6.76' make: *** [Makefile:461: all] Error 2

sourcepark-mheidebrecht commented 1 week ago

Thank you for your message!

As mentioned in the README we only made some small adjustments to the readpst.c file in order to change the functionality. The original libpst is not maintained by us and we also didn't make any changes to the Makefile.

What I notice is that the -l before -lz is missing the name of the library to be linked. Since I'm not very familiar with C/C++ this is only a guess.

I guess the best you could do is to contact the maintainers of libpst if you cannot solve the problem.

All the best!