iriscouch / build-couchdb

Batteries-included CouchDB build system
227 stars 36 forks source link

"Recompile with -fPIC" error #33

Open natevw opened 12 years ago

natevw commented 12 years ago

I'm trying to get a more recent CouchDB build going on an EC2 instance (ami-af93cdea) again. It's dying towards the end of SpiderMonkey compilation for lack of position independent code:

/usr/bin/python2.6 /home/ec2-user/build-couchdb/dependencies/spidermonkey/js/src/config/pythonpath.py -I./config /home/ec2-user/build-couchdb/dependencies/spidermonkey/js/src/config/expandlibs_exec.py --extract -- ar cr libjs_static.a jsalloc.o jsanalyze.o jsapi.o jsarena.o jsarray.o jsatom.o jsbool.o jsclone.o jscntxt.o jscompartment.o jsdate.o jsdbgapi.o jsdhash.o jsdtoa.o jsemit.o jsexn.o jsfriendapi.o jsfun.o jsgc.o jsgcmark.o jsgcchunk.o jsgcstats.o jshash.o jsinterp.o jsinvoke.o jsiter.o jslock.o jslog2.o jsmath.o jsnativestack.o jsnum.o jsobj.o json.o jsonparser.o jsopcode.o jsparse.o jsproxy.o jsprf.o jsprobes.o jspropertycache.o jspropertytree.o jsreflect.o jsregexp.o jsscan.o jsscope.o jsscript.o jsstr.o jstypedarray.o jsutil.o jsweakmap.o jswrapper.o jsxdrapi.o jsxml.o prmjtime.o sharkctl.o GlobalObject.o Stack.o jstracer.o Assembler.o Allocator.o CodeAlloc.o Containers.o Fragmento.o LIR.o njconfig.o RegAlloc.o avmplus.o NativeX64.o jsbuiltins.o VMPI.o Writer.o MethodJIT.o StubCalls.o Compiler.o FrameState.o FastArithmetic.o FastOps.o StubCompiler.o MonoIC.o PolyIC.o ImmutableSync.o InvokeHelpers.o Retcon.o TrampolineCompiler.o checks.o conversions.o diy-fp.o v8-dtoa.o fast-dtoa.o platform.o utils.o Assertions.o ExecutableAllocatorPosix.o ExecutableAllocatorWin.o ExecutableAlloc/usr/bin/ld: MethodJIT.o: relocation R_X86_64_PC32 against symbol `JaegerTrampolineReturn' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libmozjs.so] Error 1
make: *** [default] Error 2
git checkout HEAD configure.in
git clean -df .
rake aborted!
Command failed with status (2): [make ...]

The odd thing is that most of the compile lines I see in the build log (https://gist.github.com/1878200) include -fPIC...any idea what might be going on? (I haven't updated gcc/make/libtool/etc. since the last time I built CouchDB a while back, I'll retry once more with those upgraded but kind of running out of steam here...)

natevw commented 12 years ago

Did the yum update/upgrade thing, and still getting the same failure when it goes to link SpiderMonkey.

bak1an commented 11 years ago

i have same issue on rhel 5

ghost commented 10 years ago

solve this problem on rhel 5.9 via

yum install -y gcc44 gcc44-c++ 
CC=gcc44 CXX=g++44 ./configure
make && make install