项目里编译codec
src\makefiles\android\codec\Makefile
line 25 原本用 4.6 不会报错
-L/data/android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a \
改成
-L/data/android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a \

编译报错 (下面只有四行)

make[2]: Entering directory `~/video/makefiles/android/codec'
/data/android/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -Wl,--as-needed -lc -Wl,--no-undefined -nostdlib -Wl,-soname,libcodec.so -Wl,-shared,-Bsymbolic ../../../src/codec/H264Encoder_noarch_noplat.o ../../../src/codec/ANDROIDAACEncoder_noarch_noplat.o ../../../src/codec/FH264Decoder_noarch_noplat.o ../../../src/codec/AACDecoder_noarch_noplat.o -L. -L../../../output -L../../../input/prebuilt/android -L../../../testbed/recordtest/libs/armeabi -L/data/android/src/4.4/out/target/product/generic/system/lib -L/data/android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a -lmlbase -laacdec -larcsoft_h264_enc_arm11_vt -larcsoft_mp4audiocommon_he -laacencoder -lavcodec -lavutil -lz -lm -lc -llog -lstagefright -lmedia -lutils -lbinder -lgnustl_static /data/android/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/armv7-a/libgcc.a -shared -fPIC -o ../../../testbed/recordtest/libs/armeabi/libcodec.so -Xlinker -cref -Xlinker -Map -Xlinker ../../../testbed/recordtest/libs/armeabi/libcodec.map
/data1/android/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: /data/android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_static.a(eh_globals.o): requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
/data1/android/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: hidden symbol '__dso_handle' is not defined locally
collect2: error: ld returned 1 exit status

相关的库文件是armeabi-v7a文件夹下 libgnustl_static.a
Google上有人解释说所引用crtbegin_so.o非PIC
https://code.google.com/p/android/issues/detail?id=23203
The problem is that there is a text relocation for __dso_handle. In other words, the code in crtbegin_so.o is not position independent.This is what gcc generates for the same code transposed in C, for arm (thumb would be different):

如果一定用4.8的话,按照
http://www.cnblogs.com/yuanxiaoping_21cn_com/p/3971162.html
可以行得通。

转载于:https://www.cnblogs.com/zzugyl/p/4123046.html

unsupported dynamic reloc R_ARM_REL32 AND hidden symbol '__dso_handle' is not defined相关推荐

  1. 再次遇到的问题:Unable to load dynamic library myext.so: undefined symbol

    2019独角兽企业重金招聘Python工程师标准>>> google到了这里 http://stackoverflow.com/questions/7271792/php-warni ...

  2. hidden symbol `pthread_atfork'

    gcc交叉编译时发生这种错误 /.. .../voice_demo: hidden symbol `pthread_atfork' in /opt/gcc-linaro-aarch64-linux-g ...

  3. CCS error: symbol trace buf is defined multiple times

    DSP-BIOS和XDC工程建立过程中出现以下链接错误,导致编译失败. [Linking...] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" ...

  4. 有关 -fPIC 选项的编译问题

    嵌入式 Linux 上基于 makefile 的编译,执行编译出现如下错误: error: test/fake_blemgr_test.o: requires unsupported dynamic ...

  5. 使用 ld 命令链接目标文件生成可执行文件

    1.目标文件生链接成可执行文件依赖的库和目标文件 使用 ld 链接目标文件生成可执行文件,用于取代命令 g++,仅仅用于学习 ld 命令的使用,不用于实际的项目编译. 首先看一个简单的 C++ 源文件 ...

  6. ubuntu1604编译android5.1(android L)失败error: unsupportedreloc 43等问题

    ubuntu1604编译android5.1(android L)失败error: unsupportedreloc 43等问题 1.    编译的问题 见session_root1 prebuilt ...

  7. ns2 安装与问题集锦

    转自: http://hi.baidu.com/_dragonwarrior/blog/item/ba462fdc070fde43ccbf1a9e.html Ubuntu 10.04 下 安装 NS2 ...

  8. 动态链接库的编译链接

    http://blog.csdn.net/lijiecong/article/details/3244639 一般共享库是以.so结尾,静态库用.a结尾.静态库的编译很简单,你只要为每个源文件生成.o ...

  9. NS2安装笔记 - Ubuntu9.10

    转帖:http://blog.csdn.net/wuyanna1989/archive/2010/01/02/5119823.aspx 参考书推荐:<NS与网络模拟> - 徐雷鸣等 1. ...

最新文章

  1. RabbitMQ队列监控
  2. opencv打开摄像头采集和保存
  3. 【杂谈】当前模型量化有哪些可用的开源工具?
  4. linux 服务器安装 anaconda
  5. mysql合并统计总数,mysql统计多表交织组合总数
  6. .NET MVC CSRF/XSRF 漏洞
  7. dp线长什么样子_HDMI、VGA、DVI、DP接口知识,史上最全面最通俗易懂对比分析!...
  8. 中科院遗传所钱文峰组发表新冠病毒源于自然界的科学证据
  9. 摄像头拍摄后对图片进行图像处理-python(空域增强)
  10. ubuntu16.04 安装中文输入法
  11. 【2019年中总结】五种途径对接天猫精灵音响控制您的智能设备,打破传统产业,让语音AI控制无处不在!
  12. without updating pid file
  13. 好用的json在线工具
  14. 后端开发发展学习路线
  15. Gbox开源:比RN和WebView更轻的高性能动态化业务容器,你掌握了多少
  16. Vue2响应式实现原理和解析
  17. 慕容垂:百万战骨风云里——激荡的鲜卑史略之一(转载)
  18. 【视频分享】尚硅谷HTML5前端视频_Vue核心技术视频
  19. npm list 报错 extraneous
  20. 小白都能看懂!Python机器学习预测乳腺癌疾病案例剖析!

热门文章

  1. MOSFET驱动电路应用实例
  2. [git]怎样git clone所有远程branch
  3. fluter set get
  4. 为什么在太阳能应用中使用气象站
  5. Java程序员编写代码的技巧
  6. 操作系统实验一:线程的创建与撤销
  7. 在找工作时,如何克服求职时的焦虑情绪?
  8. Linux下Oracle 11g安装(3)—— Oracle安装篇
  9. CDQ分治——学习笔记
  10. MySQL备份恢复之mysqldump恢复