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

0.2.2 fails to build #44

Closed
anntzer opened this issue Jan 18, 2016 · 8 comments
Closed

0.2.2 fails to build #44

anntzer opened this issue Jan 18, 2016 · 8 comments

Comments

@anntzer
Copy link

anntzer commented Jan 18, 2016

Python 3.5/Arch Linux

$ pip install --user --no-deps --vvv vmprof
<elided>
    building '_vmprof' extension
    gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/usr/include/python3.5m -c src/_vmprof.c -o build/temp.linux-x86_64-3.5/src/_vmprof.o -Wno-unused
    In file included from src/_vmprof.c:29:0:
    src/vmprof_main.h: In function ‘get_current_thread_state’:
    src/vmprof_main.h:101:12: error: ‘_PyThreadState_Current’ undeclared (first use in this function)
         return _PyThreadState_Current;
                ^
    src/vmprof_main.h:101:12: note: each undeclared identifier is reported only once for each function it appears in
    In file included from src/_vmprof.c:29:0:
    src/vmprof_main.h: In function ‘vmprof_register_virtual_function’:
    src/vmprof_main.h:348:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if (freesize < blocklen) {
                              ^
    In file included from src/_vmprof.c:29:0:
    src/vmprof_main.h: In function ‘get_current_thread_state’:
    src/vmprof_main.h:103:1: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
    error: command 'gcc' failed with exit status 1
@fijal
Copy link
Member

fijal commented Jan 18, 2016

uh, this is really strange can you describe your system and python version? (_PyThreadState_Current should definitely be a symbol)

@anntzer
Copy link
Author

anntzer commented Jan 18, 2016

It's Python3.5 from the standard Arch Linux packages.

@myint
Copy link
Contributor

myint commented Jan 18, 2016

I can reproduce this on OS X (though I'm not sure if OS X is supported yet).

$ pip install --user vmprof
Collecting vmprof
  Downloading vmprof-0.2.2.tar.gz
...
  Running setup.py install for vmprof
    Complete output from command /opt/local/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-build-krh2q3dd/vmprof/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-7mj4a0t_-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    running build_py
    running egg_info
    writing vmprof.egg-info/PKG-INFO
    writing dependency_links to vmprof.egg-info/dependency_links.txt
    writing requirements to vmprof.egg-info/requires.txt
    writing top-level names to vmprof.egg-info/top_level.txt
    writing entry points to vmprof.egg-info/entry_points.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'vmprof.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'src/hotpatch/libdwarf.a'
    writing manifest file 'vmprof.egg-info/SOURCES.txt'
    running build_ext
    building '_vmprof' extension
    /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Os -I/opt/local/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c src/_vmprof.c -o build/temp.macosx-10.9-x86_64-3.5/src/_vmprof.o -Wno-unused
    In file included from src/_vmprof.c:29:
    In file included from src/vmprof_main.h:34:
    src/vmprof_mt.h:68:46: error: use of undeclared identifier 'MAP_ANONYMOUS'
                                   MAP_PRIVATE | MAP_ANONYMOUS,
                                                 ^
    In file included from src/_vmprof.c:29:
    src/vmprof_main.h:101:12: error: use of undeclared identifier '_PyThreadState_Current'
        return _PyThreadState_Current;
               ^
    src/vmprof_main.h:348:26: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Wsign-compare]
                if (freesize < blocklen) {
                    ~~~~~~~~ ^ ~~~~~~~~
    1 warning and 2 errors generated.
    error: command '/usr/bin/clang' failed with exit status 1

    ----------------------------------------
Command "/opt/local/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-build-krh2q3dd/vmprof/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-7mj4a0t_-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /private/var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-build-krh2q3dd/vmprof

$ python --version
Python 3.5.1

The undeclared _PyThreadState_Current error does not show up on Python 2.7 on the same machine.

@fijal
Copy link
Member

fijal commented Jan 18, 2016

it's really strange, I definitely managed to build it on python 3.5 on OS X. Let me try again. Where did you get your python from?

@myint
Copy link
Contributor

myint commented Jan 18, 2016

MacPorts.

@fijal
Copy link
Member

fijal commented Jan 18, 2016

ah, macports ships 3.5.1 and I have 3.5.0 that have different visibility of symbols. Just great :-/ Let me try to build from trunk

@fijal
Copy link
Member

fijal commented Jan 18, 2016

That should work now. Please reopen if it continues

@fijal fijal closed this as completed Jan 18, 2016
@anntzer
Copy link
Author

anntzer commented Jan 18, 2016

Seems fixed indeed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants