Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building failure under mingw810_64 #67

Open
MittigaENEA opened this issue Dec 29, 2022 · 2 comments
Open

Building failure under mingw810_64 #67

MittigaENEA opened this issue Dec 29, 2022 · 2 comments

Comments

@MittigaENEA
Copy link

I am trying to build the Windows 10 GSL shared library under mingw810_64 (x86_64-w64-mingw32) in this way:
mkdir build
cd build
cmake .. -G"MinGW Makefiles" -DNO_AMPL_BINDINGS=1 -DBUILD_SHARED_LIBS:BOOL=ON
cmake –build .

Many warnings and errors appear during the building process and, while the libgslcblas.dll is working, the libgsl.dll does not work.
The first cmake command produces few warnings. One of them is : Performing Test C_EXTERN_INLINE – Failed
The second cmake command produces many almost identical warning as:
[ 35%] Building C object CMakeFiles/gsl.dir/specfunc/gamma.c.obj
In file included from C:/gsl-2.7/build/gsl/gsl_math.h:23,
from C:\gsl-2.7\specfunc\gamma.c:23:
C:/gsl-2.7/build/gsl/gsl_sys.h:45:5: warning: 'gsl_finite' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
int gsl_finite (const double x);
^~~~~~~~~~

The obj files are produced but, after the linking into libgsl.dll, the sys_test.exe compilation gives a long list of errors as:
undefined reference to `gsl_xxxxx'
If the option -DBUILD_SHARED_LIBS:BOOL=ON is removed the situation improves and the ctest command:
ctest --output-on-failure
reports:
91% tests passed, 5 tests failed out of 55
Total Test time (real) = 54.09 sec
The following tests FAILED:
6 - block_test (Failed)
7 - vector_test (Failed)
8 - vector_test_static (Failed)
9 - matrix_test (Failed)
10 - matrix_test_static (Failed)
Errors while running CTest

Is there anything I can try to get a working libgsl.dll?

@xakod
Copy link
Contributor

xakod commented Apr 27, 2023

@MittigaENEA can you try with #69 fix?

@MittigaENEA
Copy link
Author

I have tried to change the file CMakeLists.txt as suggested in the #69 Fix (removed lines 836,840 and 843 and added lines 831,837,838) but no changes were observed. The errors remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants