- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我无法使用 openwrt 工具链构建静态二进制文件。
# staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/bin/i486-openwrt-linux-gnu-gcc -o /tmp/main /tmp/main.c -static
/tmp/main.c: In function 'main':
/tmp/main.c:3:2: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
printf("Hello world");
^
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(iofclose.o): In function `_IO_new_fclose':
iofclose.c:(.text+0x1a6): undefined reference to `_Unwind_Resume'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(iofclose.o):(.eh_frame+0x13): undefined reference to `__gcc_personality_v0'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(iofflush.o): In function `_IO_fflush':
iofflush.c:(.text+0xe9): undefined reference to `_Unwind_Resume'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(iofflush.o):(.eh_frame+0x13): undefined reference to `__gcc_personality_v0'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(wfileops.o): In function `_IO_wfile_underflow':
wfileops.c:(.text+0x4e6): undefined reference to `_Unwind_Resume'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(wfileops.o):(.eh_frame+0x5b): undefined reference to `__gcc_personality_v0'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(fileops.o): In function `_IO_new_file_underflow':
fileops.c:(.text+0x361): undefined reference to `_Unwind_Resume'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(fileops.o):(.eh_frame+0xe7): undefined reference to `__gcc_personality_v0'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(backtrace.o): In function `backtrace_helper':
backtrace.c:(.text+0x21): undefined reference to `_Unwind_GetIP'
backtrace.c:(.text+0x43): undefined reference to `_Unwind_GetGR'
backtrace.c:(.text+0x4e): undefined reference to `_Unwind_GetCFA'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(backtrace.o): In function `__backtrace':
backtrace.c:(.text+0x9a): undefined reference to `_Unwind_Backtrace'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(iofputs.o): In function `_IO_fputs':
iofputs.c:(.text+0x107): undefined reference to `_Unwind_Resume'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(iofputs.o):(.eh_frame+0x13): undefined reference to `__gcc_personality_v0'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(iogetdelim.o): In function `_IO_getdelim':
iogetdelim.c:(.text+0x22b): undefined reference to `_Unwind_Resume'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(iogetdelim.o):(.eh_frame+0x13): undefined reference to `__gcc_personality_v0'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(fseek.o): In function `fseek':
fseek.c:(.text+0xe2): undefined reference to `_Unwind_Resume'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(fseek.o):(.eh_frame+0x13): undefined reference to `__gcc_personality_v0'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(ftello.o): In function `__ftello':
ftello.c:(.text+0x13c): undefined reference to `_Unwind_Resume'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(ftello.o):(.eh_frame+0x13): undefined reference to `__gcc_personality_v0'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(ioseekoff.o): In function `_IO_seekoff':
ioseekoff.c:(.text+0x1ab): undefined reference to `_Unwind_Resume'
/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/lib/libc.a(ioseekoff.o):(.eh_frame+0x67): undefined reference to `__gcc_personality_v0'
collect2: error: ld returned 1 exit status
我的主机 gcc 是 Debian 8 上的 4.9.2 版。我使用以下配置构建了 openwrt 工具链:
GCC 编译器版本:具有 Linaro 增强功能的 gcc 4.8.x
C 库实现:使用 (e)glibc
(e)glibc 版本:glibc 2.21
工具链信息:
# staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/bin/i486-openwrt-linux-gnu-gcc -v
Reading specs from /home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib/gcc/i486-openwrt-linux-gnu/4.8.3/specs
COLLECT_GCC=staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/bin/i486-openwrt-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/libexec/gcc/i486-openwrt-linux-gnu/4.8.3/lto-wrapper
Target: i486-openwrt-linux-gnu
Configured with: /home/elison/cop-poc/copernicus-openwrt/build_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/gcc-linaro-4.8-2014.04/configure --with-bugurl=https://dev.openwrt.org/ --with-pkgversion='OpenWrt/Linaro GCC 4.8-2014.04 unknown' --prefix=/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21 --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=i486-openwrt-linux-gnu --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-nls --with-host-libstdcxx=-lstdc++ --with-gmp=/home/elison/cop-poc/copernicus-openwrt/staging_dir/host --with-mpfr=/home/elison/cop-poc/copernicus-openwrt/staging_dir/host --with-mpc=/home/elison/cop-poc/copernicus-openwrt/staging_dir/host --disable-decimal-float --disable-libssp --enable-__cxa_atexit --with-headers=/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/include --disable-libsanitizer --enable-languages=c,c++ --enable-shared --enable-threads --with-slibdir=/home/elison/cop-poc/copernicus-openwrt/staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/lib
Thread model: posix
gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 unknown)
这里提到的答案没有帮助: https://stackoverflow.com/a/22774664/879142
添加 --enable-static 作为额外的 gcc 配置选项也无济于事。
正如在 Internet 上的其他地方发现的那样,将 -lgcc_eh 添加到链接器标志也无济于事。
最佳答案
aarch64-openwrt-linux-gcc thread.c -static -lpthread -lc -lgcc_eh
作品
关于c - 无法使用 Openwrt 工具链 : Undefined reference to _Unwind_Resume and __gcc_personality_v0 构建静态二进制文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40465212/
一段时间以来,我一直在使用我编写的一小部分文件,以便更轻松地与 WinAPI 交互。虽然,当我想重用它们、等待它们重新编译等时,不断移动文件变得很痛苦。我最终决定将它们放入 DLL 中,并完成它,但我
调用堆栈: #0 0x00007faf7fdb8ed5 in raise () from /lib/libc.so.6 #1 0x00007faf7fdba3f3 in abort () from /
当尝试在 qt 中切换到 gcc 4.6.2(在工具链中设置它)时,出现以下错误: c:\ndk_buildrepos\qt-desktop\src\winmain\qtmain_win.cpp:93
我正在尝试使用 JsonCpp 库。我在 Windows 上使用 MinGW 和 CodeBlocks。 当我包含来自 json header 的任何内容时,我的链接器崩溃并发出这两个错误。我开始环顾
我正在尝试为 iOS7 准备一个应用程序以供审查,但我碰壁了: 该应用在...._Unwind_Resume中引用了非公开符号 在 Release-iphoneos 内部,我试图找到罪魁祸首nm -u
我从 Core Date 收到这个奇怪的错误,我不明白为什么。 当我删除 UITableView 的一行时,将执行下面的代码。 我将一个字符串和一个对象传递给下面的方法,它在具有该字符串和该对象的外键
我无法使用 openwrt 工具链构建静态二进制文件。 # staging_dir/toolchain-i386_i686_gcc-4.8-linaro_glibc-2.21/bin/i486-ope
如标题所述,我从 https://developer.android.google.cn/ndk/downloads/index.html 下载 Android NDK。并使用 clang 工具链编译
我有 Windows 7 64 位,我刚刚安装了 Qt(开源,版本 2010.04)并将其集成到 Eclipse(CDT,版本 Helios)中。一切似乎都很顺利,我添加了 Qt 和 mingw32
我是一名优秀的程序员,十分优秀!