GNU Astronomy Utilities - Bugs: bug #57894, Wrong order of flags when...
You are not allowed to post comments on this tracker with your current authentication level.
bug #57894: Wrong order of flags when configuring Gnuastro 0.11 for x86_64-w64-mingw32
Submitter: | Mosè Giordano <giordano> | ||
Submitted: | Tue 25 Feb 2020 04:26:22 PM UTC | ||
Category: | Installation | Severity: | 3 - Normal |
Item Group: | Configuration file | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
Tue 25 Feb 2020 11:11:16 PM UTC, comment #1: |
Mohammad Akhlaghi <makhlaghi> |
Tue 25 Feb 2020 04:26:22 PM UTC, original submission:
When cross-compiling Gnuastro 0.11 for x86_64-w64-mingw32, configure fails to find CFITSIO for me:
|
Mosè Giordano <giordano> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Powered by Savane 3.13-f8d8.
Corresponding source code
Thanks Mose! This part of the configure script is automatically generated by Gnulib's `AC_LIB_HAVE_LINKFLAGS' macro, its not written by hand. The part that is written by hand is in line 314 of the configure.ac file, where we just define the C function to test with:
Just above that shell `case' statement, on my system, `LIBCFITSIO' expands to `/usr/local/lib/libcfitsio.so -Wl,-rpath -Wl,/usr/local/lib'. So it doesn't start with ` -l', and it falls in the proper condition of `LIBS="$LIBCFITSIO $LIBS"'.
In an attempt to reproduce the problem, I manually set `LIBCFITSIO =-lcfitsio' and the same compile command came (with `-lcfitsio' after all the other libraries. However, my compiler didn't have a problem!!!
I then noticed that in the end, it doesn't actually use this `LIBS' at all, it resets it with the `LIBS="$ac_save_LIBS"' statement. So in the end, on my system (where the ordering didn't cause a crash), the final value of LIBS is actually set from the `LIBS="$LIBCFITSIO $LIBS"' statement (which is hand-written and can be seen in `configure.ac').
So I think this is a bug in Gnulib (and the `AC_LIB_HAVE_LINKFLAGS' in particualr), if you have the chance, can you post it to them?