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

Compiling on Mac #10

Open
arv832 opened this issue Nov 29, 2018 · 5 comments
Open

Compiling on Mac #10

arv832 opened this issue Nov 29, 2018 · 5 comments

Comments

@arv832
Copy link

arv832 commented Nov 29, 2018

Hi, I am trying to compile your project on a Mac, I get:
Scanning dependencies of target vega_dev
Scanning dependencies of target vega
[ 1%] Building CXX object CMakeFiles/vega.dir/src/vega/anonymizer.cpp.o
[ 1%] Building CXX object CMakeFiles/vega_dev.dir/src/vega/anonymizer.cpp.o
[ 4%] Building CXX object CMakeFiles/vega_dev.dir/src/vega/controller.cpp.o
[ 4%] Building CXX object CMakeFiles/vega_dev.dir/src/vega/dicom/data_set.cpp.o
[ 4%] Building CXX object CMakeFiles/vega_dev.dir/src/vega/dicom/data_element.cpp.o
[ 4%] Building CXX object CMakeFiles/vega.dir/src/vega/controller.cpp.o
[ 4%] Building CXX object CMakeFiles/vega_dev.dir/src/vega/dicom/file_meta.cpp.o
[ 4%] Building CXX object CMakeFiles/vega_dev.dir/src/vega/dicom/file.cpp.o
[ 6%] Building CXX object CMakeFiles/vega.dir/src/vega/dicom/file.cpp.o
[ 6%] Building CXX object CMakeFiles/vega.dir/src/vega/dicom/data_element.cpp.o
[ 6%] Building CXX object CMakeFiles/vega.dir/src/vega/dicom/data_set.cpp.o
(cv) iMac:build andrew$ more log
In file included from /Volumes/andrew/projects/radiology/vega/src/vega/dicom/data_element.cpp:1:
In file included from /Volumes/andrew/projects/radiology/vega/include/vega/dicom/data_element.h:11:
In file included from /Volumes/andrew/projects/radiology/vega/include/vega/dictionary/dictionary.h:9:
In file included from /Volumes/andrew/projects/radiology/vega/include/vega/dictionary/page.h:7:
/Volumes/andrew/projects/radiology/vega/include/vega/vm.h:23:17: error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]
constexpr VM() : m_limits(std::make_pair(1,1)), m_multiple(false) {}
^
/Volumes/andrew/projects/radiology/vega/include/vega/vm.h:23:24: note: non-constexpr constructor 'pair<int, int, false>' cannot be used in a constant expression
constexpr VM() : m_limits(std::make_pair(1,1)), m_multiple(false) {}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:464:5: note: declared here
pair(pair<_U1, _U2>&& __p)
^

Would appreciate a fix, many thanks

Andrew

@project-eutopia
Copy link
Owner

@arv832 Thanks for pointing this out. Unfortunately I do not have a Mac to test a fix on. I made a tentative PR #11. Would you be able to pull that branch and see if things work?

@project-eutopia
Copy link
Owner

If the problem has to do with using std::pair, I can update the code to store two separate variables instead to avoid the problem.

@arv832
Copy link
Author

arv832 commented Nov 29, 2018

I think the problem is std::make_pair(1,1) does not infer types in a C++11 compatible way.

@project-eutopia
Copy link
Owner

That makes sense. Were you able to check to see if the branch compiles for you on Mac?

@project-eutopia
Copy link
Owner

@arv832 I do not know if #11 fixes the problem you had, but I went ahead and merged it anyway because it at least updated the tests to try both gcc and clang, including a fix to get clang to work.

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