0

I'm trying to compile pypy on RHEL 6.6 and get the following mess of errors. I know it's a lot but here is the relevant information. It seems to get through the translation phase and tries to compile the C code:

[translation:ERROR]     /usr/bin/ld: /usr/lib/libexpat.a(xmlparse.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC                                                                                                                                                                                         
[translation:ERROR]     /usr/lib/libexpat.a: could not read symbols: Bad value                                                                                                       
[translation:ERROR]     collect2: error: ld returned 1 exit status                                                                                                                           
[translation:ERROR]     make: *** [libpypy-c.so] Error 1 

So I guess this becomes a question of how do i do the recompile with -fPIC? How do I pass the flag from the rpython call?

starflyer
  • 484
  • 1
  • 11
  • 23
  • That's warnings only. The error would be at the end. – Armin Rigo Jan 21 '15 at 06:03
  • Thanks. Looked for the error and found it. – starflyer Jan 21 '15 at 17:53
  • I *think* the issue to be that libexpat.a is not a .so file, but a .a which cannot be used when building any .so (like libpypy-c.so). You need to have libexpat.so first, I think. I certainly see on my Ubuntu system that it has both /usr/lib/libexpat.a and /usr/lib/libexpat.so... (The error message from gcc is confusing, because we are passing -fPIC. I think what it means is that you should recompile *libexpat* with this flag, which is normally what you get in libexpat.so.) – Armin Rigo Jan 21 '15 at 22:18
  • Ok. thanks. i'm using my own copy of libexpat on a system i don't have root access to. I'm not sure why the libexpat.so didn't install but reinstalling now. – starflyer Jan 22 '15 at 02:54

0 Answers0