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

Unable to build on linux #14

Closed
desilinguist opened this issue Aug 18, 2014 · 9 comments
Closed

Unable to build on linux #14

desilinguist opened this issue Aug 18, 2014 · 9 comments

Comments

@desilinguist
Copy link

When I clone the repo and run python setup.py build, I get the error below. I am on a 64-bit machine running RHEL 6.5 and gcc version 4.4.7.

running build
running build_ext
cythoning src/hat_trie.pyx to src/hat_trie.c
building 'hat_trie' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/hat-trie
creating build/temp.linux-x86_64-2.7/hat-trie/src
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ihat-trie/src -I/opt/python/2.7/include/python2.7 -c src/hat_trie.c -o build/temp.linux-x86_64-2.7/src/hat_trie.o
src/hat_trie.c: In function ‘__pyx_gb_8hat_trie_8BaseTrie_20generator’:
src/hat_trie.c:2082: warning: assignment discards qualifiers from pointer target type
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ihat-trie/src -I/opt/python/2.7/include/python2.7 -c hat-trie/src/ahtable.c -o build/temp.linux-x86_64-2.7/hat-trie/src/ahtable.o
In file included from hat-trie/src/ahtable.h:28,
                 from hat-trie/src/ahtable.c:8:
hat-trie/src/pstdint.h:457: error: conflicting types for ‘int64_t’
/usr/include/sys/types.h:198: note: previous declaration of ‘int64_t’ was here
error: command 'gcc' failed with exit status 1
@kmike
Copy link
Member

kmike commented Aug 18, 2014

Hi,

The error seems to be in bundled hat-trie C library. I think the proper place to fix it is https://github.com/dcjones/hat-trie/

@desilinguist
Copy link
Author

Actually, I am able to clone and build the hat-trie C library from that URL just fine. Is it possible that the bundled C library is out of sync?

@kmike
Copy link
Member

kmike commented Aug 18, 2014

It is out of sync, but not much - recent changes to hat-trie C library didn't change anything code-wise. I believe pstdint.h file which caused an exception didn't change. It could be the case distutils uses gcc not the same as makefile from C library repo does, I'm not sure.

Could you please try building this wrapper without the latest commit (b30b294)?

@desilinguist
Copy link
Author

Thanks! I tried that and am still getting the same error. Is there a way to compile the wrapper with a pre-compiled version of the C library instead of using the one bundled with the wrapper?

@mheilman
Copy link
Contributor

Updating pstdint.h to this version seems to fix this. I submitted a PR upstream: dcjones/hat-trie#18

@mheilman
Copy link
Contributor

That PR was merged, and I've submitted this one here to bring in the recent (minor) changes: #15.

@desilinguist
Copy link
Author

Glad to see this has been resolved. Any chance we could do a new release so I can make a conda package via pypi? I can make one manually but it would be nice to be able to use pypi.

@kmike
Copy link
Member

kmike commented Aug 22, 2014

I've release hat-trie 0.2. Thanks for the help! Does it work for you?

@desilinguist
Copy link
Author

It works perfectly! 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