jackxiao / jslibs

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

#define compilation problems with ubuntu intrepid g++ 4.3.2 #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to compile on Ubuntu Linux, I get this error:

../common/jsHelper.h: In function ‘JSBool JL_CallFunction(JSContext*,
JSObject*, jsval, jsval*, uintN, ...)’:
../common/jsHelper.h:540: error: expected primary-expression before ‘)’ 
token
../common/jsHelper.h:545: error: expected primary-expression before ‘)’ 
token
../common/jsHelper.h: In function ‘JSBool JL_CallFunctionName(JSContext*,
JSObject*, const char*, jsval*, uintN, ...)’:
../common/jsHelper.h:559: error: expected primary-expression before ‘)’ 
token

etc.

I'm using   g++ (Ubuntu 4.3.2-1ubuntu12) 4.3.2
on Linux 2.6.27.18 x86_64 GNU/Linux  Ubuntu Intrepid

It seems the problem lies in the #define of JL_REPORT_ERROR  and  JL_S_ASSERT

any ideas what this could be?

looking forward to trying out jslib.

Original issue reported on code.google.com by augustbl...@gmail.com on 5 Sep 2009 at 9:46

GoogleCodeExporter commented 9 years ago
Thanks for reporting the errors.
This is only minor compilation issues. Modifications has just been commited in 
the trunk.
You can try to update jslibs and compile again.

Original comment by sou...@gmail.com on 5 Sep 2009 at 10:10

GoogleCodeExporter commented 9 years ago

ok.  thanks.  that was quick.

other issues I've found:

libjpeg expects "./libtool" in  libs/libjpeg/Linux_opt_64/  
  edit Makefile to use libtool instead of ./libtool

libpng says it needs to be built with -fPIC

make[2]: Leaving directory `/home/august/down/jslibs-read-only/libs/libjpeg'
gcc -Wall -O3 -s -funroll-loops -I../../libs/js/Linux_opt_64/ 
-I../../libs/js/src
-m64 -fPIC -I../../libs/zlib/src -I../../libs/libpng/src
-I../../libs/libjpeg/Linux_opt_64/ -I../../libs/libjpeg/src  -fno-exceptions
-fno-rtti -felide-constructors -fpic -o Linux_opt_64/jsimage.so -shared
-Wl,-soname,Linux_opt_64/jsimage.so Linux_opt_64/image.o Linux_opt_64/main.o
Linux_opt_64/static.o Linux_opt_64/stdafx.o -Wl,-Bstatic
../../libs/libpng/Linux_opt_64/.libs/libpng.a
../../libs/libjpeg/Linux_opt_64/.libs/libjpeg.a 
../../libs/zlib/Linux_opt_64/libz.a
-Wl,-Bdynamic -ldl -lpthread -Wl,-Bdynamic -L../../libs/js/Linux_opt_64/ -lmozjs
/usr/bin/ld: ../../libs/libjpeg/Linux_opt_64/.libs/libjpeg.a(jdapimin.o): 
relocation
R_X86_64_32S against `a local symbol' can not be used when making a shared 
object;
recompile with -fPIC
../../libs/libjpeg/Linux_opt_64/.libs/libjpeg.a: could not read symbols: Bad 
value
collect2: ld returned 1 exit status
make[1]: *** [Linux_opt_64/jsimage.so] Error 1
make[1]: Leaving directory `/home/august/down/jslibs-read-only/src/jsimage'
make: *** [src/jsimage] Error 2

Original comment by augustbl...@gmail.com on 5 Sep 2009 at 11:12

GoogleCodeExporter commented 9 years ago
jslibs 64bit port is not finished yet. 
You can try to edit jslibs/Makefile and to remove, from SUBDIRS list, modules 
that
doesn't compile.
Note that you can run "make all" then "make copy" even if all module has not 
been
compiled.

Original comment by sou...@gmail.com on 5 Sep 2009 at 11:43