ecmwf / ecmwflibs

Apache License 2.0
15 stars 9 forks source link

Error in Magics 4.12.0 compiling #7

Closed Darivo-cmd closed 2 years ago

Darivo-cmd commented 2 years ago

Hi, I'm installing Magics last version (4.12.0) for use with CDO but when I invoked make,

darivo@Rivo:~/Magics-4.12.0-Source/build$ sudo cmake ../ -DCMAKE_INSTALL_PREFIX=/opt/cdo-install/ -DECCODES_PATH=/opt/cdo-install/ -DENABLE_NETCDF=ON -DNETCDF_PATH=/opt/cdo-install/ -DENABLE_ODB=ON -DODB_API_PATH=/opt/cdo-install/ -DENABLE_CAIRO=ON -DPROJ4_PATH=/opt/cdo-install/ -DCMAKE_PREFIX_PATH=/opt/cdo-install/usr/local/lib/x86_64-linux-gnu/pkgconfig/ I got the following error: [ 97%] Linking CXX executable ../../bin/metgramx /usr/bin/ld: CMakeFiles/metgramx.dir/metgramx.cc.o: in function TempFile::TempFile()': /home/darivo/Magics-4.12.0-Source/apps/metgram/metgramx.cc:61: warning: the use oftmpnam' is dangerous, better use mkstemp' /usr/bin/ld: ../../lib/libMagPlus.so: undefined reference tocairo_pdf_surface_set_metadata' collect2: error: ld returned 1 exit status make[2]: [apps/metgram/CMakeFiles/metgramx.dir/build.make:106: bin/metgramx] Error 1 make[1]: [CMakeFiles/Makefile2:1319: apps/metgram/CMakeFiles/metgramx.dir/all] Error 2 make: *** [Makefile:166: all] Error 2


I tried to looked around but still blocked at the same place! I'm working on WSL under Windows 10 (Ubuntu 22.04 LTS) I installed all the dependecies under /opt/cdo-install/


I think I've installed all the dependency as mentionned in the ECMWF page


Any help is most welcome! Thanks in advance

sylvielamythepaut commented 2 years ago

Hi, Looking at the error message, the problem seems to come from cairo, I am checking that now. But in the meantime, I would like to ask you one question : You seem to be using ecmwflibs ?In that case you do not need to specifically install Magics, it comes with the installation of the pcakage, but I may be missing something .

Darivo-cmd commented 2 years ago

Dear Sylvie, Thanks in advance for that. I was looking for the specific Github page for Magics but didn't find it. I was redirected to this one. So I posted the issue here. My apologies if it isn't the dedicated place. I was not yet using the ecmwflibs as it is, only eccodes till now. I started using Magics very recently but I encountered a problem with my former installation.

floriankrb commented 2 years ago

Closing as this has nothing to do with ecmwflibs. To have support on Magics, you may want to try https://confluence.ecmwf.int/site/support