[main] python 6140 C:\cygwin\bin\python.exe: *** fatal error - unable to remap

本文介绍了解决在Cygwin环境下运行Python时出现的致命错误的方法。通过使用命令`ashrebaseall-v`或手动执行rebaseall命令,可以解决因DLL映射问题导致的Python无法正常启动的问题。
[main] python 6140 C:\cygwin\bin\python.exe: *** fatal error - unable to remap
2011年05月11日
  [main] python 6140 C:\cygwin\bin\python.exe: *** fatal error - unable to remap2011-03-09 17:39出现如下错误时:
  [b]0 [main] python 6140 C:\cygwin\bin\python.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to same address as parent: 0x2B0000 != 0x360000[/b]
  [b]Stack trace:[/b]
  [b]Frame Function Args[/b]
  [b]00288E68 6102749B (00288E68, 00000000, 00000000, 00000000)[/b]
  [b]00289158 6102749B (61177B80, 00008000, 00000000, 61179977)[/b]
  [b]0028A188 61004AFB (611A136C, 6124112C, 002B0000, 00360000)[/b]
  [b]End of stack trace[/b]
  [b] 0 [main] python 9048 fork: child 6140 - died waiting for dll loading, errno 11[/b]
  [b]abort: Resource temporarily unavailable[/b]
  具体的解决方法如下:
  开始菜单输入CMD打开命令行输入:
  [b]C:/cygwin/bin/ash rebaseall -v [/b]
  或者按如下操作:
  开始菜单输入CMD打开命令行
  进入到Cygwin的bin路径下,执行ash命令,或者直接run这个命令;
  在ash提示符后面运行/bin/rebaseall,注意要输入完整,如果只输入rebaseall,会提示找不到这个命令,而且这个命令只能在ash下面执行,不能在Cygwin下面执行。
  现在打开Cygwin,一切恢复正常。
0 [main] sh 495 dofork: child -1 - forked process 20248 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 .git/hooks/commit-msg: fork: retry: Resource temporarily unavailable 0 [main] sh (16592) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x13E1408/0x1371408. This problem is probably due to using incompatible versions of the cygwin DLL. Search for cygwin1.dll using the Windows Start->Find/Search facility and delete all but the most recent version. The most recent version *should* reside in x:\cygwin\bin, where 'x' is the drive on which you have installed the cygwin distribution. Rebooting is also suggested if you are unable to find another cygwin DLL. 1132541 [main] sh 495 dofork: child -1 - forked process 16592 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 .git/hooks/commit-msg: fork: retry: Resource temporarily unavailable 0 [main] sh (18656) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x13E1408/0x1331408. This problem is probably due to using incompatible versions of the cygwin DLL. Search for cygwin1.dll using the Windows Start->Find/Search facility and delete all but the most recent version. The most recent version *should* reside in x:\cygwin\bin, where 'x' is the drive on which you have installed the cygwin distribution. Rebooting is also suggested if you are unable to find another cygwin DLL. 3241021 [main] sh 495 dofork: child -1 - forked process 18656 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 .git/hooks/commit-msg: fork: retry: Resource temporarily unavailable 0 [main] sh (11832) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x13E1408/0x1321408. This problem is probably due to using incompatible versions of the cygwin DLL. Search for cygwin1.dll using the Windows Start->Find/Search facility and delete all but the most recent version. The most recent version *should* reside in x:\cygwin\bin, where 'x' is the drive on which you have installed the cygwin distribution. Rebooting is also suggested if you are unable to find another cygwin DLL. 7361636 [main] sh 495 dofork: child -1 - forked process 11832 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 .git/hooks/commit-msg: fork: retry: Resource temporarily unavailable 0 [main] sh (19072) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x13E1408/0x13C1408. This problem is probably due to using incompatible versions of the cygwin DLL. Search for cygwin1.dll using the Windows Start->Find/Search facility and delete all but the most recent version. The most recent version *should* reside in x:\cygwin\bin, where 'x' is the drive on which you have installed the cygwin distribution. Rebooting is also suggested if you are unable to find another cygwin DLL. 15480748 [main] sh 495 dofork: child -1 - forked process 19072 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 .git/hooks/commit-msg: fork: Resource temporarily unavailable git did not exit cleanly (exit code 1) (15812 ms @ 2025/10/9 18:04:58)
最新发布
10-10
<think>好的,我现在需要解决用户在Cygwin64中使用gcc编译器时遇到的致命错误“add_item”。首先,我要理解这个错误的具体情况。用户提到的是“fatal error add_item”,可能指的是编译过程中无法找到名为add_item的文件或符号。接下来,我需要考虑可能导致这个错误的常见原因,并根据提供的引用信息寻找可能的解决方案。 根据引用[2],用户之前可能在使用Makefile管理项目,其中涉及多个目标文件如main.o、add.o、sub.o的编译。如果在Makefile中遗漏了add_item.c的编译规则,或者源文件命名不一致,可能导致gcc找不到对应的源文件或目标文件。例如,如果用户有一个add_item.c文件,但Makefile中没有生成add_item.o的规则,就会出现链接错误。 另外,引用[3]中的gcc编译命令显示了如何包含头文件和生成目标文件,用户需要检查是否正确定义了add_item.c的编译命令,是否包含必要的头文件路径。此外,检查文件路径是否正确,特别是在Cygwin环境下,路径分隔符是正斜杠,可能需要调整Windows下的路径习惯。 还要考虑代码中的函数或变量是否正确定义和声明。如果add_item函数在头文件中没有声明,或者在源文件中拼写错误,也会导致链接错误。用户需要确保所有函数声明和定义一致,并且在需要的地方正确包含头文件。 此外,引用[4]提到的CMake配置可能相关,如果用户的项目使用CMake,需要检查CMakeLists.txt是否正确配置了源文件和目标文件,特别是在交叉编译环境下,可能需要特殊的设置。 最后,建议用户检查编译命令的输出,查看具体错误信息的位置,比如是编译阶段还是链接阶段的错误,这有助于缩小问题范围。例如,如果错误发生在链接阶段,可能是缺少库文件或目标文件未正确生成。</think>在Cygwin64中使用gcc编译出现"add_item"致命错误,通常与代码实现、编译配置或文件路径相关。以下是逐步排查方案: 1. **基础代码检查** - 确认存在$add\_item.c$源文件且命名一致 - 检查函数声明与定义是否匹配: ```c // 头文件声明 void add_item(int item); // 源文件实现 void add_item(int item) { /* 实现 */ } ``` 2. **Makefile配置验证**(参考引用[2]) - 添加缺失的编译规则: ```makefile add_item.o: add_item.c gcc -c add_item.c ``` - 更新链接目标依赖: ```makefile output: main.o add.o sub.o add_item.o gcc -o output $^ ``` 3. **Cygwin环境特殊处理** - 检查路径分隔符是否使用Linux格式: ```bash # 错误示例(Windows路径) gcc -I C:\project\include # 正确示例(Cygwin路径) gcc -I /cygdrive/c/project/include ``` - 验证gcc环境完整性: ```bash gcc --version cygcheck -c gcc-core ``` 4. **交叉编译兼容性**(参考引用[4]) - 若涉及交叉编译,检查CMake工具链配置: ```cmake # rv1126_toolchain.cmake示例 set(CMAKE_C_COMPILER "/opt/rv1126/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc") ``` 5. **编译命令调试**(参考引用[3]) - 添加详细编译输出: ```bash gcc -v -Wl,--verbose main.c add_item.c -o output ``` - 检查输出中是否包含: ``` Reading specs from /usr/lib/gcc/x86_64-pc-cygwin/11/specs COLLECT_GCC=gcc ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值