patchGNU Autoconf Archive - Patches: patch #7403, AX_EXT_HAVE_LIB: macro can be used...

 
 

patch #7403: AX_EXT_HAVE_LIB: macro can be used only once

Submitted by:  None
Submitted on:  Fri 03 Dec 2010 04:15:41 PM UTC  
 
Priority: 7 - HighStatus: Done
Assigned to: Peter Simons <simons>Originator Email: -unavailable-
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 03 Jan 2011 06:32:32 PM UTC, comment #6:

I have committed your patch in revision 7bc90c7f30048d79f60587a1f831a465f56e8049. Thank you very much.

Peter Simons <simons>
Project AdministratorIn charge of this item.
Sun 02 Jan 2011 09:47:57 PM UTC, comment #5:

"$4" on line 61 is not needed. The only problem that it would be great to fix it's the repetition on libraries, according to example above that happens if neither mysql nor postgresql devel files are installed. In that case LIBS=-lcrypto -lpthread -lresolv -lcrypto -lpthread -lresolv -lcrypto -lpthread -lresolv -lcrypto -lpthread -lresolv

It would be great if LIBS=-lcrypto -lpthread -lresolv

However that problem it seems aesthetic.

(file #22337)

Sergio Belkin <sebelk>
Thu 23 Dec 2010 01:46:58 PM UTC, comment #4:

Hi Sergio,

I believe that your patch was applied correctly even though the was diff created in reverse order. To make sure, though, could you please check that the current version of
ax_ext_have_lib.m4 in Git is correct?

Take care,
Peter

Peter Simons <simons>
Project AdministratorIn charge of this item.
Sat 18 Dec 2010 07:15:50 PM UTC, comment #3:

Hi Peter,

Thanks for your answer. I've made the mistake of sending the reverse patch. Here is the right patch.

The bug is that if you use the macro twice o more times LIBS variable is equivalent to the last library found.

For example:

AX_EXT_HAVE_LIB([/lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib],resolv,inet_net_pton)

AX_EXT_HAVE_LIB([/lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib],pthread,pthread_create)

AX_EXT_HAVE_LIB([/lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib],crypto,X509_free)

AX_EXT_HAVE_LIB(/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/ssl /usr/lib/ssl , ssl, SSL_library_init)

AX_EXT_HAVE_LIB(/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/mysql /usr/lib64/mysql /usr/lib/mysql, mysqlclient, mysql_close, [])

AX_EXT_HAVE_LIB(/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/postgresql /usr/lib/postgresql , pq, PQfinish)

It ends with:

LIBS=-lpq

The change:
-new_libs="-l$2 ${new_libs}"
+new_libs="-l$2 $4"

It's a workaround when otherwise you get repeated entries of libraries on variable LIBS. That workaround doesn't work if you haven't neither mysql devel nor postgresql devel files in the example above .

Greetings

Sergio Belkin

(file #22227)

Sergio Belkin <sebelk>
Sat 18 Dec 2010 04:43:34 PM UTC, comment #2:

Hi Sergio,

your patch has been applied in 74225b195efbd0cebc309fdfdc52f6ed41b8e967. Thank you very much. I have added Duncan to Cc so that he has a chance to comment on the modificatin.

Take care,
Peter

Peter Simons <simons>
Project AdministratorIn charge of this item.
Fri 03 Dec 2010 04:29:37 PM UTC, comment #1:

Hi, I've submitted the patch for ax_ext_have_lib.m4, the author of the macro is Duncan Simpson.

Sergio Belkin <sebelk>
Fri 03 Dec 2010 04:15:41 PM UTC, original submission:

Macro can be used only once because override the earlier value of "LIBS" variable

You can read more about this issue here:
http://lists.gnu.org/archive/html/autoconf-archive-maintainers/2010-10/msg00024.html

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #22337:  ax_ext_have_lib.m4-20110102.patch added by sebelk (523B - application/octet-stream - "$4" on line 61 is not needed. The only problem that it would be great to fix it's the repetition on libraries, according to example above that happens if neither mysql nor postgresql devel files are installed)
file #22227:  ax_ext_have_lib.m4.patch added by sebelk (450B - text/x-patch)
file #22117:  ax_ext_have_lib.m4.patch added by None (666B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by simons (Posted a comment)
  • -unavailable- added by simons (Original author)
  • -unavailable- added by sebelk (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 Feb 2011 08:30:02 PM UTCsimonsStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Mon 03 Jan 2011 06:32:32 PM UTCsimonsStatusDone=>Ready For Test
      Open/ClosedClosed=>Open
    Sun 02 Jan 2011 09:47:57 PM UTCsebelkAttached File-=>Added ax_ext_have_lib.m4-20110102.patch, #22337
    Sun 02 Jan 2011 11:14:10 AM UTCsimonsStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Sat 18 Dec 2010 07:15:50 PM UTCsebelkAttached File-=>Added ax_ext_have_lib.m4.patch, #22227
    Sat 18 Dec 2010 04:43:34 PM UTCsimonsStatusNone=>Ready For Test
      Assigned toNone=>simons
      Summarymacro can be used only once=>AX_EXT_HAVE_LIB: macro can be used only once
      Carbon-Copy-=>Added duncan simpson
    Fri 03 Dec 2010 04:15:41 PM UTCNoneAttached File-=>Added ax_ext_have_lib.m4.patch, #22117

    Back to the top


    Powered by Savane 3.1-cleanup