ismrmrd / ge_to_ismrmrd

GE to ISMRMRD converter
Other
7 stars 10 forks source link

Error building ge_to_ismrmrd #19

Closed atolpadi7 closed 1 year ago

atolpadi7 commented 1 year ago

Hello! Through a lot of debugging (many thanks to some of the previously raised issues here), I was able to install the base ismrmrd. At least through my experience, I needed gcc 4.9.0 to complete the installation--there seem to be breaking changes with versions of gcc that are too far ahead, as with gcc version 12.2.0 the installation failed with what I figured out were gcc version specific errors. Dropping this information here in case it helps anybody else with faster installation, but these are the changes I needed to make to the CMakeLists.txt file to get everything to work:

    set(CMAKE_C_FLAGS               "${CMAKE_C_FLAGS} -std=c99 -Wall")
    set(CMAKE_CXX_FLAGS          "${CMAKE_CXX_FLAGS} -w -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -L path_to_gcc_lib64_folder -lstdc++ -lboost_program_options")
    message(${CMAKE_C_COMPILER})
    message(${CMAKE_CXX_COMPILER})

And this is the cmake command that I ran to compile: cmake -D build4GE=ON -D CMAKE_INSTALL_PREFIX=$ISMRMRD_HOME -D CMAKE_C_COMPILER=path_to_bin_gcc -D CMAKE_CXX_COMPILER=path_to_bin_g++ ..

Having installed ismrmrd, however, I am running into issues installing ge_to_ismrmrd. Specifically I am getting this error and am lost as to how to debug:

$ make install
[ 14%] Building CXX object src/CMakeFiles/g2i.dir/GERawConverter.cpp.o
.../ge_to_ismrmrd/src/GERawConverter.cpp: In member function ‘std::string GEToIsmrmrd::GERawConverter::ge_header_to_xml(GERecon::Legacy::LxDownloadDataPointer, GERecon::Control::ProcessingControlPointer)’:
.../ge_to_ismrmrd/src/GERawConverter.cpp:246:73: error: ‘OtherUID’ is not a member of ‘GEDicom::UID’
     writer.formatElement("OtherUID", "%s",         GEDicom::UID::Create(GEDicom::UID::OtherUID).c_str());
                                                                         ^
.../ge_to_ismrmrd/src/GERawConverter.cpp:303:73: error: ‘Equipment’ is not a member of ‘GEDicom::UID’
     writer.formatElement("UID", "%s",              GEDicom::UID::Create(GEDicom::UID::Equipment).c_str());
                                                                         ^
make[2]: *** [src/CMakeFiles/g2i.dir/GERawConverter.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/g2i.dir/all] Error 2
make: *** [all] Error 2

Some ideas I have had are checking the BOOST and OpenSSL versions that are being used, but those haven't solved this error (although I am admittedly a novice working with cmake so I might not have been implementing those changes in the correct way). And ideas as to what the issues could be?

System Info: -Orchestra 2.1 -GCC 4.9.0 compiler -BOOST 1.74 -OpenSSL 1.1.1 -Linux 7.9 (Maipo)

Any help would be appreciated!

roopchansinghv commented 1 year ago

@atolpadi7 - Thanks for the detailed message!

I had a couple of thoughts, and here they are, in no particular order:

Let us know what you find and run into.

roopchansinghv commented 1 year ago

Hi @atolpadi7 - so I spent a bit of time last updating the GE converter, to use Orchestra 2.1-1

Firstly - this version of Orchestra (2.1-1) does not seem to require external system library support, other than a compiler. The vendor has also updated the versions of the open source libraries supporting Orchestra, so we might be able to remove the specification of the older ABIs in this converter's build pipeline.

Please give the updated converter a try (only cmake/FindOrchestra.cmake, and the main README.md were updated with this latest commit), and let us what happens.

Thanks!

roopchansinghv commented 1 year ago

@atolpadi7 - did you have any further questions, or were you able to work through building the GE converter?

I will close this issue early next week if things are good with your build.

atolpadi7 commented 1 year ago

Hi - I ended up just getting a copy of Orchestra 2.0 and doing an install that way -- took some debugging with my system but things are working properly. Thanks for the help!

roopchansinghv commented 1 year ago

Hi @atolpadi7 - I am glad that you found a solution.

If you decide to try Orchestra 2.1 again and run into issues, please reach out. Thanks!