I've got a stock OS X 10.4.6. I don't have any fink or
darwinports stuff installed.
Build fails with error:
~/src/pwsafe-0.2.0@vfr800% make
g++ -DHAVE_CONFIG_H -I. -I. -I. -lncurses
-I/usr/X11R6/include -L/usr/X11R6/lib -g -O2 -c
pwsafe.cpp
pwsafe.cpp: In function `secstring getpw(const char*)':
pwsafe.cpp:1407: error: invalid conversion from 'int
(*)()' to 'int (*)(const char*, int)'
pwsafe.cpp: In function `secstring gettxt(const char*,
const secstring&)':
pwsafe.cpp:1433: error: invalid conversion from 'int
(*)()' to 'int (*)(const char*, int)'
make: *** [pwsafe.o] Error 1
I'm not a c++ programmer so i'm way behind the curve in
debugging this. I did notice that the two lines of
code in the error message were readline-related so i
reconfigured --without-readline and it builds OK.
I'd like to have readline support if possible. I am
guessing apple includes a crufty old version of
readline but i don't know how to get the version out of
the library.
Logged In: YES
user_id=957363
Originator: NO
Indeed it's a crusty old readline.h which is the problem. the readline.h is written for C, not C++, and isn't written in proper C89 so it does not declare the arguments to the callback functions (the empty "()"). C++ cannot handle that.
I have workarounds for that inside the #ifdef READLINE_H_LACKS_TYPES_FOR_CALLBACKS.
Adding a #define READLINE_H_LACKS_TYPES_FOR_CALLBACKS at the top of pwsafe.cpp should do it.
Logged In: YES
user_id=302041
Originator: NO
I tried adding the #define, as suggested, and the build still failed with the same error. Same happened when I used a newer version of Readline (provided by Fink).
pwsafe builds fine with Readline disabled.
I'm going to need the bits of the output of ./configure where I test libreadline (it's near the bottom), and the config.log file that produced to debug this further. (Or a Mac OS 10.4 machine for an hour).
I'm tracking this in someone else's bug which reported the same build failure
https://sourceforge.net/p/pwsafe/bugs/3/