-
Notifications
You must be signed in to change notification settings - Fork 192
Closed
Labels
build: cmakeIssue with stdlib's CMake build filesIssue with stdlib's CMake build filescompiler: gfortranSpecific to GCC Fortran compilerSpecific to GCC Fortran compilerplatform: WindowsBuild issues specific to the Windows platformBuild issues specific to the Windows platform
Description
Description
I'm trying to build and test stdlib on a Windows machine with msys2 tool chain, using gnu compilers (gcc/gfortran) 14.2.0-3 version.
I have a small python script to customize the cmake build as:
# build with cmake
subprocess.run("cmake -B build -G Ninja -DBUILD_TESTING=on"+
" -DCMAKE_MAXIMUM_RANK:String=4 "+
" -DCMAKE_BUILD_TYPE=Release"+
" -DCMAKE_Fortran_COMPILER=gfortran",
shell=True, check=True)
subprocess.run("cmake --build build -j 16",shell=True, check=True)
subprocess.run("ctest --test-dir build/test",shell=True, check=True)
I another machine where I use the tool chain from equation.com everything works, but here I get the following error when linking the hash_functions tests:
[376/695] Linking CXX executable test\hash_functions\test_hash_functions.exe
FAILED: test/hash_functions/test_hash_functions.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\msys64\ucrt64\bin\c++.exe -O3 -DNDEBUG test/hash_functions/CMakeFiles/test_hash_functions.dir/test_hash_functions.f90.obj test/hash_functions/CMakeFiles/test_hash_functions.dir/nmhash.c.obj test/hash_functions/CMakeFiles/test_hash_functions.dir/pengyhash.c.obj test/hash_functions/CMakeFiles/test_hash_functions.dir/SpookyV2.cpp.obj test/hash_functions/CMakeFiles/test_hash_functions.dir/SpookyV2Test.cpp.obj test/hash_functions/CMakeFiles/test_hash_functions.dir/waterhash.c.obj test/hash_functions/CMakeFiles/test_hash_functions.dir/generate_hash_arrays.cpp.obj -o test\hash_functions\test_hash_functions.exe -Wl,--out-implib,test\hash_functions\libtest_hash_functions.dll.a -Wl,--major-image-version,0,--minor-image-version,0 src/libfortran_stdlib.a _deps/test-drive-build/libtest-drive.a -lgfortran -lquadmath -lm -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
collect2.exe: error: ld returned 116 exit status
Expected Behaviour
should link, build and run
Version of stdlib
master
Platform and Architecture
Windows (mingw-64)
Additional Information
No response
Metadata
Metadata
Assignees
Labels
build: cmakeIssue with stdlib's CMake build filesIssue with stdlib's CMake build filescompiler: gfortranSpecific to GCC Fortran compilerSpecific to GCC Fortran compilerplatform: WindowsBuild issues specific to the Windows platformBuild issues specific to the Windows platform
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
jalvesz commentedon Apr 11, 2025
If I comment out the following tests from the CMake
I managed to launch all other tests.
jalvesz commentedon Apr 24, 2025
My bad, I had to specify the three compilers as:
Closing this issue as there is no issue.