Watchdog: command 'gcc-4.2' failed with exit status 1

Created on 22 Oct 2015  ·  6Comments  ·  Source: gorakhargosh/watchdog

Hello. I'm getting a failed compile (see below), installing on Mac OSX 10.6.

This originally arose when trying to compile other software (https://github.com/getnikola/nikola/issues/2148) and appears to be the same as https://github.com/gorakhargosh/watchdog/issues/323 but the fix doesn't work for me.

Any suggestions?
Thank you!
Gerry.

Installing collected packages: watchdog, nikola
Running setup.py install for watchdog
Complete output from command /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 --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.5
creating build/lib.macosx-10.6-intel-3.5/watchdog
copying src/watchdog/init.py -> build/lib.macosx-10.6-intel-3.5/watchdog
copying src/watchdog/events.py -> build/lib.macosx-10.6-intel-3.5/watchdog
copying src/watchdog/version.py -> build/lib.macosx-10.6-intel-3.5/watchdog
copying src/watchdog/watchmedo.py -> build/lib.macosx-10.6-intel-3.5/watchdog
creating build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/init.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/api.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/fsevents.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/fsevents2.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/inotify.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/inotify_buffer.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/inotify_c.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/kqueue.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/polling.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/read_directory_changes.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
copying src/watchdog/observers/winapi.py -> build/lib.macosx-10.6-intel-3.5/watchdog/observers
creating build/lib.macosx-10.6-intel-3.5/watchdog/tricks
copying src/watchdog/tricks/init.py -> build/lib.macosx-10.6-intel-3.5/watchdog/tricks
creating build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/init.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/bricks.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/compat.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/decorators.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/delayed_queue.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/dirsnapshot.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/echo.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/event_backport.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/importlib2.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/platform.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/unicode_paths.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
copying src/watchdog/utils/win32stat.py -> build/lib.macosx-10.6-intel-3.5/watchdog/utils
running egg_info
writing entry points to src/watchdog.egg-info/entry_points.txt
writing requirements to src/watchdog.egg-info/requires.txt
writing dependency_links to src/watchdog.egg-info/dependency_links.txt
writing top-level names to src/watchdog.egg-info/top_level.txt
writing src/watchdog.egg-info/PKG-INFO
warning: manifest_maker: standard file '-c' not found

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
creating build/temp.macosx-10.6-intel-3.5
creating 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-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
lipo: can't figure out the architecture type of: /var/folders/Mp/MpSSjvV2FL4+8z2Ek3s55++++TI/-Tmp-//ccoFqjhZ.out
error: command 'gcc-4.2' failed with exit status 1


Most helpful comment

CC=/usr/bin/gcc in front of pip install worked for me as well.

All 6 comments

Am getting same issue, additionally trying to build with pip install for python2 and 3 fails:

Collecting watchdog
Using cached watchdog-0.8.3.tar.gz
Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.10 in /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages (from watchdog)
Requirement already satisfied (use --upgrade to upgrade): argh>=0.24.1 in /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages (from watchdog)
Requirement already satisfied (use --upgrade to upgrade): pathtools>=0.1.1 in /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages (from watchdog)
Building wheels for collected packages: watchdog
Running setup.py bdist_wheel for watchdog
Complete output from command /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-:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.4
creating build/lib.macosx-10.6-intel-3.4/watchdog
copying src/watchdog/init.py -> build/lib.macosx-10.6-intel-3.4/watchdog
copying src/watchdog/events.py -> build/lib.macosx-10.6-intel-3.4/watchdog
copying src/watchdog/version.py -> build/lib.macosx-10.6-intel-3.4/watchdog
copying src/watchdog/watchmedo.py -> build/lib.macosx-10.6-intel-3.4/watchdog
creating build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/init.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/api.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/fsevents.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/fsevents2.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/inotify.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/inotify_buffer.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/inotify_c.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/kqueue.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/polling.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/read_directory_changes.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
copying src/watchdog/observers/winapi.py -> build/lib.macosx-10.6-intel-3.4/watchdog/observers
creating build/lib.macosx-10.6-intel-3.4/watchdog/tricks
copying src/watchdog/tricks/init.py -> build/lib.macosx-10.6-intel-3.4/watchdog/tricks
creating build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/init.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/bricks.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/compat.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/decorators.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/delayed_queue.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/dirsnapshot.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/echo.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/event_backport.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/importlib2.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/platform.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/unicode_paths.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
copying src/watchdog/utils/win32stat.py -> build/lib.macosx-10.6-intel-3.4/watchdog/utils
running egg_info
writing src/watchdog.egg-info/PKG-INFO
writing entry points to src/watchdog.egg-info/entry_points.txt
writing dependency_links to src/watchdog.egg-info/dependency_links.txt
writing top-level names to src/watchdog.egg-info/top_level.txt
writing requirements to src/watchdog.egg-info/requires.txt
warning: manifest_maker: standard file '-c' not found

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
creating build/temp.macosx-10.6-intel-3.4
creating 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: 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//cclX9Qwm.out
error: command 'gcc-4.2' failed with exit status 1


Failed building wheel for watchdog
Failed to build watchdog
Installing collected packages: watchdog
Running setup.py install for watchdog
Complete output from command /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'))" install --record /var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T/pip-yl7h5h2t-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
running egg_info
writing top-level names to src/watchdog.egg-info/top_level.txt
writing src/watchdog.egg-info/PKG-INFO
writing requirements to src/watchdog.egg-info/requires.txt
writing dependency_links to src/watchdog.egg-info/dependency_links.txt
writing entry points to src/watchdog.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found

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

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

Command "/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'))" install --record /var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T/pip-yl7h5h2t-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/6w/6bvyw6bj6tv46vl74f7d52hw0000gn/T/pip-build-5a4viveg/watchdog

I got the manual setup.py to work with the following command:

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

The flag path was found using the command "ls -l /usr/bin/gcc*", which returns:

-rwxr-xr-x 1 root wheel 14160 Sep 29 2014 /usr/bin/gcc
-rwxr-xr-x 1 MLR wheel 166128 Feb 11 2011 /usr/bin/gcc-4.2

and I simply specified it to use the other one since gcc-4.2 kept failing. Not sure if this will work for the original poster, but this was my solution.

CC=/usr/bin/gcc in front of pip install worked for me as well.

Doing ls -l /usr/bin/gcc* returns

$ 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

Specifying gcc or gcc-4.0 did not work for me and gave me this:

$ 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

... which looks pretty similar to the errors posted above

In my case, gcc-4.2 is pointed to /usr/local/bin/gcc-4.2 which is gcc installed by Homebrew. I could build watchdog with /usr/bin/gcc which is LLVM Clang by Apple. This seems to a path conflict problem. Thanks.

Note that the issue should be fixed with #467 too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Naatan picture Naatan  ·  3Comments

SamSchott picture SamSchott  ·  4Comments

bhargavrpatel picture bhargavrpatel  ·  3Comments

AdrienPensart picture AdrienPensart  ·  3Comments

TiagoOliveiraMarques picture TiagoOliveiraMarques  ·  4Comments