autoconf breakage on x86_64.

Sam Varshavchik mrsam at courier-mta.com
Wed Feb 18 00:34:02 UTC 2004


I don't know the right way to fix this, but something is definitely broken; 
and something needs to be fixed, one way or the other.  The question is what 
exactly needs to be fixed.

Consider something like this:

LIBS="-lresolv $LIBS"
AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes), AC_MSG_RESULT(no))

Here's what happens on x86_64:

gcc -o conftest -g -O2 -Wall -I.. -I./..   conftest.c -lresolv  >&5
/tmp/ccW7EeDX.o(.text+0x7): In function `main':
/home/mrsam/src/courier/authlib/configure:5160: undefined reference to 
`res_query'
collect2: ld returned 1 exit status
configure:5147: $? = 1
configure: failed program was:

 [ blah blah blah ]

| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char res_query ();
| int
| main ()
| {
| res_query ();
|   ;
|   return 0;
| }


The same exact test on FC1 x86 will work.

The reason appears to be that you have to #include <resolv.conf> on x86_64 
in order to succesfully pull res_query() out of libresolv.so.  You don't 
need to do this on x86, and the test program generated by AC_TRY_LINK_FUNC 
does not include any headers, but uses a manual prototype.

So, what now?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-test-list/attachments/20040217/d2ba9262/attachment.sig>


More information about the fedora-test-list mailing list