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

Issue with json when compiling #4

Closed
RSherman15 opened this issue Jul 2, 2018 · 9 comments
Closed

Issue with json when compiling #4

RSherman15 opened this issue Jul 2, 2018 · 9 comments

Comments

@RSherman15
Copy link

RSherman15 commented Jul 2, 2018

I'm trying to install Paragraph on Linux CentOS 6.9. I am currently using gcc 5.4.0, though I get the same error with 5.1.0.

After running cmake (version 3.8.2) successfully, I get the following error when running 'make' to compile.

Scanning dependencies of target graphIO
[ 64%] Building CXX object external/graphtools-build/src/graphIO/CMakeFiles/graphIO.dir/GraphJson.cpp.o
In file included from /home-4/rsherma8@jhu.edu/bin/packages/paragraph-tools-build/external/graphtools-src/src/graphIO/../../include/graphIO/GraphJson.hh:30:0,
from /home-4/rsherma8@jhu.edu/bin/packages/paragraph-tools-build/external/graphtools-src/src/graphIO/GraphJson.cpp:25:

...

/home-4/rsherma8@jhu.edu/bin/packages/paragraph-tools-build/external/graphtools-src/src/graphIO/../../external/include/nlohmann/json.hpp:17216:25: required from here
/home-4/rsherma8@jhu.edu/bin/packages/paragraph-tools-build/external/graphtools-src/src/graphIO/../../external/include/nlohmann/json.hpp:8678:43: error: logical ‘and’ of mutually exclusive tests is always false [-Werror=logical-op]
const bool is_negative = (x <= 0) and (x != 0); // see issue #755
^
cc1plus: all warnings being treated as errors
make[2]: *** [external/graphtools-build/src/graphIO/CMakeFiles/graphIO.dir/GraphJson.cpp.o] Error 1
make[1]: *** [external/graphtools-build/src/graphIO/CMakeFiles/graphIO.dir/all] Error 2
make: *** [all] Error 2

I found issue #755 in the json repo but they seem to have fixed the issue in release in 2017, and it seems to be related to using the Intel icpc compiler, which I am not using. It does appear that perhaps it also appears with gcc 5.2; I tried using gcc 4.9.2 instead of 5.1.0 or 5.4.0, but gcc 4.9.0 yielded other errors, before this point in the compilation process. If this is related to gcc version, what version(s) has Paragraph been successfully compiled with?

@RSherman15
Copy link
Author

Solved by making the change made in this commit to json.hpp

However, I'm leaving this open since the json.hpp file included in Paragraph should probably be updated.

@egor-dolzhenko
Copy link
Contributor

Thank you for reporting and solving the issue! All developers are off this week but we will incorporate the fix early next week. Also, if you’d like, please feel free to make a pull request.

-Egor

@fritzsedlazeck
Copy link

Hi Guys,
have you had a chance to fix this. I am running into the same problem on our cluster.
Thx
Fritz

@felixschlesinger
Copy link

I couldn't reproduce this build issue, even after installing gcc5 (5.5) on my system. But I made a branch with the change suggested by @RSherman15. Could you try branch 'GH4' and let me know if it works for you. If yes, we can make a hotfix release with that.
Longer term, for the next paragraph release, we'll update the library or remove the dependency completely

@pkrusche
Copy link
Contributor

Also I have created a repository that show how to compile on CentOS + has a script create a binary using Docker that can then just be unpacked + run on CentOS.

https://github.com/pkrusche/CentOS-Docker-build

Hope this is useful!

@pkrusche
Copy link
Contributor

@RSherman15 does the last version fix this for you? I’ve tried it from scratch on Ubuntu 16.04 with gcc 5.4 and it looks fine there.

@RSherman15
Copy link
Author

Since I was able to get it compiled by modifying the included json.hpp file, I'm not sure if the Docker build works or not as I haven't tried it - sorry!

@zakalibit
Copy link

I changed to this and it makes compiler happy

const bool is_negative = !(x>=0);

@pkrusche
Copy link
Contributor

pkrusche commented Sep 3, 2018

I think the Docker build should be working now. I've created a PR here: #11 to fix an unrelated Docker build issue that has come up because we were using Ubuntu 17.04 as a base.

@pkrusche pkrusche closed this as completed Sep 3, 2018
pkrusche added a commit that referenced this issue Sep 18, 2018
Full Boost included — for Travis
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

6 participants