linker error: libjs.a
Error Message
ld -shared build/nodepos.o build/pyspidermonkey.o -Lspidermonkey/src/build -ljs -o build/pyspidermonkey.so ld: spidermonkey/src/build/libjs.a(jsapi.o): relocation R_X86_64_32S against `js_XMLObjectOps' can not be used when making a shared object; recompile with -fPIC spidermonkey/src/build/libjs.a: could not read symbols: Bad value
My System
Ubuntu 10.04 LTS Linux GranImmobi 2.6.32-40-generic #87-Ubuntu SMP Tue Mar 6 00:56:56 UTC 2012 x86_64 GNU/Linux
Patch
diff --git a/spidermonkey/src/Makefile b/spidermonkey/src/Makefile
index b809650..9698834 100644
--- a/spidermonkey/src/Makefile
+++ b/spidermonkey/src/Makefile
@@ -41,7 +41,7 @@ OBJECTS = $(CSRCS:%.c=$(BUILDDIR)/%.o)
CFLAGS += -Wall -Wno-format -O
CPPFLAGS += -DXP_UNIX -O -DXP_UNIX -DSVR4 -DSYSV -DSOLARIS
-DHAVE_LOCALTIME_R -UDEBUG -DNDEBUG -UDEBUG_dap -DEDITLINE \
- -I$(BUILDDIR)
- -I$(BUILDDIR) -fPIC
all: $(BUILDDIR)/libjs.a
I'd suggest trying again with the latest master, as we just made some build changes and I was able to build and run under Linux.