Coder Social home page Coder Social logo

building about petmr-resolute HOT 8 CLOSED

ucl avatar ucl commented on June 25, 2024
building

from petmr-resolute.

Comments (8)

bathomas avatar bathomas commented on June 25, 2024

Hi Michael,

a) It seems that the requirement for C++ 11 wasn't picked up. nlohmann/json will not work on older gcc versions < 4.9 (see this). I've modified the CMakeLists.txt. Can you try the ubuntu-build#5 branch?

b) cmake -DITK_DIR=/path/to/ITK/BUILD/DIR is probably what you want.

Please let me know if this works and I will merge to master.

Kind regards,

Ben

from petmr-resolute.

michaelf500 avatar michaelf500 commented on June 25, 2024

Hi Ben

I think I got the c++ error by running cmake in the src directory, so probably that isn't actually a problem.

However, I'm still having no luck with the ITK. I got that along with ANTS, and am running

cmake . -DANTs_SOURCE_DIR=/mnt/edrive/MJF/ants/ANTs -DANTs_LIBRARY_DIR=/mnt/edrive/MJF/ants/antsbin/lib/ -DITK_DIR=/mnt/edrive/MJF/ants/antsbin/ITKv4-build

followed by make, and I get:


[ 25%] Building CXX object src/CMakeFiles/resolute.dir/Resolute.cpp.o
[ 50%] Building CXX object src/CMakeFiles/resolute.dir/mnt/edrive/MJF/ants/ANTs/Examples/antsRegistration.cxx.o
[ 75%] Building CXX object src/CMakeFiles/resolute.dir/mnt/edrive/MJF/ants/ANTs/Examples/antsApplyTransforms.cxx.o
[100%] Linking CXX executable resolute
/mnt/edrive/MJF/ants/antsbin/lib/libantsUtilities.a(antsRegistration2DDouble.cxx.o): In function `itk::GradientDescentOptimizerBasev4Template<double>::~GradientDescentOptimizerBasev4Template()':
antsRegistration2DDouble.cxx:(.text._ZN3itk38GradientDescentOptimizerBasev4TemplateIdED2Ev[_ZN3itk38GradientDescentOptimizerBasev4TemplateIdED5Ev]+0x178): undefined reference to `itk::ObjectToObjectOptimizerBaseTemplate<double>::~ObjectToObjectOptimizerBaseTemplate()'
...

with a whole load of undefined ITK references. Any suggestions appreciated

Thanks

Michael

from petmr-resolute.

bathomas avatar bathomas commented on June 25, 2024

Did ANTS build successfully? If you go to ANTs-build and run make test does this work?

from petmr-resolute.

michaelf500 avatar michaelf500 commented on June 25, 2024

Hi

ANTs seems to build successfully. make test passes most tests:



99% tests passed, 3 tests failed out of 221

Total Test time (real) = 332.48 sec

The following tests FAILED:
	  3 - antsRegistrationTest_AffineRotationMasks (Failed)
	 15 - antsRegistrationTest_SimilarityRotationMasks (Failed)
	 25 - antsRegistrationTest_initializePerStage_ComparisonTesting (Failed)
Errors while running CTest
Makefile:149: recipe for target 'test' failed
make: *** [test] Error 8

Thanks

Michael

from petmr-resolute.

bathomas avatar bathomas commented on June 25, 2024

Hmmm, okay. So here are a few questions/suggestions:

  • Does ITK pass its tests? ITK testing in the ANTs SuperBuild is disabled. To enable it, turn testing on in cmake for the ITKv4-build directory using BUILD_TESTING=ON. Then make && make test. (This will take a while as a fair amount of test data needs to be downloaded).
  • What version of ANTs are you using? I built version 2.2.0 on Ubuntu 14.04 (via Travis) and there was no problem.
  • What compiler are you using?
  • What version of CMake are you running?

from petmr-resolute.

michaelf500 avatar michaelf500 commented on June 25, 2024

ITK passes all tests.
100% tests passed, 0 tests failed out of 2434

I'm also with Ants 2.2.0 (built following https://brianavants.wordpress.com/2012/04/13/updated-ants-compile-instructions-april-12-2012/ )

gcc version 5.4.1

cmake version 3.10.3 (Ubuntu has 3.5.1 installed, this was producing the same errors, I removed it and installed 3.10.3)

Best wishes

Michael

from petmr-resolute.

bathomas avatar bathomas commented on June 25, 2024

Hi, I built a 16.04 VM to test this. It turns out that the order which the libraries are specified matters. ${ANTS_LIBS} must come before ${ITK_LIBRARIES}. If you try the ubuntu#5 branch, you should hopefully be able to build now. Thanks for pointing this out, as it does not appear to be an issue on macOS.

Kind regards,

Ben

from petmr-resolute.

michaelf500 avatar michaelf500 commented on June 25, 2024

Thanks, the ubuntu#5 branch now compiles, and the executable runs (produces help and version info).

Best wishes

Michael

from petmr-resolute.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.