更新到Mac OS X El Capitan后,我的bbndk设置无法正常工作。当我尝试构建一个示例cmake项目时,它失败并出现以下错误。
$source /Applications//Momentics.app/bbndk-env_10_3_1_995.sh
$ make
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/bin/qcc
-- Check for working C compiler: /Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/bin/qcc -- broken
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.4/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler
"/Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/bin/qcc" is not
able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/test/bb10-arm-build/CMakeFiles/CMakeTmp
Run Build
Command:"/Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/bin/make"
"cmTC_31e1d/fast"
/Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/bin/make -f
CMakeFiles/cmTC_31e1d.dir/build.make CMakeFiles/cmTC_31e1d.dir/build
make[1]: Entering directory
'/Users/test/bb10-arm-build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_31e1d.dir/testCCompiler.c.o
/Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/bin/qcc
-V4.8.3,gcc_ntoarmv7le_cpp -marm -mcpu=cortex-a9 -fstack-protector
-fstack-protector-all -Wno-psabi -D__QNX__ -D_REENTRANT -DQ_OS_BLACKBERRY
-DQT_DECLARATIVE_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -o
CMakeFiles/cmTC_31e1d.dir/testCCompiler.c.o -c
/Users/test/bb10-arm-build/CMakeFiles/CMakeTmp/testCCompiler.c
dyld: Library not loaded:
/usr/darwin/x86_64-apple-darwin/x86_64-apple-darwin/lib/libmpc.2.dylib
Referenced from: /Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/lib/gcc/arm-unknown-nto-qnx8.0.0eabi/4.8.3/cc1
Reason: image not found
cc:
/Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/lib/gcc/arm-unknown-nto-qnx8.0.0eabi/4.8.3/cc1
caught signal 5
CMakeFiles/cmTC_31e1d.dir/build.make:65: recipe for target
'CMakeFiles/cmTC_31e1d.dir/testCCompiler.c.o' failed
make[1]: Leaving directory
'/Users/test/bb10-arm-build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_31e1d/fast' failed
make[1]: *** [CMakeFiles/cmTC_31e1d.dir/testCCompiler.c.o] Error 1
make: *** [cmTC_31e1d/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/Users/test/CMakeOutput.log".
See also "/Users/test/CMakeError.log".
$
重新安装Momentics和cmake但没有成功。我看到qcc
正在查看库的错误位置
/usr/darwin/x86_64-apple-darwin/x86_64-apple-darwin/lib/libmpc.2.dylib
知道为什么qcc不使用DYLIB_LIBRARY_PATH中的值来查找库吗?
CMakeError.log的前几行是
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/bin/qcc
Build flags: -V4.8.3,gcc_ntoarmv7le_cpp;-marm;-mcpu=cortex-a9;-fstack-protector;-fstack-protector-all;;-Wno-psabi;-D__QNX__;-D_REENTRANT;-DQ_OS_BLACKBERRY;-DQT_DECLARATIVE_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB;-DQT_SHARED
Id flags:
The output was:
1
dyld: Library not loaded: /usr/darwin/x86_64-apple-darwin/x86_64-apple-darwin/lib/libmpc.2.dylib
Referenced from: /Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/lib/gcc/arm-unknown-nto-qnx8.0.0eabi/4.8.3/cc1
Reason: image not found
cc: /Applications/Momentics.app/host_10_3_1_12/darwin/x86/usr/lib/gcc/arm-unknown-nto-qnx8.0.0eabi/4.8.3/cc1 caught signal 5