appropriate
Posts: 6
Joined: Sat Dec 26, 2015 12:13 am

Compile pwsafe

Sat Dec 26, 2015 12:35 am

Hi Everybody,

Though I have been using Linux for 20 or so years, I have had little reason to compile programs from source.

I did a search here for compile pwsafe and found a post that says that Debian dropped it because it is no longer developed, yet I have a source file from 10/09/2015. I guess it is still being developed. Another search for just compile didn't help much either.

Anyway, I tried to build it by putting the terminal in the directory that contains makefile.linux and running

NO_YUBI=1 make -f Makefile.linux

or

NO_YUBI=1 make -f Makefile.linux deb

Both had errors that seemed to refer to not knowing if the CPU was big or small. I had read most of the text readable files included with the source and installed all of the dependent packages I found notice of prior to trying this install.

Could some please refer me to a site that will tell me how to compile this, or list the steps. It would be much appreciated.

Thanks.

Appropriate Misbehavior

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: Compile pwsafe

Sun Dec 27, 2015 10:38 am

Can you post the link from where you got the source code? The problem probably exists in the Makefile, as that should (if written "correctly") be analysing your system and setting values accordingly. I would suspect that it cannot / is not identifying the CPU correctly and is not setting "if the CPU was big or small". It will also help if you give us the full text of error messages instead of translating them into your own words (Googling the exact text of an error message often points to the problem; if you don't know which answer that is, someone here might).

Is the "CPU was big or small" referring to big-endian / little-endian? (https://en.wikipedia.org/wiki/Endianness)

appropriate
Posts: 6
Joined: Sat Dec 26, 2015 12:13 am

Re: Compile pwsafe

Sun Dec 27, 2015 4:16 pm

Hi Navyscourge,

Thanks for the response. The file came from here http://sourceforge.net/projects/passwordsafe/files/passwordsafe/3.37.1/

Well, the system won't allow me to attach a file so the output from the console is listed below.

appropriate

___________________________________

[email protected]:~/Downloads/pwsafe/pwsafe-3.37.1-src $ NO_YUBI=1 make -f Makefile.linux deb
make unicoderelease
make[1]: Entering directory '/home/pi/Downloads/pwsafe/pwsafe-3.37.1-src'
make -C src/os/linux unicoderelease
make[2]: Entering directory '/home/pi/Downloads/pwsafe/pwsafe-3.37.1-src/src/os/linux'
In file included from ../typedefs.h:33:0,
from ../UUID.h:29,
from UUID.cpp:16:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../UUID.h:29:0,
from UUID.cpp:16:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from UUID.cpp:17:0:
../../core/Util.h:90:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/Util.h:122:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
In file included from ../typedefs.h:33:0,
from registry.cpp:15:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from registry.cpp:15:0:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ./../../core/../os/typedefs.h:33:0,
from ./../../core/StringX.h:28,
from ./xsendstring.h:17,
from xsendstring.cpp:38:
./../../core/../os/../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ./../../core/StringX.h:28:0,
from ./xsendstring.h:17,
from xsendstring.cpp:38:
./../../core/../os/typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../KeySend.h:17,
from KeySend.cpp:8:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../KeySend.h:17:0,
from KeySend.cpp:8:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from KeySend.cpp:11:0:
../../core/Util.h:90:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/Util.h:122:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
In file included from ../typedefs.h:33:0,
from utf8conv.cpp:13:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from utf8conv.cpp:13:0:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../run.h:20,
from run.cpp:13:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../run.h:20:0,
from run.cpp:13:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../rand.h:10,
from rand.cpp:12:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../rand.h:10:0,
from rand.cpp:12:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from pws_time.h:11,
from pws_time.cpp:13:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from pws_time.h:11:0,
from pws_time.cpp:13:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from pws_str.h:10,
from pws_str.cpp:14:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from pws_str.h:10:0,
from pws_str.cpp:14:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../mem.h:10,
from mem.cpp:15:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../mem.h:10:0,
from mem.cpp:15:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../logit.h:12,
from logit.cpp:9:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../logit.h:12:0,
from logit.cpp:9:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from logit.cpp:11:0:
../../core/Util.h:90:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/Util.h:122:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
In file included from ../typedefs.h:33:0,
from ../file.h:11,
from file.cpp:28:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../file.h:11:0,
from file.cpp:28:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../env.h:10,
from env.cpp:23:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../env.h:10:0,
from env.cpp:23:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../dir.h:12,
from dir.cpp:12:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../dir.h:12:0,
from dir.cpp:12:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../debug.h:12,
from debug.cpp:9:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../debug.h:12:0,
from debug.cpp:9:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from debug.cpp:10:0:
../../core/../core/Util.h:90:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/../core/Util.h:122:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
make all CONFIG=unicoderelease
make[3]: Entering directory '/home/pi/Downloads/pwsafe/pwsafe-3.37.1-src/src/os/linux'
In file included from ../typedefs.h:33:0,
from ../UUID.h:29,
from UUID.cpp:16:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../UUID.h:29:0,
from UUID.cpp:16:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from UUID.cpp:17:0:
../../core/Util.h:90:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/Util.h:122:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
In file included from ../typedefs.h:33:0,
from registry.cpp:15:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from registry.cpp:15:0:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ./../../core/../os/typedefs.h:33:0,
from ./../../core/StringX.h:28,
from ./xsendstring.h:17,
from xsendstring.cpp:38:
./../../core/../os/../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ./../../core/StringX.h:28:0,
from ./xsendstring.h:17,
from xsendstring.cpp:38:
./../../core/../os/typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../KeySend.h:17,
from KeySend.cpp:8:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../KeySend.h:17:0,
from KeySend.cpp:8:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from KeySend.cpp:11:0:
../../core/Util.h:90:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/Util.h:122:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
In file included from ../typedefs.h:33:0,
from utf8conv.cpp:13:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from utf8conv.cpp:13:0:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../run.h:20,
from run.cpp:13:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../run.h:20:0,
from run.cpp:13:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../rand.h:10,
from rand.cpp:12:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../rand.h:10:0,
from rand.cpp:12:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from pws_time.h:11,
from pws_time.cpp:13:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from pws_time.h:11:0,
from pws_time.cpp:13:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from pws_str.h:10,
from pws_str.cpp:14:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from pws_str.h:10:0,
from pws_str.cpp:14:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../mem.h:10,
from mem.cpp:15:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../mem.h:10:0,
from mem.cpp:15:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../logit.h:12,
from logit.cpp:9:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../logit.h:12:0,
from logit.cpp:9:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from logit.cpp:11:0:
../../core/Util.h:90:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/Util.h:122:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
In file included from ../typedefs.h:33:0,
from ../file.h:11,
from file.cpp:28:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../file.h:11:0,
from file.cpp:28:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../env.h:10,
from env.cpp:23:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../env.h:10:0,
from env.cpp:23:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../dir.h:12,
from dir.cpp:12:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../dir.h:12:0,
from dir.cpp:12:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from ../typedefs.h:33:0,
from ../debug.h:12,
from debug.cpp:9:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../debug.h:12:0,
from debug.cpp:9:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from debug.cpp:10:0:
../../core/../core/Util.h:90:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/../core/Util.h:122:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
g++ -std=c++11 -fPIC -Wall -I../../core -I../.. `/usr/bin/wx-config --debug=no --unicode=yes --inplace --cxxflags` -O -DUNICODE -DNDEBUG -c debug.cpp -o ../../../obj/unicoderelease/os/debug.o
In file included from ../typedefs.h:33:0,
from ../debug.h:12,
from debug.cpp:9:
../../core/PwsPlatform.h:152:2: error: #error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
#error Cannot determine whether the target CPU is big or little endian - please fix PwsPlatform.h
^
In file included from ../debug.h:12:0,
from debug.cpp:9:
../typedefs.h:134:2: error: #error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
#error "One of PWS_LITTLE_ENDIAN or PWS_BIG_ENDIAN must be defined before including typedefs.h"
^
In file included from debug.cpp:10:0:
../../core/../core/Util.h:90:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/../core/Util.h:122:2: error: #error Is the target CPU big or little endian?
#error Is the target CPU big or little endian?
^
../../core/../core/Util.h: In function ‘int getInt32(const unsigned char*)’:
../../core/../core/Util.h:92:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
Makefile:78: recipe for target '../../../obj/unicoderelease/os/debug.o' failed
make[3]: *** [../../../obj/unicoderelease/os/debug.o] Error 1
make[3]: Leaving directory '/home/pi/Downloads/pwsafe/pwsafe-3.37.1-src/src/os/linux'
Makefile:83: recipe for target 'unicoderelease' failed
make[2]: *** [unicoderelease] Error 2
make[2]: Leaving directory '/home/pi/Downloads/pwsafe/pwsafe-3.37.1-src/src/os/linux'
Makefile.linux:46: recipe for target 'unicoderelease' failed
make[1]: *** [unicoderelease] Error 2
make[1]: Leaving directory '/home/pi/Downloads/pwsafe/pwsafe-3.37.1-src'
Makefile.linux:55: recipe for target 'release' failed
make: *** [release] Error 2
[email protected]:~/Downloads/pwsafe/pwsafe-3.37.1-src $

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: Compile pwsafe

Mon Dec 28, 2015 2:36 pm

The problem is with the file pwsafe-3.37.1-src/src/core/PwsPlatform.h as it defines the value of PWS_LITTLE_ENDIAN based on (mostly) x86 processors. The Pi processor is (usually) little endian, so you can try the following command line:

Code: Select all

NO_YUBI=1 make PWS_LITTLE_ENDIAN=1 -f Makefile.linux
However, I have to add that I am in no way an expert on Make, so I may have the syntax wrong :)

I think to code in PwsPlatform.h that checks the command line is this bit at line 79:

Code: Select all

// PWS_BIG_ENDIAN and PWS_LITTLE_ENDIAN can be specified on the [text "command line" missing in source file??]
#if defined(PWS_BIG_ENDIAN)
#undef PWS_BIG_ENDIAN
#define PWS_BIG_ENDIAN
#endif

#if defined(PWS_LITTLE_ENDIAN)
#undef PWS_LITTLE_ENDIAN
#define PWS_LITTLE_ENDIAN
#endif

appropriate
Posts: 6
Joined: Sat Dec 26, 2015 12:13 am

Re: Compile pwsafe

Mon Dec 28, 2015 8:32 pm

Navyscourge,

Thanks. I gave that a try, no joy. I tried it with a -d switch (verbose) and got better than 6000 lines of output, but nothing that made any sense to me (and too much to post here). I went looking for PWSPlatform.h and found it in a source subdirectory. Reading through that it makes references to several types of processors, but none that look like they might be arch or pi. I did a search for PWSPlaform.h to see if someone else had tried something with that and got a few results (including these posts), but none that made any sense to me.

Would someone know how to define the pi's processor for the platform file? I am using the 4 core variety for this project if it matters.

Appropriate

swampdog
Posts: 230
Joined: Fri Dec 04, 2015 11:22 am

Re: Compile pwsafe

Wed Dec 30, 2015 11:59 pm

It will build under jessie.

Code: Select all

[email protected]:~/T/pwsafe-3.37.1 $ pwd && cat 00.patch 
/home/admin/T/pwsafe-3.37.1
--- src/core/PwsPlatform.h.ORIGINAL	2015-12-30 18:59:04.482946108 +0000
+++ src/core/PwsPlatform.h	2015-12-30 19:04:38.609018301 +0000
@@ -142,6 +142,7 @@
 // * Add other platforms here...                *
 // **********************************************
 #endif
+#define	PWS_LITTLE_ENDIAN
 
 //
 #if !defined(PWS_PLATFORM)
..with the following..

Code: Select all

[email protected]:~ $ history | grep apt-get | grep install | grep -v gtk2 | grep -v wx2
  357  sudo apt-get install gettext
  368  sudo apt-get install libykpers-1-dev
  390  sudo apt-get install libxt-dev
  393  sudo apt-get install libxtst-dev
  396  sudo apt-get -y install uuid-dev
  403  sudo apt-get -y install libxerces-c-dev
  415  sudo apt-get install wx3.0-headers wx3.0-i18n
  422  sudo apt-get install libwxgtk3.0-0 libwxgtk3.0-0-dbg libwxgtk3.0-dev
I think. I accidentally installed the version2 gtk/wx stuff so almost certain the above is correct. Both the debug & release builds launch (moans about no help). I'm not familiar with the app so can't go any further suffice it to say my patch is a bodge. You actually need someone more expert with the pi to look at the output from "cpp -dM - </dev/null" in order to formulate a proper test in PwsPlatform.h and please note you will have a terrible time trying to build it under wheezy: some libraries are too old so you'd have to rebuild them before you even start!

appropriate
Posts: 6
Joined: Sat Dec 26, 2015 12:13 am

Re: Compile pwsafe

Thu Dec 31, 2015 4:18 pm

Hi Swampdog,

I am using Jessie. All of those programs you listed to install were already installed and the latest versions. I tried to make sense of your suggested edit to PWSPlatform.h and added "+#define PWS_LITTLE_ENDIAN" just after the add other platforms lines as in your sample, saved it and re-ran the make command. No joy.

I may not have understood the part about "pwd && cat 00.patch ". Patch with what?

Thanks

Appropriate Misbehavior

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Compile pwsafe

Fri Jan 01, 2016 3:05 am

appropriate wrote:Hi Swampdog,

I am using Jessie. All of those programs you listed to install were already installed and the latest versions. I tried to make sense of your suggested edit to PWSPlatform.h and added "+#define PWS_LITTLE_ENDIAN" just after the add other platforms lines as in your sample, saved it and re-ran the make command. No joy.

I may not have understood the part about "pwd && cat 00.patch ". Patch with what?

Thanks

Appropriate Misbehavior
Hi appropriate,

I have pwsafe compiling now. It is working for me. It sounds like you may have either not added the correct text, or added the #define to the wrong line.

I would suggest unzipping pwsafe-3.37.1-src.zip again, change the file src/core/PwsPlatform.h and add the following to line 146

Code: Select all

#define PWS_LITTLE_ENDIAN
I am compiling with the same command line you used above "NO_YUBI=1 make -f Makefile.linux"

Edit: build was successful for me.

P.S. Don't worry about "pwd && cat 00.patch", that was the commands Swampdog used to output the current directory and the patch that shows the changes that were made to PwsPlatform.h

appropriate
Posts: 6
Joined: Sat Dec 26, 2015 12:13 am

Re: Compile pwsafe

Sun Jan 03, 2016 7:33 pm

AndyD,

Well that worked, though stupid me I did a bunch more work than necessary. I followed your method exactly, but then did not find anything in the Releases folder that did anything. I then went back and got a different source http://sourceforge.net/projects/passwor ... BETA/0.97/ and did the same procedure with that. Same issue with the Releases folder so I did a find for files created today and found things in the install folder. Copying those to the correct directories got everything except an entry in the menu working, and using the Main Menu Editor fixed that.

Experience helps. I followed some directions I found in one of the text files that came with the source and tried to use DPKG to do the install from what was in /Releases/, but there was only a .tgz file there and at only 20 bytes I knew it would not do much.

I then went back a looked at the first build I did with the pwsafe-3.37.1-src and found that the same files existed in install there. It would have worked.

Thanks Everybody

Appropriate Misbehavior

Return to “Advanced users”