Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install failed in MacOS 10.13.5 due to "src/viztracer/modules/snaptrace.c:7:10: fatal error: 'snaptrace.h' file not found" #3

Closed
thy09 opened this issue Aug 23, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@thy09
Copy link

thy09 commented Aug 23, 2020

Python version: 3.8
Pip version: 19.2.3

building 'viztracer.snaptrace' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/src
creating build/temp.macosx-10.9-x86_64-3.8/src/viztracer
creating build/temp.macosx-10.9-x86_64-3.8/src/viztracer/modules
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/viztracer/modules/snaptrace.c -o build/temp.macosx-10.9-x86_64-3.8/src/viztracer/modules/snaptrace.o
src/viztracer/modules/snaptrace.c:7:10: fatal error: 'snaptrace.h' file not found
#include "snaptrace.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-pa66p68y/viztracer/setup.py'"'"'; file='"'"'/private/tmp/pip-install-pa66p68y/viztracer/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-sm6349sn/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

@gaogaotiantian gaogaotiantian added the bug Something isn't working label Aug 23, 2020
@gaogaotiantian
Copy link
Owner

This is a valid bug.

The reason it happens is because github VM did not behave as I expected (or as my machine did) when it's packing source file. The binaries worked well, but we only built binaries on Catalina(10.15), not Mavericks(10.9). When you try to install it from pip, it falls back to src tar and built from source, which lacks the header file by mistake.

I edit the MANIFEST.in to ensure header file is included in the source tar and fixed this issue on 0.3.2. However, I still recommend to upgrade your OS. 10.9 is a long time ago.

If you can install 0.3.2, you can close this issue(or I can do it if I did not hear from you again :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants