Watchdog: 命令“gcc-4.2”失败,退出状态为 1

创建于 2015-10-22  ·  6评论  ·  资料来源: gorakhargosh/watchdog

你好。 我在 Mac OSX 10.6 上安装时编译失败(见下文)。

这最初是在尝试编译其他软件(https://github.com/getnikola/nikola/issues/2148)时出现的,并且似乎与https://github.com/gorakhargosh/watchdog/issues/323相同,但修复对我不起作用。

有什么建议?
谢谢!
格里。

安装收集的包:watchdog、nikola
为看门狗运行 setup.py install
命令的完整输出 /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -c "import setuptools, tokenize;file='/private/var/folders/Mp/MpSSjvV2FL4+8z2Ek3s55++++TI /-Tmp-/pip-build-9pd_atj7/watchdog/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', ' \n'), file, 'exec'))" install --record /var/folders/Mp/MpSSjvV2FL4+8z2Ek3s55++++TI/-Tmp-/pip-uijes1i6-record/install-record.txt --单一版本-外部管理--编译:
运行安装
运行构建
运行 build_py
创建构建
创建 build/lib.macosx-10.6-intel-3.5
创建 build/lib.macosx-10.6-intel-3.5/watchdog
复制 src/watchdog/init.py -> build/lib.macosx-10.6-intel-3.5/watchdog
复制 src/watchdog/events.py -> build/lib.macosx-10.6-intel-3.5/watchdog
复制 src/watchdog/version.py -> build/lib.macosx-10.6-intel-3.5/watchdog
复制 src/watchdog/watchmedo.py -> build/lib.macosx-10.6-intel-3.5/watchdog
创建 build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/init.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/api.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/fsevents.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/fsevents2.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/inotify.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/inotify_buffer.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/inotify_c.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/kqueue.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/polling.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/read_directory_changes.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
复制 src/watchdog/observers/winapi.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
创建 build/lib.macosx-10.6-intel-3.5/watchdog/tricks
复制 src/watchdog/tricks/init.py -> build/lib.macosx-10.6-intel-3.5/watchdog/tricks
创建 build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/init.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/bricks.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/compat.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/decorators.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/delayed_queue.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/dirsnapshot.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/echo.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/event_backport.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/importlib2.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/platform.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/unicode_paths.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
复制 src/watchdog/utils/win32stat.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
运行 egg_info
将入口点写入 src/watchdog.egg-info/entry_points.txt
将要求写入 src/watchdog.egg-info/requires.txt
将dependency_links写入src/watchdog.egg-info/dependency_links.txt
将顶级名称写入 src/watchdog.egg-info/top_level.txt
写 src/watchdog.egg-info/PKG-INFO
警告:manifest_maker:未找到标准文件“-c”

读取清单文件'src/watchdog.egg-info/SOURCES.txt'
阅读清单模板'MANIFEST.in'
警告:在目录“src”下找不到匹配“*.h”的文件
编写清单文件'src/watchdog.egg-info/SOURCES.txt'
运行 build_ext
构建“_watchdog_fsevents”扩展
创建 build/temp.macosx-10.6-intel-3.5
创建 build/temp.macosx-10.6-intel-3.5/src
gcc-4.2 -fno-strict-aliasing -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -isysroot /Developer/SDKs/ MacOSX10.6.sdk -g -DWATCHDOG_VERSION_STRING="0.8.3" -DWATCHDOG_VERSION_MAJOR=0 -DWATCHDOG_VERSION_MINOR=8 -DWATCHDOG_VERSION_BUILD=3 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c src /watchdog_fsevents.c -o build/temp.macosx-10.6-intel-3.5/src/watchdog_fsevents.o -std=c99 -pedantic -Wall -Wextra -fPIC -Wno-error=unused-command-line-argument-hard-将来的错误
cc1:错误:-Werror=unused-command-line-argument-hard-error-in-future:没有选项 -Wunused-command-line-argument-hard-error-in-future
cc1:错误:-Werror=unused-command-line-argument-hard-error-in-future:没有选项 -Wunused-command-line-argument-hard-error-in-future
lipo:无法确定以下架构类型:/var/folders/Mp/MpSSjvV2FL4+8z2Ek3s55++++TI/-Tmp-//ccoFqjhZ.out
错误:命令“gcc-4.2”失败,退出状态为 1


最有用的评论

CC=/usr/bin/gcc pip install也对我有用。

所有6条评论

我遇到了同样的问题,另外尝试使用 pip install 为 python2 和 3 构建失败:

收集看门狗
使用缓存的 watchdog-0.8.3.tar.gz
已满足要求(使用 --upgrade 升级):/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages 中的 PyYAML>=3.10(来自看门狗)
已满足要求(使用 --upgrade 升级):/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages 中的 argh>=0.24.1(来自看门狗)
已满足要求(使用 --upgrade 升级):/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages 中的 pathtools>=0.1.1(来自看门狗)
为收集的包裹建造轮子:看门狗
为看门狗运行 setup.py bdist_wheel
命令的完整输出 /Library/Frameworks/Python.framework/Versions/3.4/bin/python3 -c "import setuptools; file ='/private/var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T/pip-build-5a4viveg/watchdog/ setup.py';exec(compile(open( file ).read().replace('\r\n', '\n'), file , 'exec'))" bdist_wheel -d /var/folders/6w /6bvyw6bj6tv46vl74f7d52hw0000gn/T/tmpoamca53upip-wheel-:
运行 bdist_wheel
运行构建
运行 build_py
创建构建
创建 build/lib.macosx-10.6-intel-3.4
创建 build/lib.macosx-10.6-intel-3.4/watchdog
复制 src/watchdog/ init .py -> build/lib.macosx-10.6-intel-3.4/watchdog
复制 src/watchdog/events.py -> build/lib.macosx-10.6-intel-3.4/watchdog
复制 src/watchdog/version.py -> build/lib.macosx-10.6-intel-3.4/watchdog
复制 src/watchdog/watchmedo.py -> build/lib.macosx-10.6-intel-3.4/watchdog
创建 build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/ init .py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/api.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/fsevents.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/fsevents2.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/inotify.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/inotify_buffer.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/inotify_c.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/kqueue.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/polling.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/read_directory_changes.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
复制 src/watchdog/observers/winapi.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
创建 build/lib.macosx-10.6-intel-3.4/watchdog/tricks
复制 src/watchdog/tricks/ init .py -> build/lib.macosx-10.6-intel-3.4/watchdog/tricks
创建 build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/ init .py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/bricks.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/compat.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/decorators.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/delayed_queue.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/dirsnapshot.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/echo.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/event_backport.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/importlib2.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/platform.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/unicode_paths.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
复制 src/watchdog/utils/win32stat.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
运行 egg_info
写 src/watchdog.egg-info/PKG-INFO
将入口点写入 src/watchdog.egg-info/entry_points.txt
将dependency_links写入src/watchdog.egg-info/dependency_links.txt
将顶级名称写入 src/watchdog.egg-info/top_level.txt
将要求写入 src/watchdog.egg-info/requires.txt
警告:manifest_maker:未找到标准文件“-c”

读取清单文件'src/watchdog.egg-info/SOURCES.txt'
阅读清单模板'MANIFEST.in'
警告:在目录“src”下找不到匹配“*.h”的文件
编写清单文件'src/watchdog.egg-info/SOURCES.txt'
运行 build_ext
构建“_watchdog_fsevents”扩展
创建 build/temp.macosx-10.6-intel-3.4
创建 build/temp.macosx-10.6-intel-3.4/src
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DWATCHDOG_VERSION_STRING="0.8.3" -DWATCHDOG_VERSION_MAJOR=0 - DWATCHDOG_VERSION_MINOR=8 -DWATCHDOG_VERSION_BUILD=3 -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c src/watchdog_fsevents.c -o build/temp.macosx-10.6-intel-3.4/src/ watchdog_fsevents.o -std=c99 -pedantic -Wall -Wextra -fPIC -Wno-error=unused-command-line-argument-hard-error-in-future
cc1:错误:-Werror=unused-command-line-argument-hard-error-in-future:没有选项 -Wunused-command-line-argument-hard-error-in-future
cc1:错误:-Werror=unused-command-line-argument-hard-error-in-future:没有选项 -Wunused-command-line-argument-hard-error-in-future
致命错误:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo:无法确定架构类型:/var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T//cclX9Qwm。出去
错误:命令“gcc-4.2”失败,退出状态为 1


看门狗的构建轮子失败
构建看门狗失败
安装收集的包:看门狗
为看门狗运行 setup.py install
命令的完整输出 /Library/Frameworks/Python.framework/Versions/3.4/bin/python3 -c "import setuptools, tokenize; file ='/private/var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T/pip-build-5a4viveg/ watchdog/setup.py';exec(compile(getattr(tokenize, 'open', open)( file ).read().replace('\r\n', '\n'), file , 'exec') )" 安装 --record /var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T/pip-yl7h5h2t-record/install-record.txt --single-version-externally-managed --compile:
运行安装
运行构建
运行 build_py
运行 egg_info
将顶级名称写入 src/watchdog.egg-info/top_level.txt
写 src/watchdog.egg-info/PKG-INFO
将要求写入 src/watchdog.egg-info/requires.txt
将dependency_links写入src/watchdog.egg-info/dependency_links.txt
将入口点写入 src/watchdog.egg-info/entry_points.txt
警告:manifest_maker:未找到标准文件“-c”

reading manifest file 'src/watchdog.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.h' under directory 'src'
writing manifest file 'src/watchdog.egg-info/SOURCES.txt'
running build_ext
building '_watchdog_fsevents' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DWATCHDOG_VERSION_STRING="0.8.3" -DWATCHDOG_VERSION_MAJOR=0 -DWATCHDOG_VERSION_MINOR=8 -DWATCHDOG_VERSION_BUILD=3 -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c src/watchdog_fsevents.c -o build/temp.macosx-10.6-intel-3.4/src/watchdog_fsevents.o -std=c99 -pedantic -Wall -Wextra -fPIC -Wno-error=unused-command-line-argument-hard-error-in-future
cc1: error: -Werror=unused-command-line-argument-hard-error-in-future: No option -Wunused-command-line-argument-hard-error-in-future
cc1: error: -Werror=unused-command-line-argument-hard-error-in-future: No option -Wunused-command-line-argument-hard-error-in-future
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't figure out the architecture type of: /var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T//ccNHLsiU.out
error: command 'gcc-4.2' failed with exit status 1

----------------------------------------

命令“/Library/Frameworks/Python.framework/Versions/3.4/bin/python3 -c”导入setuptools,tokenize; file ='/private/var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T/pip-build-5a4viveg/watchdog/setup.py';exec(compile(getattr(tokenize, 'open', open)( file ).read() .replace('\r\n', '\n'), file , 'exec'))" install --record /var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T/pip-yl7h5h2t-record/install-record.txt --single-version-externally-managed --compile" 失败,错误代码 1 在 /private/var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T/pip-build-5a4viveg/watchdog

我得到了手动 setup.py 以使用以下命令:

CC=/usr/bin/gcc python3 setup.py install

使用命令“ls -l /usr/bin/gcc*”找到标志路径,该命令返回:

-rwxr-xr-x 1 根轮 14160 2014 年 9 月 29 日 /usr/bin/gcc
-rwxr-xr-x 1 MLR 轮 166128 2011 年 2 月 11 日 /usr/bin/gcc-4.2

我只是指定它使用另一个,因为 gcc-4.2 一直失败。 不确定这是否适用于原始海报,但这是我的解决方案。

CC=/usr/bin/gcc pip install也对我有用。

ls -l /usr/bin/gcc*回报

$ ls -l /usr/bin/gcc*
lrwxr-xr-x  1 root  wheel       7 30 Dec 16:16 /usr/bin/gcc -> gcc-4.2
-rwxr-xr-x  1 root  wheel   97392 19 May  2009 /usr/bin/gcc-4.0
-rwxr-xr-x  1 root  wheel  166128 19 May  2009 /usr/bin/gcc-4.2

指定 gcc 或 gcc-4.0 对我不起作用,并给了我这个:

$ CC=/usr/bin/gcc-4.0 python3 setup.py install
running install
running bdist_egg
running egg_info
writing src/watchdog.egg-info/PKG-INFO
writing dependency_links to src/watchdog.egg-info/dependency_links.txt
writing entry points to src/watchdog.egg-info/entry_points.txt
writing requirements to src/watchdog.egg-info/requires.txt
writing top-level names to src/watchdog.egg-info/top_level.txt
reading manifest file 'src/watchdog.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.h' under directory 'src'
writing manifest file 'src/watchdog.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-intel/egg
running install_lib
running build_py
running build_ext
building '_watchdog_fsevents' extension
/usr/bin/gcc-4.0 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -DWATCHDOG_VERSION_STRING="0.8.3" -DWATCHDOG_VERSION_MAJOR=0 -DWATCHDOG_VERSION_MINOR=8 -DWATCHDOG_VERSION_BUILD=3 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/watchdog_fsevents.c -o build/temp.macosx-10.6-intel-3.6/src/watchdog_fsevents.o -std=c99 -pedantic -Wall -Wextra -fPIC -Wno-error=unused-command-line-argument-hard-error-in-future
cc1: error: unrecognized command line option "-Wno-error=unused-command-line-argument-hard-error-in-future"cc1: error: unrecognized command line option "-Wno-error=unused-command-line-argument-hard-error-in-future"

lipo: can't figure out the architecture type of: /var/tmp//ccqYQuD5.out
error: command '/usr/bin/gcc-4.0' failed with exit status 1

...看起来与上面发布的错误非常相似

在我的例子中, gcc-4.2指向/usr/local/bin/gcc-4.2 ,它是 Homebrew 安装的 gcc。 我可以使用/usr/bin/gcc构建看门狗,它是 Apple 的 LLVM Clang。 这似乎是一个路径冲突问题。 谢谢。

请注意,该问题也应使用 #467 修复。

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

alciomarhollanda picture alciomarhollanda  ·  5评论

xsank picture xsank  ·  5评论

bhargavrpatel picture bhargavrpatel  ·  3评论

thomasdot picture thomasdot  ·  4评论

TiagoOliveiraMarques picture TiagoOliveiraMarques  ·  4评论