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

Crosscat build fails in anaconda environment: "cpp_code/src/weakprng.cpp:314:38: error: ‘UINT64_C’ was not declared in this scope~ #96

Closed
alxempirical opened this issue Apr 29, 2016 · 6 comments

Comments

@alxempirical
Copy link
Contributor

Dockerfile and output below.

FROM continuumio/anaconda

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y g++ git libboost-dev
RUN conda install conda-build
# Build crosscat package
RUN conda skeleton pypi crosscat && conda build crosscat && rm -rf crosscat
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Icpp_code/include/CrossCat -I/opt/conda/envs/_build/lib/python2.7/site-packages/numpy/core/include -I/opt/conda/envs/_build/include/python2.7 -c cpp_code/src/weakprng.cpp -o build/temp.linux-x86_64-2.7/cpp_code/src/weakprng.o
cpp_code/src/weakprng.cpp: In function ‘int crypto_weakprng_selftest()’:
cpp_code/src/weakprng.cpp:314:38: error: ‘UINT64_C’ was not declared in this scope
error: command 'gcc' failed with exit status 1
@riastradh-probcomp
Copy link
Contributor

Environment? OS? C compiler?

@alxempirical
Copy link
Contributor Author

OS is debian wheezy, gcc version is 4.7.2. Full environment is as described in that Dockerfile. I've pushed the image to alxempirical/crosscat-build, in case it's useful. The aborted build is in /crosscat.

root@0170cc6539d5:/# cat /etc/issue
Debian GNU/Linux 7 \n \l
root@0170cc6539d5:/# gcc --version
gcc (Debian 4.7.2-5) 4.7.2

@alxempirical
Copy link
Contributor Author

I've pushed the image

It's like a gig, though, so it may be faster to build directly.

@riastradh-probcomp
Copy link
Contributor

Guess weakprng.cpp needs #define __STDC_CONSTANT_MACROS at the top -- not sure why Ubuntu 14.04 / GCC 4.8 doesn't fail this way.

riastradh-probcomp added a commit that referenced this issue Apr 29, 2016
This macro enables C99 stdint.h to work in C++98.  The need for this
was obviated by C++11, and the macro removed in C11, so newer glibc
stdint.h does not require __STDC_CONSTANT_MACROS even for C++98, but
defining the macro makes it easier to use this with slightly older
versions of glibc (such as the GCC 4.7 found in Debian Wheezy) or
other systems and is harmless otherwise.

Should fix Github issue #96.
@riastradh-probcomp
Copy link
Contributor

Try again?

@alxempirical
Copy link
Contributor Author

Thanks. master now builds in that environment, and I can work with that.

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

2 participants