问题标签 [crosstool-ng]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
linux - 在步骤“检索所需的工具链组件”压缩包中构建失败
我尝试在我的树莓派中构建交叉工具,我遵循的过程来自How to compile FFmpeg for Raspberry Pi (Raspbian)。当我完成ct-ng build
(花了很长时间)时,发生了错误。它表明Build failed in step 'Retrieving needed toolchain components' tarballs called in step '{top-level}'
这是我从 build.log 复制的错误。
我该如何解决这个问题?请帮助我,我已经浪费了2天时间。
macos - 在 OS X 上使用 crosstool-ng 构建 ARM 交叉编译器
我正在尝试在我的 Mac 上为我的 Raspberry Pi 创建一个交叉编译器,我已经设法配置、构建和安装 crosstool-ng,但是在构建arm-unknow-linux-gnueabi
工具链时,它失败了。的输出./ct-ng build
是:
我的内容build.log
是:
更新1:
我已经'grep' '-E' '^(# |)CT_' '.config'
在我的 crosstool-ng 的 bin 目录中运行,它返回:
请帮忙,我完全无能为力:)
gcc - Crosstool-ng 1.19.0,使用 eglibc 出错
我目前正在尝试为我的树莓派交叉编译构建 crosstool-ng,但我遇到了一些问题。尝试构建 crosstool 版本 1.19.0 时出现以下错误:
根据这个网站:http : //colocsbar.blogspot.fr/2014/01/crosstool-ng-1190-et-make-40.html 我必须修补 eglibc 配置脚本。但我找不到它是哪一个,我试图将我能找到的每个 glibc 脚本修补到 crosstool 文件夹中,但每次修补都失败。有没有人有解决这个错误的方法?谢谢
python - 使用 Python subprocess.call() 启动 ncurses 进程
我正在尝试从 SCons SConstruct 脚本调用 ct-ng ( http://crosstool-ng.org/ ),所以基本上是从 Python 调用。
使用以下方法:
crosstool-ng 使用 ncurses 向用户显示菜单:
不幸的是,当我尝试浏览菜单时:
使用我看到的箭头键时使用 cat 显示序列:
似乎有些东西可能会从序列中剥离转义字符。
当我从终端的命令行调用 ct-ng 脚本时,它可以正常工作,而当我使用subprocess.call()调用它时,事情就会变糟。
我的环境包括:
- xfce4-终端 0.6.3
- Linux 3.13.0-32-lowlatency #57-Ubuntu SMP PREEMPT Tue Jul 15 04:08:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
- Python 2.7.6
- NCURSES_VERSION "5.9"
- GNU Make 3.81
- crosstool-NG 版本 1.19.0
我看到的是已知问题吗?还有什么我应该做的吗?
更新:谢谢埃里克……这让我到达了 0.5 英尺……我现在可以浏览菜单,但它仍然会留下粪便:
mips - crosstool-ng -- stdio.h: No such file or directory
I would like to cross compile a simple program that uses libncurses on my x86_64. Target system is MIPS.
My crosstool-ng-1.20 build went fine (with sample mips-unknown-elf)
However, a simple hello world ends badly.
--
I'm clearly doing something terribly wrong here, but where do i start?
[Edit]
Thank you markgz. Codesourcery is exactly what i needed.
Proof of concept complete. Now off to compile my ncurses program.
c - 各种 glibc 和 Linux 内核版本的兼容性
在构建编译器时,除了 glibc 版本之外,还必须指定 Linux 头文件版本和最低支持的内核版本。然后在目标机器上有实际的内核版本和 glibc 版本(具有自己的内核头文件版本和最低支持的内核版本)。我很困惑试图理解这些版本是如何结合在一起的。
示例 1:假设我有针对内核头文件3.14构建的 glibc 2.13系统。这有任何意义吗?glibc 2.13(2011 年发布)如何使用3.14(2014 年发布)的新内核特性?
示例 2:假设我有一个 glibc 版本高于2.13的编译器。编译后的程序可以在带有 glibc 2.13的系统上运行吗?如果编译器的 glibc 版本早于2.13?
示例 3:来自https://sourceware.org/glibc/wiki/FAQ#What_version_of_the_Linux_kernel_headers_should_be_used.3F我知道如果它满足编译 glibc 时使用的“最低内核版本”,则可以使用旧内核。但我不明白这段话The other way round (compiling the GNU C library with old kernel headers and running on a recent kernel) does not necessarily work as expected. For example you can't use new kernel features if you used old kernel headers to compile the GNU C library.
。这是唯一可能发生在我身上的事情吗?如果内核比编译时更新,它不会破坏 glibc 中的某些东西吗?
示例 4:在 glibc 设置中进行更细微的区别(例如,将可执行文件与根据内核头文件3.Y编译的 glibc 版本2.X与最低支持的内核版本2.6.A 相链接,并在具有相同 glibc 2.X的系统上执行,但是针对内核头文件3.Z编译,最小支持内核版本2.6.B)有什么影响吗?我怀疑他们不是,但想确定一下。
这么多问题:) 谢谢!
glibc - 使用 crosstool-ng 交叉编译工具链
我正在尝试使用 glibc 2.5 版构建 Linux 环境,以使用 crosstool-ng 编译 C 代码。但由于某种原因,我在配置中找不到 glibc 2.5 版。有谁知道如何解决这个问题?
而且我尝试使用旧版本的 glibc 2.2 并在构建库时遇到错误。
以下是我修改的所有配置:
谁能告诉我我的配置有什么问题以及如何解决?谢谢。
cross-compiling - 尝试编译 crosstool-ng-1.20.0
我第一次尝试 ./configure crosstool-ng 看起来像这样:
然后巴拉巴拉巴拉...
当然,crosstool-ng 确实需要 wget。但这很奇怪,因为我拥有它!
好的,将符号链接到 /usr/bin 就成功了。我没有删除 wget 前缀只是为了看看它是否在其他地方警告我......我是对的。
所以我删除了所有无法识别的选项......
……瞧。似乎所有问题都消失了(?)
现在我就是不明白出了什么问题。mb gcc?仅仅因为 wget 仅在 /usr/bin 中被识别,我认为 configure 脚本也无法识别 gcc 前缀,它在 /usr/bin 中寻找他,我的默认编译器是:
但不是来自 /opt/local/bin 的那个
有什么想法吗?
c++ - How to use candian in Crosstools-NG in a cross-native fashion to get gcc on an arm board?
As I understand, to have gcc on an armv5 board compiling executables while using my x86 machine to compile that arm native gcc, I need this setup:
- Machine configuring the toolchain components: the config machine : x86_64
- Machine building the toolchain components: the build machine : x86_64
- Machine running the toolchain: the host machine : ARM
- Machine the toolchain is generating code for: the target machine : ARM
Based on reading the cross-ng docs here, I should use a cross-native setup, but when I attempt to enable that using ct-ng menuconfig
I need to enable:
experimental in
Paths and misc options -> Try features marked as EXPERIMENTAL
Toolchain options -> Type (Cross) -> Cross-native (NO CODE!) (EXPERIMENTAL)
But of course Cross-Native doesn't work since there is no code for it. Googling leads me to this and this discussion on a mailing list saying that I should try to do this using a Canadian build style but I am somewhat lost as to what tuple's and whatnot to use for the Build System
and Host System
in crosstool-ng's menuconfig, or if this is still the correct way to go considering how both discussions are over 3 years old.
This post on SO seems to imply that the build system and host system tuples should be arm-unknown-linux-gnueabi
?
To be clear, I have been able to compile and run executables using a cross compiler generated from crosstool-ng already, now I want to have a compiler on that armv5 system.
Edit: So I just added the normal cross compiler (arm-unknown-linux-gnueabi
) generated by crosstools-ng to the tuple in Toolchain options -> General toolchain options -> Host system -> Tuple
and was able to compile gcc as well as have it execute on the arm. Example
I now just need to fix the library situation and that should be that.
linux - 如何更改 ld.so 中的默认路径
我使用 ubuntu 14.10 和 crosstool-ng-1.20.0 从主机创建工具链:x86_64 到目标:i686,我知道 glibc 将创建 ld.so 但我不知道如何将 ld.so 中的默认路径从“ /lib、/usr/lib”到“/lib32、/usr/lib32”。
我想在目标机器上的 ld.so 中将默认路径从“/lib、/usr/lib”更改为我的设置“/lib32、/usr/lib32”。(因为对于 32 位库,我将每个 .so 文件都放在 /lib32 中,而对于 x86_64 而不是 i686,我会将其他 .so 文件放到 /lib 中)
我不想在编译时在主机上添加一些标志(如“-z nodeflib”、“--rpath=dir”)来更改目标机器上每个二进制文件的搜索路径。我希望每个不使用这些标志的二进制文件都可以使用 ld.so 找到正确的库
有谁知道如何做到这一点?
附言。我使用 crosstool-ng 制作 gcc-4.9 linaro、glibc-2.20 linaro、binutl ...等...