综合技术
直播中

武文嘉

7年用户 180经验值
私信 关注
[问答]

为什么cygwin下配置交叉编译环境编译libgcc时xgcc提示找不到 /tmp/xxxxxx.c和/tmp/xxxxxx.s?

configure:3362: /shared/cross-gcc/build/build-ARM-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3362: /shared/cross-gcc/build/build-arm-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3389: /shared/cross-gcc/build/build-arm-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -o conftest -g -O2   conftest.c  >&5
Assembler messages:
Fatal error: can't create /tmp/ccgZ7d6T.o: No such file or directory
configure:3392: $? = 1
configure:3580: checking for suffix of object files
configure:3602: /shared/cross-gcc/build/build-arm-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -c -g -O2  conftest.c >&5
Assembler messages:
Error: can't open /tmp/ccnR0jZR.s for reading: No such file or directory
configure:3606: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3620: error: in `/shared/cross-gcc/build/build-arm-none-cygwin/arm-none-eabi/libgcc':
configure:3623: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
出错的地方应该就是 xgcc 编译 conftest.c 没有生成临时文件,直接copy 上面的 C代码为 conftest.c 然后使用log中的命令也出现同样的错误。
/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -c -g -O2  conftest.c

回帖(2)

杜茂仁

2019-9-4 09:05:35
有没有哪位大神遇到过相同问题的?如何解决?在BAIDU上找到一篇文章说 gcc.c 的配置模板 struct compiler default_compilers 定义了各种扩展名文件类型的编译方法,其中包含使用的编译器文件名,该文件么和 cygwin 不兼容(需要带后缀.exe),按照该方法修改,重新 configure 并重新编译,问题依旧。
举报

杨嘉怡

2019-9-4 09:25:05
帮顶  .....
举报

更多回帖

发帖
×
20
完善资料,
赚取积分