LBEM-CH / focus

High Throughput Electron Microscopy Image Processing Software
http://www.focus-em.org
GNU General Public License v2.0
35 stars 14 forks source link

building version 1.1.0 fails on Ubuntu 22.04 #250

Open alexmyczko opened 5 months ago

alexmyczko commented 5 months ago
[ 12%] Built target 2dx_avrgamphs
[ 12%] Linking Fortran executable 2dx_boximage.exe
/usr/bin/ld: CMakeFiles/2dx_boximage.dir/2dx_boximage.for.o: in function `MAIN__':
2dx_boximage.for:(.text+0x92): undefined reference to `imopen_'
/usr/bin/ld: 2dx_boximage.for:(.text+0xb7): undefined reference to `imopen_'
/usr/bin/ld: 2dx_boximage.for:(.text+0xfd): undefined reference to `irdhdr_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x110): undefined reference to `irtcel_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x322): undefined reference to `icrhdr_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x331): undefined reference to `itrlab_'
/usr/bin/ld: 2dx_boximage.for:(.text+0xaca): undefined reference to `ialorg_'
/usr/bin/ld: 2dx_boximage.for:(.text+0xae3): undefined reference to `ialsiz_'
/usr/bin/ld: 2dx_boximage.for:(.text+0xbbd): undefined reference to `iwrhdr_'
/usr/bin/ld: 2dx_boximage.for:(.text+0xd4f): undefined reference to `irdpal_'
/usr/bin/ld: 2dx_boximage.for:(.text+0xe26): undefined reference to `irdpal_'
/usr/bin/ld: 2dx_boximage.for:(.text+0xecd): undefined reference to `irdpal_'
/usr/bin/ld: 2dx_boximage.for:(.text+0xf53): undefined reference to `irdpal_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x1730): undefined reference to `ialorg_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x1749): undefined reference to `ialsiz_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x1758): undefined reference to `ialcel_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x1822): undefined reference to `iwrhdr_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x1970): undefined reference to `irdpal_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x19d3): undefined reference to `irdpal_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x1bfa): undefined reference to `irdpal_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x1c6f): undefined reference to `irdpal_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x1e60): undefined reference to `iwrlin_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x1ef1): undefined reference to `irdlin_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x21f6): undefined reference to `iwrlin_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x23b9): undefined reference to `iwrlin_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x24d7): undefined reference to `irdlin_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x26e6): undefined reference to `iwrlin_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x27ae): undefined reference to `iwrlin_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x282a): undefined reference to `iwrhdr_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x29af): undefined reference to `imclose_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x29bb): undefined reference to `imclose_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x2a8b): undefined reference to `iwrlin_'
/usr/bin/ld: 2dx_boximage.for:(.text+0x2af6): undefined reference to `iwrhdr_'
collect2: error: ld returned 1 exit status
make[2]: *** [kernel/mrc/source/CMakeFiles/2dx_boximage.dir/build.make:107: kernel/mrc/source/2dx_boximage.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:1745: kernel/mrc/source/CMakeFiles/2dx_boximage.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Build failed for Focus
sthennin commented 5 months ago

You may use the wrong compiler. What system, which software version, which compiler environment is that on? You have to follow the instructions here: https://lbem-focus.epfl.ch/wiki/doku.php?id=1_0:install-source

alexmyczko commented 5 months ago

I did, I have:

dpkg -l cmake gfortran g++ libfftw3-dev qtscript5-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version        Architecture Description
+++-===================-==============-============-===========================================================
ii  cmake               3.28.1-1       amd64        cross-platform, open-source make system
ii  g++                 4:13.2.0-4     amd64        GNU C++ compiler
ii  gfortran            4:13.2.0-4     amd64        GNU Fortran 95 compiler
ii  libfftw3-dev:amd64  3.3.10-1       amd64        Library for computing Fast Fourier Transforms - development
ii  qtscript5-dev:amd64 5.15.10+dfsg-2 amd64        Qt 5 script development files

The same on Ubuntu 22.04 as well as Debian GNU/Linux sid.

sthennin commented 5 months ago

Somehow, your compiler doesn't find the libraries in .../focus/kernel/mrc/lib. These should have been compiled first, and the linker then needs to find those. IWRLIN and IMCLOSE etc. are all from those image2000 libraries.

My guess is that this has to do with the version of gcc / g++ used.

alexmyczko commented 5 months ago

Using ./build_all and gcc-12/g++-12 it builds... until 18% (master) Also tried versions 9, and 11. With the same failure. I would like some help here, maybe you can send a full successfull ./build_all output with the detail which Debian or Ubuntu versions of cmake, g++, gfortran, libfftw3-dev, qtscript5-dev you are using?

And maybe a new release tag would be nice too?