在make一个软件的时候出了这种错误

lanshs 2014-10-22 04:19:35
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(ex_data.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libcrypto.a: error adding symbols: 错误的值
collect2: error: ld returned 1 exit status
make[2]: *** [common/libcommon.so] 错误 1
make[1]: *** [common/CMakeFiles/common.dir/all] 错误 2
make: *** [all] 错误 2

软件:crtmpserver

开始cmake时出现找不到什么head,装了openssl0.9.8t后cmake完成,然后make到20%报错,这回我不知道怎么继续了
...全文
2024 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
引用 7 楼 lanshs 的回复:
[quote=引用 6 楼 micropentium6 的回复:] [quote=引用 5 楼 lanshs 的回复:] [quote=引用 4 楼 micropentium6 的回复:] [quote=引用 2 楼 awsqsh 的回复:] 动态库的时候 gcc -fPIC -shared XXXXX -o *.so 将.c 编译成.o 的时候也要加-fPIC
The really problem is: there is no shared library available for libcrypto.so /usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(ex_data.o) I don't think a static object archival requires -fPIC... So the issue is where is your libcrypto.so, if the ssl was compiled by user, why shared library is missing?[/quote] I don't know what you write.最好写中文,我英文不好,见谅[/quote] did you compile ssl? if yes, re-compile it and make sure libcrypto is compiled as a shared library if no, find where libcrypto.so is and feed its path to configure... [/quote] cd openssl-0.9.8t make make install I had do that. I can not sure it is true.[/quote] try to rebuild openssl #./config shared #make #make install Then run configure to build whatever software you were building...
lanshs 2014-10-22
  • 打赏
  • 举报
回复
引用 7 楼 lanshs 的回复:
[quote=引用 6 楼 micropentium6 的回复:] [quote=引用 5 楼 lanshs 的回复:] [quote=引用 4 楼 micropentium6 的回复:] [quote=引用 2 楼 awsqsh 的回复:] 动态库的时候 gcc -fPIC -shared XXXXX -o *.so 将.c 编译成.o 的时候也要加-fPIC
The really problem is: there is no shared library available for libcrypto.so /usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(ex_data.o) I don't think a static object archival requires -fPIC... So the issue is where is your libcrypto.so, if the ssl was compiled by user, why shared library is missing?[/quote] I don't know what you write.最好写中文,我英文不好,见谅[/quote] did you compile ssl? if yes, re-compile it and make sure libcrypto is compiled as a shared library if no, find where libcrypto.so is and feed its path to configure... [/quote] cd openssl-0.9.8t make make install I had do that. I can not sure it is true.[/quote] ./config --prefix=/usr/local/ssl shared zlib-dynamic enable-camellia I take it. Thank.
lanshs 2014-10-22
  • 打赏
  • 举报
回复
引用 6 楼 micropentium6 的回复:
[quote=引用 5 楼 lanshs 的回复:] [quote=引用 4 楼 micropentium6 的回复:] [quote=引用 2 楼 awsqsh 的回复:] 动态库的时候 gcc -fPIC -shared XXXXX -o *.so 将.c 编译成.o 的时候也要加-fPIC
The really problem is: there is no shared library available for libcrypto.so /usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(ex_data.o) I don't think a static object archival requires -fPIC... So the issue is where is your libcrypto.so, if the ssl was compiled by user, why shared library is missing?[/quote] I don't know what you write.最好写中文,我英文不好,见谅[/quote] did you compile ssl? if yes, re-compile it and make sure libcrypto is compiled as a shared library if no, find where libcrypto.so is and feed its path to configure... [/quote] cd openssl-0.9.8t make make install I had do that. I can not sure it is true.
  • 打赏
  • 举报
回复
引用 5 楼 lanshs 的回复:
[quote=引用 4 楼 micropentium6 的回复:] [quote=引用 2 楼 awsqsh 的回复:] 动态库的时候 gcc -fPIC -shared XXXXX -o *.so 将.c 编译成.o 的时候也要加-fPIC
The really problem is: there is no shared library available for libcrypto.so /usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(ex_data.o) I don't think a static object archival requires -fPIC... So the issue is where is your libcrypto.so, if the ssl was compiled by user, why shared library is missing?[/quote] I don't know what you write.最好写中文,我英文不好,见谅[/quote] did you compile ssl? if yes, re-compile it and make sure libcrypto is compiled as a shared library if no, find where libcrypto.so is and feed its path to configure...
lanshs 2014-10-22
  • 打赏
  • 举报
回复
引用 4 楼 micropentium6 的回复:
[quote=引用 2 楼 awsqsh 的回复:] 动态库的时候 gcc -fPIC -shared XXXXX -o *.so 将.c 编译成.o 的时候也要加-fPIC
The really problem is: there is no shared library available for libcrypto.so /usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(ex_data.o) I don't think a static object archival requires -fPIC... So the issue is where is your libcrypto.so, if the ssl was compiled by user, why shared library is missing?[/quote] I don't know what you write.最好写中文,我英文不好,见谅
  • 打赏
  • 举报
回复
引用 2 楼 awsqsh 的回复:
动态库的时候 gcc -fPIC -shared XXXXX -o *.so 将.c 编译成.o 的时候也要加-fPIC
The really problem is: there is no shared library available for libcrypto.so /usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(ex_data.o) I don't think a static object archival requires -fPIC... So the issue is where is your libcrypto.so, if the ssl was compiled by user, why shared library is missing?
lanshs 2014-10-22
  • 打赏
  • 举报
回复
引用 2 楼 awsqsh 的回复:
动态库的时候 gcc -fPIC -shared XXXXX -o *.so 将.c 编译成.o 的时候也要加-fPIC
新手看不懂,再详细些。我明天用这软件
awsqsh 2014-10-22
  • 打赏
  • 举报
回复
动态库的时候 gcc -fPIC -shared XXXXX -o *.so 将.c 编译成.o 的时候也要加-fPIC
awsqsh 2014-10-22
  • 打赏
  • 举报
回复
修改makefile 编译动态库的时候 gcc --fPIC -shared XXXXX -o XX XXXX

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧