nsd20463 / pwsafe

commandline tool compatible with Counterpane's Passwordsafe
GNU General Public License v2.0
68 stars 18 forks source link

Installation fails: "undefined reference" #12

Closed dr0i closed 7 years ago

dr0i commented 7 years ago

$ make check g++ -Wall -o pwsafe pwsafe.o -lX11 -lcrypto pwsafe.o: In function emit(secstring const&, char const*, secstring const&)': pwsafe.cpp:(.text+0x2d2f): undefined reference to_XA_CLIPBOARD' pwsafe.cpp:(.text+0x2d41): undefined reference to XmuInternAtom' pwsafe.cpp:(.text+0x3565): undefined reference to_XA_TARGETS' pwsafe.cpp:(.text+0x3577): undefined reference to XmuInternAtom' pwsafe.cpp:(.text+0x35c3): undefined reference to_XA_TARGETS' pwsafe.cpp:(.text+0x35d5): undefined reference to XmuInternAtom' pwsafe.cpp:(.text+0x35e3): undefined reference to_XA_TIMESTAMP' pwsafe.cpp:(.text+0x35f5): undefined reference to XmuInternAtom' pwsafe.cpp:(.text+0x3603): undefined reference to_XA_TEXT' pwsafe.cpp:(.text+0x3615): undefined reference to XmuInternAtom' pwsafe.cpp:(.text+0x362a): undefined reference to_XA_TARGETS' pwsafe.cpp:(.text+0x363c): undefined reference to XmuInternAtom' pwsafe.cpp:(.text+0x368b): undefined reference to_XA_TIMESTAMP' pwsafe.cpp:(.text+0x369d): undefined reference to XmuInternAtom' pwsafe.cpp:(.text+0x36ae): undefined reference to_XA_TIMESTAMP' pwsafe.cpp:(.text+0x36c0): undefined reference to XmuInternAtom' pwsafe.cpp:(.text+0x3710): undefined reference to_XA_TEXT' pwsafe.cpp:(.text+0x3722): undefined reference to XmuInternAtom' pwsafe.cpp:(.text+0x3872): undefined reference toXmuClientWindow' collect2: error: ld returned 1 exit status Makefile:624: recipe for target 'pwsafe' failed make: *** [pwsafe] Error 1

hymie0 commented 7 years ago

It looks like you don't have the libxmu library installed.

dr0i commented 7 years ago

Thx for answering! But i have it installed: $ apt search libxmu i libxmu-dev
p libxmu-dev:i386
i A libxmu-headers
v libxmu-headers:i386 i libxmu6
i libxmu6:i386
p libxmu6-dbg
p libxmu6-dbg:i386
p libxmuu-dev
p libxmuu-dev:i386
i libxmuu1
p libxmuu1:i386
p libxmuu1-dbg
p libxmuu1-dbg:i386

gahr commented 7 years ago

Can you post your config.log?

dr0i commented 7 years ago

https://gist.github.com/dr0i/ed4eb9fc829ff0936ce81720f6db05d7

gahr commented 7 years ago

configure:5835: checking for XmuInternAtom in -lXmu configure:5860: gcc -o conftest -g -O2 conftest.c -lXmu -lX11 -lcrypto >&5 /usr/bin/ld: cannot find -lXmu

Can you trying configuring with ./configure X_LIBS=/path/to/your/x11/libs

dr0i commented 7 years ago

I did: $ ./configure X_LIBS=/usr/lib/X11 checking for a BSD-compatible install... /usr/bin/install -c [...] checking for sys/mkdev.h... (cached) no checking for sys/sysmacros.h... (cached) yes checking whether struct tm is in sys/time.h or time.h... time.h checking for socklen_t... yes checking POSIX termios... no configure: error: "POSIX termios operations are required"

Then I did $ ./configure; make; sudo make install - and it worked :+1: ! Is there really a connection between declaring X_LIBS as I did or not (I would assume not, since I reconfigured without extra declaring X_LIBS and then installed it)? If there is no connection it must have something to do with my yesterday's installation of password-store, I assume.

gahr commented 7 years ago

The way we configure it on FreeBSD is:

./configure --with-x --x-libraries=/usr/local/lib --x-includes=/usr/local/include --prefix=/usr/local

nsd20463 commented 7 years ago

I'll assume you found your missing headers and libs. There were several missing bits in the config.log.