pez icon indicating copy to clipboard operation
pez copied to clipboard

make fails with /usr/local/lib/libtcc.a: could not read symbols: Bad value

Open thebigbad opened this issue 13 years ago • 2 comments

Environment

Amazon Linux AMI x86_64 tcc version 0.9.26

Steps to repro

  1. clone repo, cd instal repo
  2. ./autogen.sh
  3. ./configure
  4. make

Make fails with the error:

/bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2   -o libpez.la -rpath /usr/local/lib pez.lo st.lo  -ltcc -lgc -ldl -lm 
libtool: link: gcc -shared  .libs/pez.o .libs/st.o   -ltcc -lgc -ldl -lm    -Wl,-soname -Wl,libpez.so.0 -o .libs/libpez.so.0.0.0
/usr/bin/ld: /usr/local/lib/libtcc.a(libtcc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libtcc.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libpez.la] Error 1

thebigbad avatar Mar 03 '13 07:03 thebigbad

autogen.sh suggested installing libtoolize if the build failed, so I tried installing that and then starting over from step one. same result.

thebigbad avatar Mar 03 '13 07:03 thebigbad

The problem seems to be in the way libtcc was built. Adding "-DPIC -fPIC" to the CFLAGS when building libtcc ought to fix it.

0.9.26 is finally out as of a couple of weeks ago; I think there are API changes, but when I get the time I'll try to see how well Pez does with the new version. 0.9.26 does (among other things) a better job with x86-64 and ARM.

pete avatar Mar 03 '13 17:03 pete