njoy / ENDFtk

Toolkit for reading and interacting with ENDF-6 formatted files
Other
33 stars 5 forks source link

Compiling error when compiling tests #193

Closed Camden-Blake closed 6 months ago

Camden-Blake commented 7 months ago

When building a new version of ENDFtk, compilation errors when trying to build a test. Disabling the tests allows the compilation to complete.

Commands Used:

git clone https://github.com/njoy/ENDFtk
cd ENDFtk
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make -j8

Here is the terminal output:

...
[ 60%] Building CXX object src/ENDFtk/section/5/TabulatedSpectrum/OutgoingEnergyDistribution/test/CMakeFiles/ENDFtk.section.5.TabulatedSpectrum.OutgoingEnergyDistribution.test.dir/OutgoingEnergyDistribution.test.cpp.o
[ 60%] Built target ENDFtk.section.5.MadlandNixSpectrum.test
[ 60%] Building CXX object src/ENDFtk/section/5/TabulatedSpectrum/test/CMakeFiles/ENDFtk.section.5.TabulatedSpectrum.test.dir/TabulatedSpectrum.test.cpp.o
[ 60%] Linking CXX executable ENDFtk.section.5.MaxwellianFissionSpectrum.test
[ 60%] Built target ENDFtk.section.5.MaxwellianFissionSpectrum.test
[ 60%] Building CXX object src/ENDFtk/section/5/WattSpectrum/test/CMakeFiles/ENDFtk.section.5.WattSpectrum.test.dir/WattSpectrum.test.cpp.o
[ 61%] Linking CXX executable ENDFtk.section.5.Parameter.test
[ 61%] Built target ENDFtk.section.5.Parameter.test
[ 61%] Building CXX object src/ENDFtk/section/5/test/CMakeFiles/ENDFtk.section.5.test.dir/5.test.cpp.o
In file included from /usr/include/signal.h:328,
                 from /home/blakec4/SchoolPrograms/test_ENDFtk/ENDFtk/build/_deps/catch-adapter-src/src/single_include/catch.hpp:6520,
                 from /home/blakec4/SchoolPrograms/test_ENDFtk/ENDFtk/src/ENDFtk/section/5/WattSpectrum/test/WattSpectrum.test.cpp:3:
/home/blakec4/SchoolPrograms/test_ENDFtk/ENDFtk/build/_deps/catch-adapter-src/src/single_include/catch.hpp:6543:33: error: size of array ‘altStackMem’ is not an integral constant-expression
 6543 |         static char altStackMem[SIGSTKSZ];
      |                                 ^~~~~~~~
/home/blakec4/SchoolPrograms/test_ENDFtk/ENDFtk/build/_deps/catch-adapter-src/src/single_include/catch.hpp:6594:45: error: size of array ‘altStackMem’ is not an integral constant-expression
 6594 |     char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
      |                                             ^~~~~~~~
make[2]: *** [src/ENDFtk/section/5/WattSpectrum/test/CMakeFiles/ENDFtk.section.5.WattSpectrum.test.dir/build.make:76: src/ENDFtk/section/5/WattSpectrum/test/CMakeFiles/ENDFtk.section.5.WattSpectrum.test.dir/WattSpectrum.test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:7712: src/ENDFtk/section/5/WattSpectrum/test/CMakeFiles/ENDFtk.section.5.WattSpectrum.test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 61%] Linking CXX executable ENDFtk.section.5.Probability.test
[ 61%] Built target ENDFtk.section.5.Probability.test
[ 61%] Linking CXX executable ENDFtk.section.4.test
[ 61%] Built target ENDFtk.section.4.test
[ 61%] Linking CXX executable ENDFtk.section.5.TabulatedSpectrum.OutgoingEnergyDistribution.test
[ 61%] Built target ENDFtk.section.5.TabulatedSpectrum.OutgoingEnergyDistribution.test
[ 62%] Linking CXX executable ENDFtk.section.5.TabulatedSpectrum.test
[ 62%] Built target ENDFtk.section.5.TabulatedSpectrum.test
[ 62%] Linking CXX executable ENDFtk.section.5.PartialDistribution.test
[ 62%] Built target ENDFtk.section.5.PartialDistribution.test
[ 62%] Linking CXX executable ENDFtk.section.5.test
[ 62%] Built target ENDFtk.section.5.test
lto-wrapper: warning: using serial compilation of 128 LTRANS jobs
^Cmake[2]: *** Deleting file 'ENDFtk.cpython-311-x86_64-linux-gnu.so'
make[2]: *** [CMakeFiles/ENDFtk.python.dir/build.make:3794: ENDFtk.cpython-311-x86_64-linux-gnu.so] Interrupt
make[1]: *** [CMakeFiles/Makefile2:5172: CMakeFiles/ENDFtk.python.dir/all] Interrupt
make: *** [Makefile:146: all] Interrupt

Here is the full terminal output:

ENDFtk_build_error.txt

whaeck commented 7 months ago

ENDFtk v1.0.0 has some major changes involving the unit test framework (Catch2) that we use. There seems to be a conflict with the old version of Catch2 (referenced in your output as catch-adapter) if you just "git pull" to get the new version of ENDFtk. It might be wise to delete your build/bin directory and start the compilation from scratch to avoid dependency issues.

If that does not solve the issue, I would like to know which compiler and OS you are using.

Camden-Blake commented 7 months ago

This was a completely fresh install of ENDFtk that I did just for this issue report.

OS info:

NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

cmake compiler settings:

-- The CXX compiler identification is GNU 11.4.0
-- 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
-- Using release repositories
-- Found PythonInterp: /home/blakec4/anaconda3/bin/python (found version "3.11.7") 
-- 
-- -----------------------------------------------------------
-- 
-- catch-adapter
-- Git current branch: HEAD
-- Git commit hash: fb84b82ebf7a4789aa43cea560680cf745c6ee4f
-- 
-- -----------------------------------------------------------
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Found Git: /usr/bin/git (found version "2.34.1") 
-- [range-v3]: C++ std=1z
-- Performing Test RANGES_HAS_CXXSTD
-- Performing Test RANGES_HAS_CXXSTD - Success
-- Performing Test RANGES_HAS_WALL
-- Performing Test RANGES_HAS_WALL - Success
-- Performing Test RANGES_HAS_WEXTRA
-- Performing Test RANGES_HAS_WEXTRA - Success
-- Performing Test RANGES_HAS_WERROR
-- Performing Test RANGES_HAS_WERROR - Success
-- Performing Test RANGES_HAS_FDIAGNOSTIC_SHOW_TEMPLATE_TREE
-- Performing Test RANGES_HAS_FDIAGNOSTIC_SHOW_TEMPLATE_TREE - Success
-- Performing Test RANGES_HAS_FTEMPLATE_BACKTRACE_LIMIT
-- Performing Test RANGES_HAS_FTEMPLATE_BACKTRACE_LIMIT - Success
-- Performing Test RANGES_HAS_FMACRO_BACKTRACE_LIMIT
-- Performing Test RANGES_HAS_FMACRO_BACKTRACE_LIMIT - Failed
-- Performing Test RANGES_HAS_OMIT_FRAME_POINTER
-- Performing Test RANGES_HAS_OMIT_FRAME_POINTER - Success
-- Performing Test RANGES_HAS_OFAST
-- Performing Test RANGES_HAS_OFAST - Success
-- Performing Test RANGES_HAS_STRICT_ALIASING
-- Performing Test RANGES_HAS_STRICT_ALIASING - Success
-- Performing Test RANGES_HAS_STRICT_VTABLE_POINTERS
-- Performing Test RANGES_HAS_STRICT_VTABLE_POINTERS - Failed
-- Performing Test RANGES_HAS_FAST_MATH
-- Performing Test RANGES_HAS_FAST_MATH - Success
-- Performing Test RANGES_HAS_VECTORIZE
-- Performing Test RANGES_HAS_VECTORIZE - Failed
-- Performing Test RANGES_HAS_SIZED_DEALLOCATION
-- Performing Test RANGES_HAS_SIZED_DEALLOCATION - Success
-- Performing Test RANGES_HAS_MARCH_NATIVE
-- Performing Test RANGES_HAS_MARCH_NATIVE - Success
-- Performing Test RANGES_HAS_MTUNE_NATIVE
-- Performing Test RANGES_HAS_MTUNE_NATIVE - Success
-- Performing Test RANGE_V3_ALIGNED_NEW_PROBE
-- Performing Test RANGE_V3_ALIGNED_NEW_PROBE - Success
-- Performing Test RANGE_V3_HAS_FCONCEPTS
-- Performing Test RANGE_V3_HAS_FCONCEPTS - Success
-- Build spdlog: 1.11.0
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Build type: Release
-- Using release repositories
-- pybind11 v2.10.4 
-- Found PythonInterp: /home/blakec4/anaconda3/bin/python (found suitable version "3.11.7", minimum required is "3.6") 
-- Found PythonLibs: /home/blakec4/anaconda3/lib/libpython3.11.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Building ENDFtk's python API
-- Adding ENDFtk Python unit testing
-- Adding ENDFtk unit testing
-- Performing Test HAVE_FLAG__ffile_prefix_map__home_blakec4_SchoolPrograms_test_ENDFtk_ENDFtk_build__deps_catch2_src__
-- Performing Test HAVE_FLAG__ffile_prefix_map__home_blakec4_SchoolPrograms_test_ENDFtk_ENDFtk_build__deps_catch2_src__ - Success
-- Adding ENDFtk C++ unit testing
-- Configuring done (24.4s)
-- Generating done (0.4s)
whaeck commented 7 months ago

The WattSpectrum test still seems to use catch-adapter. Let me fix that real quick ...

whaeck commented 7 months ago

@Camden-Blake try branch fix/rpi-compilation-issue

whaeck commented 7 months ago

If there are other tests that fail, let me know. There's over 200 unit tests on the C++ side and I'm too lazy to go over each one to see if there's others like this :-)

Camden-Blake commented 7 months ago

Looks good on my side, just compiled it with no errors.

Edit: And passes all tests.

whaeck commented 7 months ago

@Camden-Blake I find your lack of faith disturbing ...

whaeck commented 7 months ago

Seriously: OK, glad that's the only one. I'll assign you a PR to get this into develop. I'm probably going to do a few more modifications in ENDFtk that I may release as well so I'll wait to do a v1.0.1 release, at least till April.

whaeck commented 7 months ago

@Camden-Blake sent you an invite so I can assign the PR to you.

Camden-Blake commented 7 months ago

@whaeck I mean you forgot something in the first place so I gotta check now. Also should be joined now.

whaeck commented 7 months ago

@Camden-Blake I've assigned the PR review to you. You have work to do ;-)