Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After installing all dependencies, the very next step is to install IMAS itself. During this installation the cpp interface component is complaining about blitz not being compiled in thread-safe  manner and suggests that maybe the -pthread flag was missing during Blitz compilation/installation. The bad news is that the whole eco-system was compiled using at least those two flags: '-fPIC -pthread', therefore the error is confusing. Below you can find an error message from reproduction attempt: 

Code Block
make -C ./src/3.36.0/ual/4.10.1/examples/cpp all || exit 1
make[2]: Entering directory `/marconi_work/FUSIO_HLST/msmukows/IMAS_INSTALLER/intel_installer/src/3.36.0/ual/4.10.1/examples/cpp'
icpc `pkg-config blitz --cflags` -I/marconi_work/FUSIO_HLST/msmukows/IMAS_INSTALLER/intel_installer/src/3.36.0/ual/4.10.1/cppinterface/src -I/marconi_work/FUSIO_HLST/msmukows/IMAS_INSTALLER/intel_installer/src/3.36.0/ual/4.10.1/lowlevel -g -O0 -fPIC -shared-intel -c test_pulse_create.cpp
In file included from /marconi_work/FUSIO_HLST/switmdir/libs-intel/blitz/1.0.1/intel/19.1.3.304/hftjglypfr4ovoej6dkxwuedupjqez3m/include/blitz/array-impl.h(46),
                 from /marconi_work/FUSIO_HLST/switmdir/libs-intel/blitz/1.0.1/intel/19.1.3.304/hftjglypfr4ovoej6dkxwuedupjqez3m/include/blitz/array.h(37),
                 from /marconi_work/FUSIO_HLST/msmukows/IMAS_INSTALLER/intel_installer/src/3.36.0/ual/4.10.1/cppinterface/src/UALDef.h(30),
                 from /marconi_work/FUSIO_HLST/msmukows/IMAS_INSTALLER/intel_installer/src/3.36.0/ual/4.10.1/cppinterface/src/UALClasses.h(7),
                 from test_pulse_create.cpp(1):
/marconi_work/FUSIO_HLST/switmdir/libs-intel/blitz/1.0.1/intel/19.1.3.304/hftjglypfr4ovoej6dkxwuedupjqez3m/include/blitz/blitz.h(152): error: #error directive: Blitz is configured with --enable-threadsafe, but no compiler thread support is found. Did you forget, e.g., "--pthread"?
     #error Blitz is configured with --enable-threadsafe, but no compiler thread support is found. Did you forget, e.g., "--pthread"?
      ^

compilation aborted for test_pulse_create.cpp (code 2)
make[2]: *** [test_pulse_create.o] Error 2
make[2]: Leaving directory `/marconi_work/FUSIO_HLST/msmukows/IMAS_INSTALLER/intel_installer/src/3.36.0/ual/4.10.1/examples/cpp'
make[1]: *** [examples/cpp] Error 1
make[1]: Leaving directory `/marconi_work/FUSIO_HLST/msmukows/IMAS_INSTALLER/intel_installer'
make: *** [all] Error 2

As you can see for some reason IMAS is complaining on Blitz being compiled with --enable-threadsafe flag but at the same time no thread support for compiler is found: 

Code Block
/marconi_work/FUSIO_HLST/switmdir/libs-intel/blitz/1.0.1/intel/19.1.3.304/hftjglypfr4ovoej6dkxwuedupjqez3m/include/blitz/blitz.h(152): error: #error directive: Blitz is configured with --enable-threadsafe, but no compiler thread support is found. Did you forget, e.g., "--pthread"?
     #error Blitz is configured with --enable-threadsafe, but no compiler thread support is found. Did you forget, e.g., "--pthread"?

 How to reproduce issue


 Solution

After a long search a solution has been found, however it is not very elegant. Requires editing pkg-config for Blitz, which by default is prepared by SPACK. 

The change is subtle and affects only CFLAGS which should look like this:

Code Block
Cflags: -I${includedir} -pthread

Below is a before and after comparison:

Vanilla Blitz's pkg-config - provided by SPACKChanged pkg-config for Blitz


Code Block
# generated by configure / remove this line to disable regeneration
prefix=/marconi_work/FUSIO_HLST/switmdir/libs-intel/blitz/1.0.1/intel/19.1.3.304/hftjglypfr4ovoej6dkxwuedupjqez3m
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: blitz
Description: blitz Library
Version: 0.10
Requires:
Libs: -L${libdir} -lblitz
Cflags: -I${includedir}



Code Block
# generated by configure / remove this line to disable regeneration
prefix=/marconi_work/FUSIO_HLST/switmdir/libs-intel/blitz/1.0.1/intel/19.1.3.304/hftjglypfr4ovoej6dkxwuedupjqez3m
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: blitz
Description: blitz Library
Version: 0.10
Requires:
Libs: -L${libdir} -lblitz
Cflags: -I${includedir} -pthread