TimoLassmann/samstat

2.2.2 build issues

Opened this issue · 6 comments

Trying to build this on the HPC running CentOS 7 that i manage, and the instructions arent working:

[root@cc-dclrilog61 samstat]# module list
Currently Loaded Modulefiles:
7) hdf5_18/1.8.20 8) gcc/8.2.0 9) cmake/3.9.1

[root@cc-dclrilog61 ~]# git clone https://github.com/TimoLassmann/samstat.git
[root@cc-dclrilog61 ~]# cd samstat
[root@cc-dclrilog61 samstat]# mkdir build
[root@cc-dclrilog61 build]# cd build
[root@cc-dclrilog61 build]# cmake -DCMAKE_INSTALL_PREFIX=/cm/shared/apps/samstats/2.2.2 ..
-- The C compiler identification is GNU 8.2.0
-- Check for working C compiler: /cm/local/apps/gcc/8.2.0/bin/gcc
-- Check for working C compiler: /cm/local/apps/gcc/8.2.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Submodule update
You need to run this command from the toplevel of the working tree.
CMake Error at src/CMakeLists.txt:12 (message):
git submodule update --init --recursive failed with 1, please checkout
submodules
-- Configuring incomplete, errors occurred!
See also "/root/temp/samstat/build/CMakeFiles/CMakeOutput.log".

And no matter what i do, it fails with the same submodule error, even if i cd .. and run that command, still fails to build

Any thoughts?

sahuno commented

hi, i have same issue. pls can anyone help?

Hi both, unfortunately I am unable to replicate this error on my machine. Could you provide the error log: CMakeOutput.log ?

sahuno commented

hi @TimoLassmann ,
please see log file

The system is: Linux - 3.10.0-1160.45.1.el7.x86_64 - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc 
Build flags: 
Id flags: 

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/3.7.2/CompilerIdC/a.out"

Determining if the C compiler works passed with the following output:
Change Dir: /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_442f2/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_442f2.dir/build.make CMakeFiles/cmTC_442f2.dir/build
gmake[1]: Entering directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_442f2.dir/testCCompiler.c.o
/usr/bin/cc     -o CMakeFiles/cmTC_442f2.dir/testCCompiler.c.o   -c /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_442f2
/admin/opt/common/cmake/cmake-3.7.2-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_442f2.dir/link.txt --verbose=1
/usr/bin/cc       CMakeFiles/cmTC_442f2.dir/testCCompiler.c.o  -o cmTC_442f2 -rdynamic 
gmake[1]: Leaving directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'


Detecting C compiler ABI info compiled with the following output:
Change Dir: /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_d0892/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_d0892.dir/build.make CMakeFiles/cmTC_d0892.dir/build
gmake[1]: Entering directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d0892.dir/CMakeCCompilerABI.c.o
/usr/bin/cc     -o CMakeFiles/cmTC_d0892.dir/CMakeCCompilerABI.c.o   -c /admin/opt/common/cmake/cmake-3.7.2-Linux-x86_64/share/cmake-3.7/Modules/CMakeCCompilerABI.c
Linking C executable cmTC_d0892
/admin/opt/common/cmake/cmake-3.7.2-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d0892.dir/link.txt --verbose=1
/usr/bin/cc      -v CMakeFiles/cmTC_d0892.dir/CMakeCCompilerABI.c.o  -o cmTC_d0892 -rdynamic  
Using built-in specs.
COLLECT_GCC=/usr/bin/cc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d0892' '-rdynamic' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2 --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_d0892 /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. CMakeFiles/cmTC_d0892.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o
gmake[1]: Leaving directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'


Parsed C implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command:"/usr/bin/gmake" "cmTC_d0892/fast"]
  ignore line: [/usr/bin/gmake -f CMakeFiles/cmTC_d0892.dir/build.make CMakeFiles/cmTC_d0892.dir/build]
  ignore line: [gmake[1]: Entering directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp']
  ignore line: [Building C object CMakeFiles/cmTC_d0892.dir/CMakeCCompilerABI.c.o]
  ignore line: [/usr/bin/cc     -o CMakeFiles/cmTC_d0892.dir/CMakeCCompilerABI.c.o   -c /admin/opt/common/cmake/cmake-3.7.2-Linux-x86_64/share/cmake-3.7/Modules/CMakeCCompilerABI.c]
  ignore line: [Linking C executable cmTC_d0892]
  ignore line: [/admin/opt/common/cmake/cmake-3.7.2-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d0892.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/cc      -v CMakeFiles/cmTC_d0892.dir/CMakeCCompilerABI.c.o  -o cmTC_d0892 -rdynamic  ]
  ignore line: [Using built-in specs.]
  ignore line: [COLLECT_GCC=/usr/bin/cc]
  ignore line: [COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper]
  ignore line: [Target: x86_64-redhat-linux]
  ignore line: [Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux]
  ignore line: [Thread model: posix]
  ignore line: [gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ]
  ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/]
  ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../:/lib/:/usr/lib/]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d0892' '-rdynamic' '-mtune=generic' '-march=x86-64']
  link line: [ /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2 --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_d0892 /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. CMakeFiles/cmTC_d0892.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o]
    arg [/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2] ==> ignore
    arg [--build-id] ==> ignore
    arg [--no-add-needed] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [--hash-style=gnu] ==> ignore
    arg [-m] ==> ignore
    arg [elf_x86_64] ==> ignore
    arg [-export-dynamic] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_d0892] ==> ignore
    arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o] ==> ignore
    arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o] ==> ignore
    arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o] ==> ignore
    arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5]
    arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64]
    arg [-L/lib/../lib64] ==> dir [/lib/../lib64]
    arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64]
    arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../..] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../..]
    arg [CMakeFiles/cmTC_d0892.dir/CMakeCCompilerABI.c.o] ==> ignore
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o] ==> ignore
    arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o] ==> ignore
  remove lib [gcc]
  remove lib [gcc_s]
  remove lib [gcc]
  remove lib [gcc_s]
  collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5] ==> [/usr/lib/gcc/x86_64-redhat-linux/4.8.5]
  collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64] ==> [/usr/lib64]
  collapse library dir [/lib/../lib64] ==> [/lib64]
  collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64]
  collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../..] ==> [/usr/lib]
  implicit libs: [c]
  implicit dirs: [/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib]
  implicit fwks: []




Detecting C [-std=c11] compiler features compiled with the following output:
Change Dir: /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_990e2/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_990e2.dir/build.make CMakeFiles/cmTC_990e2.dir/build
gmake[1]: Entering directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_990e2.dir/feature_tests.c.o
/usr/bin/cc    -std=c11 -o CMakeFiles/cmTC_990e2.dir/feature_tests.c.o   -c /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/feature_tests.c
Linking C executable cmTC_990e2
/admin/opt/common/cmake/cmake-3.7.2-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_990e2.dir/link.txt --verbose=1
/usr/bin/cc       CMakeFiles/cmTC_990e2.dir/feature_tests.c.o  -o cmTC_990e2 -rdynamic 
gmake[1]: Leaving directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'


    Feature record: C_FEATURE:1c_function_prototypes
    Feature record: C_FEATURE:1c_restrict
    Feature record: C_FEATURE:1c_static_assert
    Feature record: C_FEATURE:1c_variadic_macros


Detecting C [-std=c99] compiler features compiled with the following output:
Change Dir: /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_7a817/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_7a817.dir/build.make CMakeFiles/cmTC_7a817.dir/build
gmake[1]: Entering directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_7a817.dir/feature_tests.c.o
/usr/bin/cc    -std=c99 -o CMakeFiles/cmTC_7a817.dir/feature_tests.c.o   -c /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/feature_tests.c
Linking C executable cmTC_7a817
/admin/opt/common/cmake/cmake-3.7.2-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7a817.dir/link.txt --verbose=1
/usr/bin/cc       CMakeFiles/cmTC_7a817.dir/feature_tests.c.o  -o cmTC_7a817 -rdynamic 
gmake[1]: Leaving directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'


    Feature record: C_FEATURE:1c_function_prototypes
    Feature record: C_FEATURE:1c_restrict
    Feature record: C_FEATURE:0c_static_assert
    Feature record: C_FEATURE:1c_variadic_macros


Detecting C [-std=c90] compiler features compiled with the following output:
Change Dir: /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_b6aa2/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_b6aa2.dir/build.make CMakeFiles/cmTC_b6aa2.dir/build
gmake[1]: Entering directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b6aa2.dir/feature_tests.c.o
/usr/bin/cc    -std=c90 -o CMakeFiles/cmTC_b6aa2.dir/feature_tests.c.o   -c /lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/feature_tests.c
Linking C executable cmTC_b6aa2
/admin/opt/common/cmake/cmake-3.7.2-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b6aa2.dir/link.txt --verbose=1
/usr/bin/cc       CMakeFiles/cmTC_b6aa2.dir/feature_tests.c.o  -o cmTC_b6aa2 -rdynamic 
gmake[1]: Leaving directory `/lila/data/greenbaum/users/ahunos/apps/samstat/build/CMakeFiles/CMakeTmp'


    Feature record: C_FEATURE:1c_function_prototypes
    Feature record: C_FEATURE:0c_restrict
    Feature record: C_FEATURE:0c_static_assert
    Feature record: C_FEATURE:0c_variadic_macros

I did some testing on my end and it seems that I inadvertently included new cmake commands that were not supported in cmake version 3.1. This might be cause of the problem. Could you download a more recent version of cmake (e.g. >3.20) and see if this solves your issue? Thanks, T

bounlu commented

Currently I have the below issue during building from the source:

cd /tmp && \
git clone https://github.com/TimoLassmann/samstat.git && \
cd samstat && \
mkdir build && \
cd build && \
cmake .. && \
make && \
make install
[ 45%] Linking C executable samstat
/usr/bin/ld: CMakeFiles/samstat.dir/param/param.c.o: in function `print_help':
param.c:(.text+0x671): undefined reference to `tlfilename'
/usr/bin/ld: CMakeFiles/samstat.dir/report/stat_report.c.o: in function `write_buffer':
stat_report.c:(.text+0x2b2): undefined reference to `tlfilename'
/usr/bin/ld: CMakeFiles/samstat.dir/report/stat_report.c.o: in function `stat_report':
stat_report.c:(.text+0x1bbb): undefined reference to `tlfilename'
/usr/bin/ld: stat_report.c:(.text+0x1c1b): undefined reference to `tlfilename'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/samstat.dir/build.make:242: src/samstat] Error 1
make[1]: *** [CMakeFiles/Makefile2:311: src/CMakeFiles/samstat.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

1919f0d caused the break.

@bounlu Whoops! This should now be fixed.