SIMPLE icon indicating copy to clipboard operation
SIMPLE copied to clipboard

Compilation issues...

Open mbelouso opened this issue 10 months ago • 4 comments

Comrades!!!

I was thinking of using SIMPLE for some fun projects over here, and decided to try and compile it on a new workstation. So first some details:

OS: Linux Mint 22.1 (Kernel Version 6.8.0-55) gfortran 13.3.0 gcc 13.3.0 cmake 3.28.3

cmake output seems OK (see below), but when I run make I get the following compilation error (see below). Thanks guys I would love to get this working on my system again! Speak soon!

[ 57%] No update step for 'nodejs_unix'
[ 58%] No patch step for 'nodejs_unix'
[ 58%] No configure step for 'nodejs_unix'
[ 58%] No build step for 'nodejs_unix'
[ 58%] No install step for 'nodejs_unix'
[ 58%] No test step for 'nodejs_unix'
[ 59%] Completed 'nodejs_unix'
[ 59%] Built target nodejs_unix
[ 59%] Installing GUI multiuser ... 

added 1 package, and audited 3 packages in 399ms

found 0 vulnerabilities
[ 59%] Built target gui_multi_unix
[ 59%] Installing precompiled single-user GUI ... 
[ 59%] Built target gui_single_unix
[ 59%] Building Fortran object bin/CMakeFiles/simple_exec.dir/simple_exec/simple_exec.f90.o
[ 59%] Linking CXX executable simple_exec
/usr/bin/ld: warning: json_value_module.f90.o: requires executable stack (because the .note.GNU-stack section is executable)
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libtiff.a(tif_lerc.o): in function `LERCPostEncode':
(.text+0x67d): undefined reference to `lerc_encodeForVersion'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libtiff.a(tif_lerc.o): in function `LERCPreDecode':
(.text+0x1095): undefined reference to `lerc_getBlobInfo'
/usr/bin/ld: (.text+0x118f): undefined reference to `lerc_decode'
/usr/bin/ld: (.text+0x1507): undefined reference to `lerc_decode'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libwebp.a(picture_csp_enc.c.o): in function `ImportYUVAFromRGBA':
(.text+0xed5): undefined reference to `SharpYuvInit'
/usr/bin/ld: (.text+0xedc): undefined reference to `SharpYuvGetConversionMatrix'
/usr/bin/ld: (.text+0xf30): undefined reference to `SharpYuvConvert'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/CMakeFiles/simple_exec.dir/build.make:119: bin/simple_exec] Error 1
make[1]: *** [CMakeFiles/Makefile2:684: bin/CMakeFiles/simple_exec.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

CMAKE OUTPUT:

-- The Fortran compiler identification is GNU 13.3.0
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether /usr/bin/gfortran supports Fortran 2008
-- Checking whether /usr/bin/gfortran supports Fortran 2008 -- yes
-- Checking whether /usr/bin/gfortran supports Fortran 2008 Unicode 10646
-- Checking whether /usr/bin/gfortran supports Unicode 10646 -- yes
-- Checking whether /usr/bin/gfortran supports Fortran 2008 iso_fortran_env compiler_version and compiler_options
-- Checking whether /usr/bin/gfortran supports ISO_FORTRAN_ENV compiler_version/options -- yes
-- Checking whether /usr/bin/gfortran supports variadic macros
-- Checking whether /usr/bin/gfortran supports Fortran variadic macros -- no
-- CMAKE_Fortran_COMPILER_ID: GNU
-- -march=native -fPIC  -std=f2008 -fall-intrinsics -Wintrinsics-std
-- CMAKE_C_FLAGS_RELEASE_INIT:  -O3 -DNDEBUG (Old version)
-- CMAKE_C_FLAGS_DEBUG_INIT:  -g (Old version)
-- CMAKE_CXX_FLAGS_RELEASE_INIT:  -O3 -DNDEBUG (Old version)
-- CMAKE_CXX_FLAGS_DEBUG_INIT:  -g (Old version)
-- CMAKE_C_FLAGS_RELEASE_INIT:   -O3 -DNDEBUG -std=c11 -DGNU
-- CMAKE_C_FLAGS_DEBUG_INIT:   -g -std=c11 -DGNU
-- CMAKE_CXX_FLAGS_RELEASE_INIT:  -O3 -DNDEBUG -std=c++14 -DGNU
-- CMAKE_CXX_FLAGS_DEBUG_INIT:  -g -std=c++14 -DGNU
-- CMAKE_Fortran_FLAGS_RELEASE_INIT:  -O3 -DNDEBUG -O3 (Old version)
-- CMAKE_Fortran_FLAGS_DEBUG_INIT:  -g  (Old version)
-- CMAKE_Fortran_FLAGS_RELEASE_INIT:  -O3 -DNDEBUG -O3 -cpp  -Wp,C,CC,no-endif-labels -ffree-form  -fimplicit-none  -ffree-line-length-none  -fno-second-underscore -march=native -fPIC  -std=f2008 -fall-intrinsics -Wintrinsics-std -Waliasing -Wampersand  -Wsurprising -Wline-truncation -Wreal-q-constant  -O3 -ffrontend-optimize -fno-stack-protector -fno-lifetime-dse  -DGNU
-- CMAKE_Fortran_FLAGS_DEBUG_INIT:   -g -cpp  -Wp,C,CC,no-endif-labels -ffree-form  -fimplicit-none  -ffree-line-length-none  -fno-second-underscore -march=native -fPIC  -std=f2008 -fall-intrinsics -Wintrinsics-std -Waliasing -Wampersand  -Wsurprising -Wline-truncation -Wreal-q-constant  -Og -g -pedantic -fno-inline -fno-f2c -Og -ggdb -fbacktrace  -Wall -Wcompare-reals -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wimplicit-interface -Wno-unused-dummy-argument -Wno-unused-value -Wno-surprising -frange-check -fstack-protector -fstack-check -fbounds-check -fcheck=all -fcheck=array-temps   -DGNU
-- CMAKE_BUILD_TYPE not given, defaulting to RELEASE
-- In ZSetParallelLibrary -- OMP_NUM_PROCS 32
-- Try OpenMP Fortran flag = [-fopenmp]
-- OpenMP testing : -fopenmp
-- Try OpenMP version
--  OpenMP version compilation flag: 0
--  OpenMP version runtime flag: TRUE
--  OpenMP version runtime output: 201511
--  openmp version test output: 201511
--  openmp version test output: 201511
--  openmp version test numerical output: 201511: regex 
-- Setting OpenMP_Fortran_Version to 201511
-- OpenMP Version string cleanup
-- OpenMP Version string = 201511
-- Found OpenMP_Fortran: -fopenmp  
-- Making sure your MPI Fortran compiler enables the USE_MPI flag
-- Making sure your Fortran compiler points to the correct binary
-- FORTRAN ABSPATH /usr/bin/x86_64-linux-gnu-gfortran-13
-- FORTRAN_PARENT_DIR /usr/bin
-- Making sure your C compiler points to the correct binary
-- GCC version: cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- Making sure your C++ compiler points to the correct binary
-- G++ version: c++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- Making sure your preprocessor points to the correct binary
-- C Preprocessor points to /usr/bin/cpp
-- Found Git: /usr/bin/git (found version "2.43.0") 
-- Git version: git4e7a1b3e
-- Git version template : /home/mbelouso/src/SIMPLE/cmake/Modules/GitVersion.h.in
-- Git version template : /home/mbelouso/src/SIMPLE/build/lib/simple/SimpleGitVersion.h
-- Fortran compiler: gfortran
-- Fortran compiler GNU
-- CMAKE_Fortran_FLAGS_RELEASE_INIT:  -O3 -DNDEBUG -O3 -cpp  -Wp,C,CC,no-endif-labels -ffree-form  -fimplicit-none  -ffree-line-length-none  -fno-second-underscore -march=native -fPIC  -std=f2008 -fall-intrinsics -Wintrinsics-std -Waliasing -Wampersand  -Wsurprising -Wline-truncation -Wreal-q-constant  -O3 -ffrontend-optimize -fno-stack-protector -fno-lifetime-dse  -DGNU
-- Build static executables.
-- On glibc-based systems, OpenMP enabled applications cannot be statically linked due to limitations of the underlying pthreads-implementation. It might be possible to get a working solution if -Wl,--whole-archive -lpthread -Wl,--no-whole-archive is added to the command line. However, this is not supported by gcc and thus not recommended.
-- fftw3 found
-- lib: /usr/lib/x86_64-linux-gnu/libfftw3f.a;/usr/lib/x86_64-linux-gnu/libfftw3.a;/usr/lib/x86_64-linux-gnu/libfftw3f_threads.a
-- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.a (found suitable version "4.5.1", minimum required is "4.0.10")  
-- JBIG_LIBRARY: /usr/lib/x86_64-linux-gnu/libjbig.a
-- JPEG_LIBRARY: /usr/lib/x86_64-linux-gnu/libjpeg.a
-- LZMA_LIBRARY: /usr/lib/x86_64-linux-gnu/liblzma.a
-- Z_LIBRARY: /usr/lib/x86_64-linux-gnu/libz.a
-- ZSTD_LIBRARY: /usr/lib/x86_64-linux-gnu/libzstd.a
-- WEBP_LIBRARY: /usr/lib/x86_64-linux-gnu/libwebp.a
-- Deflate_LIBRARY: /usr/lib/x86_64-linux-gnu/libdeflate.a
-- Executing: /usr/bin/gfortran -dumpversion
-- EXTRA_LIBS /usr/lib/x86_64-linux-gnu/libfftw3f.a;/usr/lib/x86_64-linux-gnu/libfftw3.a;/usr/lib/x86_64-linux-gnu/libfftw3f_threads.a;/usr/lib/x86_64-linux-gnu/libtiff.a;/usr/lib/x86_64-linux-gnu/libjbig.a;/usr/lib/x86_64-linux-gnu/libjpeg.a;/usr/lib/x86_64-linux-gnu/liblzma.a;/usr/lib/x86_64-linux-gnu/libz.a;/usr/lib/x86_64-linux-gnu/libzstd.a;/usr/lib/x86_64-linux-gnu/libwebp.a;/usr/lib/x86_64-linux-gnu/libdeflate.a;-lm;SIMPLE3.0.0;/usr/lib/x86_64-linux-gnu/libfftw3f.a;/usr/lib/x86_64-linux-gnu/libfftw3.a;/usr/lib/x86_64-linux-gnu/libfftw3f_threads.a;/usr/lib/x86_64-linux-gnu/libtiff.a;/usr/lib/x86_64-linux-gnu/libjbig.a;/usr/lib/x86_64-linux-gnu/libjpeg.a;/usr/lib/x86_64-linux-gnu/liblzma.a;/usr/lib/x86_64-linux-gnu/libz.a;/usr/lib/x86_64-linux-gnu/libzstd.a;/usr/lib/x86_64-linux-gnu/libwebp.a;/usr/lib/x86_64-linux-gnu/libdeflate.a;-lm
-- Found Perl: /usr/bin/perl (found version "5.38.2") 
CMake Deprecation Warning at gui/CMakeLists.txt:3 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Located pre-built single-user gui binary for linux
-- Set runtime variables. 
-- Test directories tests/test_2D_core_finder;tests/test_3D_core_finder;tests/test_3D_lpbasic;tests/test_3D_opt_filt;tests/test_AFM;tests/test_AFM_IO;tests/test_angres;tests/test_ansi_colors;tests/test_atom_posmatch;tests/test_bfactor;tests/test_binimage;tests/test_binoris;tests/test_bounds_from_mask3D;tests/test_cavg_kpca;tests/test_cc_gradient;tests/test_class_sample;tests/test_clustering;tests/test_common_lines;tests/test_core_atoms;tests/test_correlation;tests/test_corrs2weights;tests/test_corrweights;tests/test_crys_score;tests/test_ctf;tests/test_dists_cluster;tests/test_dock_vols;tests/test_eigh;tests/test_eo_diff;tests/test_euler;tests/test_eval_polarftcc;tests/test_extr_frac;tests/test_fast_corrcalc;tests/test_fileio;tests/test_find_boundaries;tests/test_fit_lattice;tests/test_fm;tests/test_fplane_proj;tests/test_ft_expanded;tests/test_gauss2Dfit;tests/test_gencorrs_fft;tests/test_graphene_mask;tests/test_imgfile;tests/test_inside_write;tests/test_install;tests/test_invlinear_vols;tests/test_io;tests/test_io_parallel;tests/test_kpca;tests/test_lbfgsb;tests/test_lbfgsb_cosine;tests/test_lplims;tests/test_lpstages;tests/test_mask;tests/test_masscen_nano;tests/test_maxnloc;tests/test_memuse;tests/test_mrc_validation;tests/test_multinomal;tests/test_nano_detect_atoms;tests/test_nano_mask;tests/test_nanoparticle;tests/test_neigh;tests/test_openmp;tests/test_opt_genetic;tests/test_opt_lp;tests/test_opt_reg;tests/test_order2D_byresol;tests/test_order_corr;tests/test_ori;tests/test_otsu;tests/test_pca_all;tests/test_pca_imgvar;tests/test_pdb2mrc;tests/test_pdb_register;tests/test_phasecorr;tests/test_picker_comp;tests/test_point_cluster;tests/test_polar2cartesian;tests/test_ptcl_center;tests/test_rad_med;tests/test_radial_cc;tests/test_rank_weights;tests/test_replace_substr;tests/test_reshape2cube;tests/test_rotate_ref;tests/test_seg_regression;tests/test_segpicker;tests/test_serialize;tests/test_shift;tests/test_shiftinvariant;tests/test_shiftsrch;tests/test_simd;tests/test_simnano;tests/test_sp_project;tests/test_speed;tests/test_stack;tests/test_stack_io;tests/test_starexport;tests/test_starfile;tests/test_stringmatch;tests/test_sym;tests/test_tseries_neigh;tests/test_uniform_euler;tests/test_uniform_rot;tests/test_units;tests/test_val_map;tests/test_val_per_atom;tests/test_val_rescale_map
-- Configuring done (1.0s)
-- Generating done (0.2s)
-- Build files have been written to: /home/mbelouso/src/SIMPLE/build

mbelouso avatar Mar 12 '25 09:03 mbelouso

Sorry I should have said that I cloned the latest repo on the 12/03/2025

mbelouso avatar Mar 12 '25 09:03 mbelouso

It looks like a tiff library problem of the GUI. Could you please try to compile without the GUI and see if the compilation works fine? i.e. cmake .. -DGUI=off -DUSE_LIBTIFF=off make -j install

congv avatar Mar 12 '25 19:03 congv

Yep, definitely compiles fine with:

cmake -DUSE_LIBTIFF=off ..

So its clearly an issue with whatever version of tibtiff I'm using.

ldconfig -v | grep tiff

spits out:

	libtiff.so.6 -> libtiff.so.6.0.1
	libtiffxx.so.6 -> libtiffxx.so.6.0.1

So maybe libtiff6 has some different calls?

mbelouso avatar Mar 13 '25 00:03 mbelouso

Hi Matt, you're right, we only supported libtiff.so.5.3 so far, some new dependencies have been added since. It's updated and fixed with latest commit. On my machine that has the same tiff/gcc/cmake versions as yours I can now compile fine without deactivating tiff/eer support. To be clear the linking was missing, you should not have to install anything.

cyrilreboul avatar Mar 13 '25 07:03 cyrilreboul