final link failed: Nonrepresentable section on output
Posted shawn-meng
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了final link failed: Nonrepresentable section on output相关的知识,希望对你有一定的参考价值。
编译live555的时候遇到了这个问题,前面的编译没有问题,是在链接的时候出现的,在网上搜索说是缺少 libstdc++ 库。于是,安装之
#sudo apt-get install libstdc++-dev
[email protected]:~/work/live555-master_1$ sudo apt-get install libstdc++-dev [sudo] password for shawn: Reading package lists... Done Building dependency tree Reading state information... Done Package libstdc++-dev is a virtual package provided by: libstdc++-8-dev 8.2.0-1ubuntu2~18.04 libstdc++-7-dev 7.3.0-27ubuntu1~18.04 libstdc++-6-dev 6.4.0-17ubuntu1 libstdc++-5-dev 5.5.0-12ubuntu1 libstdc++-4.8-dev 4.8.5-4ubuntu8 libc++-dev 6.0-2 You should explicitly select one to install. E: Package ‘libstdc++-dev‘ has no installation candidate
选择一个安装
#sudo apt-get install libstdc++-8-dev
安装完成,问题没有得到解决。。。。。。。。。。。
make[1]: Entering directory ‘/home/shawn/work/live555-master_1/testProgs‘ c++ -otestMP3Streamer -L. testMP3Streamer.o ../liveMedia/libliveMedia.a ../groupsock/libgroupsock.a ../BasicUsageEnvironment/libBasicUsageEnvironment.a ../UsageEnvironment/libUsageEnvironment.a /usr/bin/x86_64-linux-gnu-ld: ../groupsock/libgroupsock.a(inet.o): relocation R_X86_64_32S against `.rodata‘ can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:99: recipe for target ‘testMP3Streamer‘ failed make[1]: *** [testMP3Streamer] Error 1 make[1]: Leaving directory ‘/home/shawn/work/live555-master_1/testProgs‘ Makefile:33: recipe for target ‘all‘ failed make: *** [all] Error 2
可能这次报的错和上次不一样吧,意思是在编译选项上加上-fPIC ,于是在 COMPILE_OPTS 和 CONSOLE_LINK_OPTS 都加上 -fPIC ,
#./genMakefile linux
#make
编译成功!
以上是关于final link failed: Nonrepresentable section on output的主要内容,如果未能解决你的问题,请参考以下文章
:app:processDebugResources Android resource linking failed Android resource linking failed
:app:processDebugResources Android resource linking failed Android resource linking failed
利用ST-link 仿真出现Flash verification failed怎么解决
利用ST-link 仿真出现Flash verification failed怎么解决
Android--Android resource linking failed报错解决
Amazon SES SMTP SMTPDataError: (554, "Transaction failed: Missing final '@domain'") 在 pyth