mohitsh / jslibs

Automatically exported from code.google.com/p/jslibs
0 stars 0 forks source link

`make all` fails when compiling on Kubuntu Feisty #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When compiling SVN r on Kubuntu error 2 is raised when compiling moduleManager:

{{{
make -C jshost all BUILD=opt
make[1]: Entering directory `/home/[...]/Projects/jslibs/jshost'
make -w -C ../moduleManager/ -f Makefile all
make[2]: Entering directory `/home/[...]/Projects/jslibs/moduleManager'
gcc -c -Wall -O3 -s -funroll-loops -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src  -o
moduleManager.o moduleManager.cpp
moduleManager.cpp: In function ‘ModuleId ModuleLoad(const char*,
JSContext*, JSObject*)’:
moduleManager.cpp:110: error: cast from ‘void*’ to ‘ModuleId’ loses 
precision
moduleManager.cpp:132: error: cast from ‘void*’ to ‘ModuleId’ loses 
precision
make[2]: *** [moduleManager.o] Error 1
make[2]: Leaving directory `/home/[...]/Projects/jslibs/moduleManager'
make[1]: *** [../moduleManager/Makefile] Error 2
make[1]: Leaving directory `/home/[...]/Projects/jslibs/jshost'
make: *** [jshost] Error 2
}}}

Original issue reported on code.google.com by krof.drakula on 18 Feb 2008 at 8:49

GoogleCodeExporter commented 9 years ago
Sorry, forgot to specify revision - r1302. Also, the compile was done on a
single-core 64-bit Kubuntu 7.10 with standard GNU tools.

Original comment by krof.drakula on 18 Feb 2008 at 8:54

GoogleCodeExporter commented 9 years ago
Unfortunately jslibs is not ported under 64bits platform and I don't know how 
hard it
is (and BTW I do not have any 64bits system to do the work)
In the previous error message, it show that I try to cast a (void*) into an 
(unsigned
int). I thought that sizeof(void*) == sizeof(unsigned int).
Can you try to change (in moduleManager.h):
typedef unsigned int ModuleId;
into 
typedef unsigned long int ModuleId;
and then compile again
Thanks.

Original comment by sou...@gmail.com on 18 Feb 2008 at 11:59

GoogleCodeExporter commented 9 years ago
Moving along, but now a new error arises:

{{{
make[1]: Entering directory `/home/klemen/Projects/jslibs/jsstd'
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src  -o buffer.o 
buffer.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src  -o data.o 
data.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src  -o main.o 
main.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src  -o pack.o 
pack.cpp
../common/jsConversionHelper.h: In function ‘JSBool JsvalToSInt32(JSContext*, 
jsval,
long int*, bool*)’:
../common/jsConversionHelper.h:122: warning: comparison is always false due to
limited range of data type
../common/jsConversionHelper.h:122: warning: comparison is always false due to
limited range of data type
pack.cpp: In function ‘JSBool ReadInt(JSContext*, JSObject*, uintN, jsval*, 
jsval*)’:
pack.cpp:186: error: duplicate case value
pack.cpp:167: error: previously used here
pack.cpp: In function ‘JSBool WriteInt(JSContext*, JSObject*, uintN, jsval*, 
jsval*)’:
pack.cpp:270: error: duplicate case value
pack.cpp:262: error: previously used here
make[1]: *** [pack.o] Error 1
make[1]: Leaving directory `/home/klemen/Projects/jslibs/jsstd'
make: *** [jsstd] Error 2
}}}

I'm guessing this is not just a straightforward quickfix, eh? I mean I can 
still keep
on posting errors until this is resolved - if you're up to it. ;)

Original comment by krof.drakula on 18 Feb 2008 at 1:10

GoogleCodeExporter commented 9 years ago
Let me just two or three more tries :)
I made some changes in the 'pack' sources. Please try again with the last SVN 
version.
Thanks.

Original comment by sou...@gmail.com on 18 Feb 2008 at 7:33

GoogleCodeExporter commented 9 years ago
Exception thrown: "No such luck."

Kidding.

Anyways, here's the new error report, fresh from the latest SVN head:

{{{
configure: error:  --with-pthreads specified for a system without pthread 
support
make[1]: *** [src/Makefile] Error 1
make[1]: Leaving directory `/home/klemen/Projects/jslibs/nspr'
make: *** [nspr] Error 2
}}}

Original comment by krof.drakula on 18 Feb 2008 at 8:16

GoogleCodeExporter commented 9 years ago
For this error, you can try to edit /jslibs/nspr/Makefile and remove 
--with-pthreads
Then you need to reset nspr's configuration file using the distclean target:
make distclean all copy

BTW, the build order is: js jshost jsstd nspr jsio jsobjex jssqlite jsz jscrypt 
jsdebug.
If the error is in 'nspr', perhaps you can try to run a basic test that uses 
only js
jshost jsstd. eg.
  LoadModule('jsstd');
  Print('HelloWorld');
don't forget to set LD_LIBRARY_PATH to the *.so directory

Good luck :)

Original comment by sou...@gmail.com on 18 Feb 2008 at 9:48

GoogleCodeExporter commented 9 years ago
This could be a whole lot easier with write permissions - I'll try that now to 
see if
it works.

Original comment by krof.drakula on 18 Feb 2008 at 9:53

GoogleCodeExporter commented 9 years ago
After `make distclean all copy` the following error is returned:

{{{
make[2]: Entering directory `/home/klemen/Projects/jslibs/nspr/src'
make[2]: *** No rule to make target `all'.  Stop.
make[2]: Leaving directory `/home/klemen/Projects/jslibs/nspr/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/klemen/Projects/jslibs/nspr'
make: *** [nspr] Error 2
}}}

It seems the error is in nspr after all.

Original comment by krof.drakula on 18 Feb 2008 at 9:57

GoogleCodeExporter commented 9 years ago
Just try: "make distclean" in jslibs/nspr/
and: "make clean all copy" in jslibs/

Original comment by sou...@gmail.com on 18 Feb 2008 at 10:01

GoogleCodeExporter commented 9 years ago
{{{
make[3]: Entering directory `/home/klemen/Projects/jslibs/nspr/src/config'
gcc -m32 -o now.o -c      -pipe -Wall -O3 -fPIC  -UDEBUG  -DNDEBUG=1
-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1
-D_GNU_SOURCE=1 -DHAVE_FCNTL_FILE_LOCKING=1 -DLINUX=1 -Di386=1 -D_REENTRANT=1 
-DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM   now.c
gcc -m32  now.o   -o now
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.1.3/libgcc.a 
when
searching for -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.1.3/libgcc.a 
when
searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
make[3]: *** [now] Error 1
make[3]: Leaving directory `/home/klemen/Projects/jslibs/nspr/src/config'
make[2]: *** [export] Error 2
make[2]: Leaving directory `/home/klemen/Projects/jslibs/nspr/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/klemen/Projects/jslibs/nspr'
make: *** [nspr] Error 2
}}}

Still, after setting LD_LIBRARY_PATH, I am able to run the example JS given 
previously.

Original comment by krof.drakula on 18 Feb 2008 at 10:09

GoogleCodeExporter commented 9 years ago
This error is a bit tricky for me because my knowledge in 64bits systems is 
quite
limited.
I asked a friend who suggest to do: apt-get install gcc-4.1-multilib

Original comment by sou...@gmail.com on 18 Feb 2008 at 10:32

GoogleCodeExporter commented 9 years ago
We're getting closer, I think - nspr now compiled, but sqlite3 now doesn't want 
to budge:

{{{
make[2]: Entering directory `/home/klemen/Projects/jslibs/sqlite'
rm ./opt/*
rm: cannot remove `./opt/*': No such file or directory
make[2]: [clean] Error 1 (ignored)
rmdir ./opt/
rmdir: ./opt/: No such file or directory
make[2]: [clean] Error 1 (ignored)
cd src && rm sqlite3.o libsqlite3.a
rm: cannot remove `sqlite3.o': No such file or directory
rm: cannot remove `libsqlite3.a': No such file or directory
make[2]: [clean] Error 1 (ignored)
cd src && gcc -c -o sqlite3.o -O3 sqlite3.c
sqlite3.c: In function ‘sqlite3ValueText’:
sqlite3.c:34242: warning: cast from pointer to integer of different size
sqlite3.c: In function ‘trimFunc’:
sqlite3.c:53444: warning: cast from pointer to integer of different size
sqlite3.c: In function ‘sqlite3RegisterBuiltinFunctions’:
sqlite3.c:53989: warning: cast to pointer from integer of different size
sqlite3.c:54008: warning: cast to pointer from integer of different size
sqlite3.c: In function ‘sqlite3_get_table’:
sqlite3.c:62513: warning: cast to pointer from integer of different size
sqlite3.c: In function ‘sqlite3_free_table’:
sqlite3.c:62560: warning: cast from pointer to integer of different size
cd src && ar rcs libsqlite3.a sqlite3.o
mkdir ./opt/
cp ./src/libsqlite3.a ./opt/
make[2]: Leaving directory `/home/klemen/Projects/jslibs/sqlite'
rm *.o jssqlite.so
rm: cannot remove `*.o': No such file or directory
rm: cannot remove `jssqlite.so': No such file or directory
make[1]: [clean] Error 1 (ignored)
rm ./opt/*
rm: cannot remove `./opt/*': No such file or directory
make[1]: [clean] Error 1 (ignored)
rmdir ./opt/
rmdir: ./opt/: No such file or directory
make[1]: [clean] Error 1 (ignored)
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src 
-I../sqlite/src -o
blob.o blob.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src 
-I../sqlite/src -o
database.o database.cpp
database.cpp: In function ‘JSBool Constructor(JSContext*, JSObject*, uintN, 
jsval*,
jsval*)’:
database.cpp:44: warning: NULL used in arithmetic
database.cpp:45: warning: NULL used in arithmetic
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src 
-I../sqlite/src -o
error.o error.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src 
-I../sqlite/src -o
main.o main.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src 
-I../sqlite/src -o
result.o result.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src 
-I../sqlite/src -o
stdafx.o stdafx.cpp
gcc -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti 
-felide-constructors
   -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../sqlite/src -o jssqlite.so -shared
-Wl,-soname,jssqlite.so blob.o database.o error.o main.o result.o stdafx.o
-Wl,-Bstatic ../sqlite/src/libsqlite3.a -Wl,-Bdynamic -ldl -lpthread 
-Wl,-Bdynamic
-L../js/src/Linux_All_OPT.OBJ -ljs
/usr/bin/ld: ../sqlite/src/libsqlite3.a(sqlite3.o): relocation R_X86_64_32S 
against
`a local symbol' can not be used when making a shared object; recompile with 
-fPIC
../sqlite/src/libsqlite3.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [jssqlite.so] Error 1
make[1]: Leaving directory `/home/klemen/Projects/jslibs/jssqlite'
make: *** [jssqlite] Error 2
}}}

Original comment by krof.drakula on 18 Feb 2008 at 10:45

GoogleCodeExporter commented 9 years ago
Ok, lets try follow the compiler recommendation and "recompile with -fPIC".
You can modify jslibs/sqlite/Makefile by adding a new line:
CFLAGS += -fPIC
after the line:
CC=gcc

Original comment by sou...@gmail.com on 19 Feb 2008 at 9:48

GoogleCodeExporter commented 9 years ago
Will try as soon as I get my hands back on the 64-bit Linux box. Shame I can't
install a 64-bit virtual machine on my current Vista workstation though.

Original comment by krof.drakula on 19 Feb 2008 at 7:26

GoogleCodeExporter commented 9 years ago
Sqlite3 now compiles, jsz now has errors:

{{{
make[3]: Entering directory `/home/klemen/Projects/jslibs/zlib/src'
rm -f *.o *~ example minigzip \
           libz.* foo.gz so_locations \
           _match.s maketree contrib/infback9/*.o
make[3]: Leaving directory `/home/klemen/Projects/jslibs/zlib/src'
make -C src all
make[3]: Entering directory `/home/klemen/Projects/jslibs/zlib/src'
cc -O   -c -o example.o example.c
cc -O   -c -o adler32.o adler32.c
cc -O   -c -o compress.o compress.c
cc -O   -c -o crc32.o crc32.c
cc -O   -c -o gzio.o gzio.c
cc -O   -c -o uncompr.o uncompr.c
cc -O   -c -o deflate.o deflate.c
cc -O   -c -o trees.o trees.c
cc -O   -c -o zutil.o zutil.c
cc -O   -c -o inflate.o inflate.c
cc -O   -c -o infback.o infback.c
cc -O   -c -o inftrees.o inftrees.c
cc -O   -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o 
zutil.o
inflate.o infback.o inftrees.o inffast.o
cc -O -o example example.o libz.a
cc -O   -c -o minigzip.o minigzip.c
cc -O -o minigzip minigzip.o libz.a
make[3]: Leaving directory `/home/klemen/Projects/jslibs/zlib/src'
mkdir ./opt/
cp ./src/libz.a ./opt/
make[2]: Leaving directory `/home/klemen/Projects/jslibs/zlib'
rm *.o jsz.so
rm: cannot remove `*.o': No such file or directory
rm: cannot remove `jsz.so': No such file or directory
make[1]: [clean] Error 1 (ignored)
rm ./opt/*
rm: cannot remove `./opt/*': No such file or directory
make[1]: [clean] Error 1 (ignored)
rmdir ./opt/
rmdir: ./opt/: No such file or directory
make[1]: [clean] Error 1 (ignored)
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src 
-o
main.o main.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src 
-o
stdafx.o stdafx.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src 
-o
z.o z.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src 
-o
zError.o zError.cpp
gcc -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti 
-felide-constructors
   -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src -o jsz.so -shared
-Wl,-soname,jsz.so main.o stdafx.o z.o zError.o -Wl,-Bstatic -L../zlib/src -lz
-Wl,-Bdynamic  -Wl,-Bdynamic -L../js/src/Linux_All_OPT.OBJ -ljs
/usr/bin/ld: ../zlib/src/libz.a(deflate.o): relocation R_X86_64_32S against `a 
local
symbol' can not be used when making a shared object; recompile with -fPIC
../zlib/src/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [jsz.so] Error 1
make[1]: Leaving directory `/home/klemen/Projects/jslibs/jsz'
make: *** [jsz] Error 2
}}}

Original comment by krof.drakula on 20 Feb 2008 at 6:42

GoogleCodeExporter commented 9 years ago
In jslibs/zlib/Makefile, try to add the following line:
CFLAGS += -fPIC
after
TARGET_FILES = ./src/libz.a

And btw, can you use the 'file' command on previously generated binaries ?
something like:
file /home/klemen/Projects/jslibs/*/opt/*

Thanks.

Original comment by sou...@gmail.com on 20 Feb 2008 at 9:48

GoogleCodeExporter commented 9 years ago
This is the `file` output before modifying zlib Makefile and recompiling:

{{{
/home/klemen/Projects/jslibs/jshost/opt/jshost:                    ELF 64-bit 
LSB
executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked 
(uses
shared libs), stripped
/home/klemen/Projects/jslibs/jsio/opt/jsio.so:                     ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/jsobjex/opt/jsobjex.so:               ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/js/opt/libjs.so:                      ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), not stripped
/home/klemen/Projects/jslibs/jssqlite/opt/jssqlite.so:             ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/jsstd/opt/jsstd.so:                   ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/moduleManager/opt/libmoduleManager.a: current ar 
archive
/home/klemen/Projects/jslibs/nspr/opt/libnspr4.so:                 ELF 32-bit 
LSB
shared object, Intel 80386, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/sqlite/opt/libsqlite3.a:              current ar 
archive
/home/klemen/Projects/jslibs/zlib/opt/libz.a:                      current ar 
archive
}}}

Original comment by krof.drakula on 20 Feb 2008 at 10:06

GoogleCodeExporter commented 9 years ago
Error @jsz again:

{{{
make[3]: Entering directory `/home/klemen/Projects/jslibs/zlib/src'
cc -O   -c -o example.o example.c
cc -O   -c -o adler32.o adler32.c
cc -O   -c -o compress.o compress.c
cc -O   -c -o crc32.o crc32.c
cc -O   -c -o gzio.o gzio.c
cc -O   -c -o uncompr.o uncompr.c
cc -O   -c -o deflate.o deflate.c
cc -O   -c -o trees.o trees.c
cc -O   -c -o zutil.o zutil.c
cc -O   -c -o inflate.o inflate.c
cc -O   -c -o infback.o infback.c
cc -O   -c -o inftrees.o inftrees.c
cc -O   -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o 
zutil.o
inflate.o infback.o inftrees.o inffast.o
cc -O -o example example.o libz.a
cc -O   -c -o minigzip.o minigzip.c
cc -O -o minigzip minigzip.o libz.a
make[3]: Leaving directory `/home/klemen/Projects/jslibs/zlib/src'
mkdir ./opt/
cp ./src/libz.a ./opt/
make[2]: Leaving directory `/home/klemen/Projects/jslibs/zlib'
rm *.o jsz.so
rm: cannot remove `jsz.so': No such file or directory
make[1]: [clean] Error 1 (ignored)
rm ./opt/*
rm: cannot remove `./opt/*': No such file or directory
make[1]: [clean] Error 1 (ignored)
rmdir ./opt/
rmdir: ./opt/: No such file or directory
make[1]: [clean] Error 1 (ignored)
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src 
-o
main.o main.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src 
-o
stdafx.o stdafx.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src 
-o
z.o z.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors    -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src 
-o
zError.o zError.cpp
gcc -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti 
-felide-constructors
   -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../zlib/src -o jsz.so -shared
-Wl,-soname,jsz.so main.o stdafx.o z.o zError.o -Wl,-Bstatic -L../zlib/src -lz
-Wl,-Bdynamic  -Wl,-Bdynamic -L../js/src/Linux_All_OPT.OBJ -ljs
/usr/bin/ld: ../zlib/src/libz.a(deflate.o): relocation R_X86_64_32S against `a 
local
symbol' can not be used when making a shared object; recompile with -fPIC
../zlib/src/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [jsz.so] Error 1
make[1]: Leaving directory `/home/klemen/Projects/jslibs/jsz'
make: *** [jsz] Error 2
}}}

Original comment by krof.drakula on 20 Feb 2008 at 10:15

GoogleCodeExporter commented 9 years ago
No solution for the moment but I'm working on this case.
btw, jsz is an optional module, then you can try to edit jslibs/Makefile and
temporary remove it from the list.

About the 'file' result:
"/nspr/opt/libnspr4.so: ELF 32-bit LSB shared object, Intel 80386, version 1 
(SYSV),
stripped"
It seems that nspr has been built in 32-bits. I have made some modifications in 
the
build script. Can you update your SVN working copy and do:
make clean distclean all copy
then check if nspr is ELF 64-bit LSB.
Thanks

Original comment by sou...@gmail.com on 20 Feb 2008 at 8:45

GoogleCodeExporter commented 9 years ago
No luck, nspr craps out again:

{{{
make[4]: Entering directory `/home/klemen/Projects/jslibs/nspr/src/pr/tests/dll'
rm -rf  dist ./libmy.so ./mygetval.o ./mysetval.o   LOGS TAGS ./.md core 
/no-such-file so_locations Makefile
make[4]: Leaving directory `/home/klemen/Projects/jslibs/nspr/src/pr/tests/dll'
make[3]: Leaving directory `/home/klemen/Projects/jslibs/nspr/src/pr/tests'
rm -f config/autoconf.mk
rm -f `cat unallmakefiles` unallmakefiles
make[2]: Leaving directory `/home/klemen/Projects/jslibs/nspr/src'
make -C src all
make[2]: Entering directory `/home/klemen/Projects/jslibs/nspr/src'
make[2]: *** No rule to make target `all'.  Stop.
make[2]: Leaving directory `/home/klemen/Projects/jslibs/nspr/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/klemen/Projects/jslibs/nspr'
make: *** [nspr] Error 2
}}}

Original comment by krof.drakula on 21 Feb 2008 at 6:53

GoogleCodeExporter commented 9 years ago
I just checked out a fresh copy and removed jsz from jslibs/Makefile and ran 
`make
all` to be sure none of my changes interfered with the current SVN version - 
same error.

Original comment by krof.drakula on 21 Feb 2008 at 7:10

GoogleCodeExporter commented 9 years ago
Oh wait... forgot to run `make distclean` on nspr beforehand, nspr compiles 
fine -
now I've got an error with jscrypt:

{{{
make[3]: Leaving directory `/home/klemen/Projects/jslibs/libtomcrypt/src'
mkdir ./opt/
cp ./src/libtomcrypt.a ./opt/
make[2]: Leaving directory `/home/klemen/Projects/jslibs/libtomcrypt'
rm *.o jscrypt.so
rm: cannot remove `*.o': No such file or directory
rm: cannot remove `jscrypt.so': No such file or directory
make[1]: [clean] Error 1 (ignored)
rm ./opt/*
rm: cannot remove `./opt/*': No such file or directory
make[1]: [clean] Error 1 (ignored)
rmdir ./opt/
rmdir: ./opt/: No such file or directory
make[1]: [clean] Error 1 (ignored)
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors  -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src
-I../libtommath/src -I../libtomcrypt/src/src/headers -o crypt.o crypt.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors  -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src
-I../libtommath/src -I../libtomcrypt/src/src/headers -o cryptError.o 
cryptError.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors  -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src
-I../libtommath/src -I../libtomcrypt/src/src/headers -o hash.o hash.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors  -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src
-I../libtommath/src -I../libtomcrypt/src/src/headers -o main.o main.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors  -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src
-I../libtommath/src -I../libtomcrypt/src/src/headers -o misc.o misc.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors  -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src
-I../libtommath/src -I../libtomcrypt/src/src/headers -o prng.o prng.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors  -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src
-I../libtommath/src -I../libtomcrypt/src/src/headers -o rsa.o rsa.cpp
gcc -c -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors  -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src
-I../libtommath/src -I../libtomcrypt/src/src/headers -o stdafx.o stdafx.cpp
gcc -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti 
-felide-constructors
 -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src -I../libtommath/src
-I../libtomcrypt/src/src/headers -o jscrypt.so -shared -Wl,-soname,jscrypt.so 
crypt.o
cryptError.o hash.o main.o misc.o prng.o rsa.o stdafx.o -Wl,-Bstatic
../libtomcrypt/src/libtomcrypt.a ../libtommath/src/libtommath.a -Wl,-Bdynamic 
-Wl,-Bdynamic -L../js/src/Linux_All_OPT.OBJ -ljs
/usr/bin/ld: ../libtomcrypt/src/libtomcrypt.a(chc.o): relocation R_X86_64_32S 
against
`cipher_descriptor' can not be used when making a shared object; recompile with 
-fPIC
../libtomcrypt/src/libtomcrypt.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [jscrypt.so] Error 1
make[1]: Leaving directory `/home/klemen/Projects/jslibs/jscrypt'
make: *** [jscrypt] Error 2
}}}

`file` outputs the following now:

{{{
/home/klemen/Projects/jslibs/jshost/opt/jshost:                    ELF 64-bit 
LSB
executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked 
(uses
shared libs), stripped
/home/klemen/Projects/jslibs/jsio/opt/jsio.so:                     ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/jsobjex/opt/jsobjex.so:               ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/js/opt/libjs.so:                      ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/jssqlite/opt/jssqlite.so:             ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/jsstd/opt/jsstd.so:                   ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/libtomcrypt/opt/libtomcrypt.a:        current ar 
archive
/home/klemen/Projects/jslibs/libtommath/opt/libtommath.a:          current ar 
archive
/home/klemen/Projects/jslibs/moduleManager/opt/libmoduleManager.a: current ar 
archive
/home/klemen/Projects/jslibs/nspr/opt/libnspr4.so:                 ELF 32-bit 
LSB
shared object, Intel 80386, version 1 (SYSV), stripped
/home/klemen/Projects/jslibs/sqlite/opt/libsqlite3.a:              current ar 
archive
}}}

Original comment by krof.drakula on 21 Feb 2008 at 7:25

GoogleCodeExporter commented 9 years ago
Sorry, I forget to ask you to use the new option BITS=64 :
make clean distclean all copy BITS=64
and after doing that, "file /home/klemen/Projects/jslibs/nspr/opt/libnspr4.so" 
should
display ELF 64-bit LSB.

For jscrypt, in files libtomcrypt/Makefile and libtommath/Makefile try add the 
line:
CFLAGS += -fPIC
after :
TARGET_FILES = ...

Original comment by sou...@gmail.com on 21 Feb 2008 at 9:15

GoogleCodeExporter commented 9 years ago
Adding CFLAGS after TARGET_FILES does not make a difference when compiling
libtmocrypt, maybe because CFLAGS are set in all::

Original comment by krof.drakula on 21 Feb 2008 at 11:15

GoogleCodeExporter commented 9 years ago
Here's the error when compiling the libtomcrypt:

{{{
gcc -fPIC -Wall -O3 -s -funroll-loops -fpic -fno-exceptions -fno-rtti
-felide-constructors  -DLTM_DESC  -I../js/src/Linux_All_OPT.OBJ -I../js/src
-I../libtommath/src -I../libtomcrypt/src/src/headers -o jscrypt.so -shared
-Wl,-soname,jscrypt.so crypt.o cryptError.o hash.o main.o misc.o prng.o rsa.o
stdafx.o -Wl,-Bstatic ../libtomcrypt/src/libtomcrypt.a 
../libtommath/src/libtommath.a
-Wl,-Bdynamic  -Wl,-Bdynamic -L../js/src/Linux_All_OPT.OBJ -ljs
/usr/bin/ld: ../libtommath/src/libtommath.a(bn_mp_init.o): relocation 
R_X86_64_32
against `a local symbol' can not be used when making a shared object; recompile 
with
-fPIC
../libtommath/src/libtommath.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [jscrypt.so] Error 1
make[1]: Leaving directory `/home/klemen/Projects/jslibs/jscrypt'
make: *** [jscrypt] Error 2
}}}

Original comment by krof.drakula on 21 Feb 2008 at 1:05

GoogleCodeExporter commented 9 years ago
Now I have to find a Linux 64-bit box somewhere to continue the tests myself.
The good new is that main binaries (jshost, jsstd, jsio) build fine in 64-bit.

(btw, just tell me if nspr produce ELF 64-bit LSB binaries after using the 
BITS=64
option.)

Thanks a lot for your help and your patience.

Original comment by sou...@gmail.com on 22 Feb 2008 at 11:33

GoogleCodeExporter commented 9 years ago
Yes, nspr did compile as a 64-bit shared object:

/home/klemen/Projects/jslibs/nspr/opt/libnspr4.so:                 ELF 64-bit 
LSB
shared object, x86-64, version 1 (SYSV), stripped

Original comment by krof.drakula on 22 Feb 2008 at 12:00

GoogleCodeExporter commented 9 years ago
BTW, I'd love to hear if and when you get it to compile - I'm eager to use this 
on my
Linux 64 box.

Original comment by krof.drakula on 22 Feb 2008 at 12:27

GoogleCodeExporter commented 9 years ago
I'm in the same boat with x86_64 and gcc 4.3, I suspect gcc 4.3s stricter 
checking is
also not helping.

==> Starting build()...                                                  
make -C libs/js all copy BUILD=opt                                       
make[1]: Entering directory `/home/abs/local/eth-
diff -q ./jsconfig.h ./src/jsconfig.h || cp ./jsconfig.h ./src/                 

mkdir ./opt/                                                                    

make -C src/jshost all copy BUILD=opt                                           

make[1]: Entering directory `/home/abs/local/eth-
make -w --jobserver-fds=6,7 -j -C ../host/ -f Makefile all copy                 

cp ./src/Linux_All_OPT.OBJ/libjs.so ./opt/                                      

Files ./jsconfig.h and ./src/jsconfig.h differ                                  

cp: cannot stat `./src/Linux_All_OPT.OBJ/libjs.so': No such file or directory   

make[1]: *** [copy] Error 1                                                     

make -C src/jsstd all copy BUILD=opt                                            

make[1]: *** Waiting for unfinished jobs....                                    

make[1]: Leaving directory `/home/abs/local/eth-
make: *** [libs/js] Error 2                                                     

make -w --jobserver-fds=6,7 -j -C ../jslang/ -f Makefile all copy               

make: *** Waiting for unfinished jobs....                                       

make[2]: Entering directory `/home/abs/local/eth-
gcc -c -march=x86-64 -mtune=generic -O2 -pipe -fPIC -m64 -Wall -O3 -s 
-funroll-loops
-m64 -fno-exceptions -fno-rtti -felide-constructors  -Wall -O3 -s 
-funroll-loops -m64
-fno-exceptions -fno-rtti -felide-constructors    -
make[2]: Entering directory `/home/abs/local/eth-
gcc -c -march=x86-64 -mtune=generic -O2 -pipe -fPIC -m64 -Wall -O3 -s 
-funroll-loops
-m64 -fno-exceptions -fno-rtti -felide-constructors  -Wall -O3 -s 
-funroll-loops -m64
-fno-exceptions -fno-rtti -felide-constructors    -
make[1]: Entering directory `/home/abs/local/eth-
gcc -c -march=x86-64 -mtune=generic -O2 -pipe -fPIC -m64 -Wall -O3 -s 
-funroll-loops
-fpic -m64 -fno-exceptions -fno-rtti -felide-constructors    -
In file included from ../../libs/js/src/jspubtd.h:45,                           

                 from ../../libs/js/src/jsapi.h:48,                                                                                                                         
                 from stdafx.h:10,                                                                                                                                          
                 from buffer.cpp:24:                                                                                                                                        
../../libs/js/src/jstypes.h:249:66: error: jsautocfg.h: No such file or 
directory                                                                       

../../libs/js/src/jstypes.h:267:3: error: #error No suitable type for 
JSInt8/JSUint8                                                                  

../../libs/js/src/jstypes.h:280:3: error: #error No suitable type for
JSInt16/JSUint16                                                                

../../libs/js/src/jstypes.h:300:3: error: #error No suitable type for
JSInt32/JSUint32                                                                

../../libs/js/src/jstypes.h:355:3: error: #error 'sizeof(int)' not sufficient 
for
platform use                                                                    

In file included from ../../libs/js/src/jspubtd.h:45,                           

                 from ../../libs/js/src/jsapi.h:48,                                                                                                                         
                 from stdafx.h:11,                                                                                                                                          
                 from bstring.cpp:15:                                                                                                                                       
../../libs/js/src/jstypes.h:249:66: error: jsautocfg.h: No such file or 
directory                                                                       

../../libs/js/src/jstypes.h:267:3: error: #error No suitable type for 
JSInt8/JSUint8                                                                  

etcetera

Oh, I've got a 32bit build chroot and it also gets something similar...

make[2]: Entering directory `/home/abs/local/eth-
gcc -c -march=i686 -mtune=generic -O2 -pipe -Wall -O3 -s -funroll-loops -m32 
-fno-
exceptions -fno-rtti -felide-constructors    
-I../../libs/js/src/Linux_All_OPT.OBJ -
make -C src/jsstd all copy BUILD=opt
make[1]: Entering directory `/home/abs/local/eth-
gcc -c -march=i686 -mtune=generic -O2 -pipe -Wall -O3 -s -funroll-loops -fpic 
-m32 -
I../../libs/js/src/Linux_All_OPT.OBJ -I../../libs/js/src  -o buffer.o buffer.cpp
Files ./jsconfig.h and ./src/jsconfig.h differ
In file included from ../../libs/js/src/jspubtd.h:45,
                 from ../../libs/js/src/jsapi.h:48,
                 from stdafx.h:10,
                 from buffer.cpp:24:
../../libs/js/src/jstypes.h:249:66: error: jsautocfg.h: No such file or 
directory
../../libs/js/src/jstypes.h:267:3: error: #error No suitable type for 
JSInt8/JSUint8

etcetera

Original comment by mconstable on 9 Jun 2008 at 12:45

GoogleCodeExporter commented 9 years ago
Ok, try to SVN update your jslibs/libs/js/Makefile then clean and make all 
again. I
am trying to force 32bit by default for spidermonkey.

Original comment by sou...@gmail.com on 9 Jun 2008 at 1:26

GoogleCodeExporter commented 9 years ago
Compilation still fails with the following error:

----------------------
make[3]: Entering directory `/home/klemen/Projects/jslibs/libs/js/src'
make[3]: Circular jscpucfg.h <- Linux_All_OPT.OBJ/jsautocfg.h dependency 
dropped.
gcc -o Linux_All_OPT.OBJ/jscpucfg.o -c -Wall -Wno-format -MMD -Os -DXP_UNIX 
-DSVR4
-DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DHAVE_VA_COPY
-DVA_COPY=va_copy -DPIC -fPIC  -UDEBUG -DNDEBUG -UDEBUG_klemen -DEDITLINE
-ILinux_All_OPT.OBJ -O3 -m32 jscpucfg.c
gcc -o Linux_All_OPT.OBJ/jscpucfg Linux_All_OPT.OBJ/jscpucfg.o
/usr/bin/ld: i386 architecture of input file `Linux_All_OPT.OBJ/jscpucfg.o' is
incompatible with i386:x86-64 output
collect2: ld returned 1 exit status
make[3]: *** [Linux_All_OPT.OBJ/jscpucfg] Error 1
make[3]: Leaving directory `/home/klemen/Projects/jslibs/libs/js/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/klemen/Projects/jslibs/libs/js/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/klemen/Projects/jslibs/libs/js'
make: *** [libs/js] Error 2
----------------------

Original comment by krof.drakula on 9 Jul 2008 at 7:58

GoogleCodeExporter commented 9 years ago
This is r1797

Original comment by krof.drakula on 9 Jul 2008 at 7:59

GoogleCodeExporter commented 9 years ago
*** I am looking for a Linux 64bit shell account. Who can help me ? ***

Original comment by sou...@gmail.com on 9 May 2009 at 9:16

GoogleCodeExporter commented 9 years ago
I may be able to help you here, please contact me at gasper.kozak gmail.

Original comment by gasper.kozak on 9 May 2009 at 10:52

GoogleCodeExporter commented 9 years ago

Original comment by sou...@gmail.com on 2 Jun 2011 at 10:46