linux - 为 optware 编译 Node 时出错 - libv8.a : could not read symbols: File in wrong format

标签 linux node.js arm v8

在 Ubuntu 11.10 上为 optware (slug) 交叉编译 node.js 时出现此错误。

/optware/cs05q1armel/builds/node/build/default/libv8.a(api.o):通用 ELF 中的重定位 (EM: 3) /optware/cs05q1armel/builds/node/build/default/libv8.a: 无法读取符号:文件格式错误

为 ./configure 使用标志 --without-snapshot --without-ssl --dest-cpu=arm

arm-none-linux-gnueabi-g++ 被正确选择为编译器,但可能不适用于此库?

感谢任何指点

最佳答案

This problem is due to compiling XXXX.o on a different architecture machine. For instance, Sun workstations compile into SPARC machine code while our LINUX workstations compile into Intel x86 code. If you compile part of a project on one type of architecture and then try to compile the rest of the project on another type of architecture, when you go to make the final executable the linker/loader will NOT be able to read one of the parts of the project .o files to create an executable, thus the "could not read symbols: File in wrong format" error message. If you change machine architectures, or even operating system versions, while doing a project it is reasonable to clean/remove all the existing .o files and re-create the whole project on the current machine you are sitting at.

来自 http://ugweb.cs.ualberta.ca/~rod/tutorials/error_messagesC.html在“您无法理解的错误”部分

关于linux - 为 optware 编译 Node 时出错 - libv8.a : could not read symbols: File in wrong format,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7706799/

相关文章:

c - 如何编译和链接示例代码以获得二进制文件?

linux - 在 Linux 上安装 ghc 二进制文件(找不到 libgmp.so)

javascript - 替换 JSON 文件中的整个数据 block

c - gcc 如何确定 x86 上的 -march=native? ARM 上?

javascript - node.js promise 在 if 语句中没有解析

javascript - 如何在angularjs中刷新和重新绑定(bind)数据库中的数据

c - 在 Apple MAC book 上为 STM 编译 ARM 二进制文件的问题

linux - 如何在不使用 "yum"命令的情况下在我的 Red Hat Linux 机器上安装 Mercurial?

c - 警告 : implicit declaration of function ' crypt_r'

windows - 如何在纹理上的 3d 空间中显示 windows/X 窗口系统窗口?