[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #57894] Wrong order of flags when configuring Gnuastro 0.11 for x86
From: |
Mohammad Akhlaghi |
Subject: |
[bug #57894] Wrong order of flags when configuring Gnuastro 0.11 for x86_64-w64-mingw32 |
Date: |
Tue, 25 Feb 2020 18:11:16 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0 |
Follow-up Comment #1, bug #57894 (project gnuastro):
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
<http://git.savannah.gnu.org/cgit/gnuastro.git/tree/configure.ac#n314> file,
where we just define the C function to test with:
AC_LIB_HAVE_LINKFLAGS([cfitsio], [], [
#include <fitsio.h>
void junk(void) {
int status;
fitsfile *f;
ffopen(&f, "junk", READONLY, &status);} ])
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?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57894>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/