sib-swiss / pftools3

A suite of tools to build and search generalized profiles
GNU General Public License v2.0
10 stars 7 forks source link

incomplete type compilation issue when compiled on Rocky Linux #23

Closed smoretti closed 2 years ago

smoretti commented 3 years ago

When the pftools are compiled on Rocky Linux (tested on version 8.4) the compilation failed:

Scanning dependencies of target OUTPUT_FORMAT
[ 20%] Building C object src/C/utils/CMakeFiles/OUTPUT_FORMAT.dir/output.c.o
In file included from /pftools3/src/C/utils/output.c:14:
/pftools3/src/C/utils/../include/pfSequence.h:50:18: error: field 'LastModification' has incomplete type
  struct timespec LastModification;
                  ^~~~~~~~~~~~~~~~
make[2]: *** [src/C/utils/CMakeFiles/OUTPUT_FORMAT.dir/build.make:82: src/C/utils/CMakeFiles/OUTPUT_FORMAT.dir/output.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1654: src/C/utils/CMakeFiles/OUTPUT_FORMAT.dir/all] Error 2
make: *** [Makefile:182: all] Error 2

@tschuepb @schoopy do you have an idea what could cause this? Rocky Linux 8 is based on CentOS 8, so maybe pftoolsV3 is not compile-able on this OS.

smoretti commented 3 years ago

If affinity is enabled, compilation works (see #25) @schoopy @tschuepb

So there is something weird when affinity is disabled, like a change in INCLUDE_DIR

lecorguille commented 3 years ago

I still try to compile it with an Ubuntu 20.04

+ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
smoretti commented 3 years ago

Also with -DUSE_AFFINITY=OFF the compilation fails on Ubuntu 20.04 and 18.04

smoretti commented 3 years ago

Thanks to @duboism I think I have now fixed this issue. The fix is in the develop branch

Tested on CentOS7, CentOS8, RockyLinux8, Ubuntu18 and Ubuntu20 As well as on "old" and recent machines with CentOS7