Mac OSX下执行crosstool-ng提示“Your file system ‘xxxx’ is *not* case-sensitive!”

Mac下面使用HomeBrew安装了crosstool-ng来编译树莓派的代码,结果在执行的时候报告如下错误:

$ ct-ng build
[INFO ] Performing some trivial sanity checks
[ERROR] Your file system in '/Users/Documents/rpi/rpi-linux/.build' is *not* case-sensitive!
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_Abort[scripts/functions@329]
[ERROR] >> called from: CT_TestAndAbort[scripts/functions@351]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@93]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> '/usr/local/Cellar/crosstool-ng/1.22.0/share/doc/crosstool-ng/crosstool-ng-1.22.0/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 24422614:07.00)
[00:01] / make: *** [build] Error 1

比较简单的解决方法就是创建一个支持大小写区分的文件,作为一个分区挂载,然后把代码拷贝到这个分区中执行编译。

1.创建分区文件

$ hdiutil create -volname "Raspberry" -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 20g raspberry.dmg

2.挂载分区

早期版本的Mac OS X

$ hdiutil attach raspberry.dmg -mountpoint /Volumes/raspberry

#  切换到挂载目录
$ cd /Volumes/raspberry/

对于OS X EI Capitan(10.11.5)版本而言,生成的文件名变成了raspberry.dmg.sparseimage因此需要使用这个文件来挂载

$ hdiutil attach raspberry.dmg.sparseimage -mountpoint /Volumes/raspberry

#  切换到挂载目录
$ cd /Volumes/raspberry/

挂载后会在桌面生成一个名为Raspberry的磁盘文件夹生成,直接操作这个目录即可。

3.修改crosstool-ng的编译工具下载目录

$ ct-ng menuconfig

如下图的方式进行操作:

1.选择"Paths and misc options",并选中"Select"之后点击回车按键

Crosstool-NG-PathAndMiscOptions

2.点击向下的方向按键,,找到"(${Home}/src) Local tarballs directory",这个项,并选中"Select"之后点击回车按键,修改为"/Volumes/raspberry/src",然后继续向下,找到"(${Home}/x-tools/${CT_TARGET}) Prefix directory",这个项,并选中"Select"之后点击回车按键,修改为"/Volumes/raspberry/x-tools/${CT_TARGET}"

Crosstool-NG-PathAndMiscDirectory
Crosstool-NG-PathAndMiscOptionsPrefixDirectoryVolumesraspberry

修改后的结果如下图:

Crosstool-NG-PathAndMiscDirectoryChange
完成操作后,不断快速按下Esc按键,在最后弹出的确认保存窗口中选择保存即可,如下图:

Crosstool-NG-Configure-Save

4.卸载分区

$ hdiutil detach /Volumes/raspberry

发布者

《Mac OSX下执行crosstool-ng提示“Your file system ‘xxxx’ is *not* case-sensitive!”》上有2条评论

    1. Linux中有些文件只是大小写不同区分的,这样执行可能能编译通过,但是最后编译出来的代码是不是有问题就很难说了!可以试着从Linux系统把代码拷贝到U盘,会出现提示同名覆盖的情况的。

回复 默默 取消回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注