How can I set ccshared=-fPIC while executing ./configure?

后端 未结 9 708
北荒
北荒 2021-02-02 10:56

I am trying to build Python 2.6 for QGIS on RHEL 5. During the making of QGIS I get the following error:

Linking CXX shared library libqgispython.so
/usr/bin/ld:         


        
相关标签:
9条回答
  • 2021-02-02 11:54

    As noted elsewhere, running configure with --enable-shared should cause -fPIC to be included in the compiler flags. However, you may still see the "could not read symbols" error if you attempt to do a parallel build using, e.g., 'make -j8'. I had this same error on RHEL 5.2 and it only went away when I removed the '-j8' from my make invocation...

    0 讨论(0)
  • 2021-02-02 11:54

    Isn't that CCFLAGS? (Haven't been that side of the world for a while.)

    0 讨论(0)
  • 2021-02-02 11:56

    rebuilt the openssl with ./config --prefix=/software/bea/openssl/100c --openssldir=/software/bea/openssl/100c/ssl shared -fPIC

    and then also it dint work. it gave /usr/bin/ld: links failed. The we modifed the linking part in make file previously it was gcc -Wall -shared -o pwutil.so asciihex.o base64.o bitutils.o dict.o gen_rand.o key_schedule.o md5c.o pdg2_ecb.o pwutils.o random_data.o hexutils.o des3crypt.o blowcrypt.o /software/bea/openssl/1.0.0c/lib/libcrypto.a

    we changed libcrypto.a to libcrypto.so after rebuilding with shared option and - fPIC

    gcc -Wall -shared -o pwutil.so asciihex.o base64.o bitutils.o dict.o gen_rand.o key_schedule.o md5c.o pdg2_ecb.o pwutils.o random_data.o hexutils.o des3crypt.o blowcrypt.o /software/bea/openssl/1.0.0c/lib/libcrypto.so

    and it worked

    0 讨论(0)
提交回复
热议问题