Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thebigbad opened this issue Mar 3, 2013 · 2 comments

Comments

@thebigbad
Copy link

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
Copy link
Author

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

@pete
Copy link
Owner

pete commented Mar 3, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants