bugGNU nano - Bugs: bug #38378, nano links against libmagic, but...

 
 

bug #38378: nano links against libmagic, but libmagic needs libz and the build fails

Submitted by:  Alan Hourihane <alanh>
Submitted on:  Fri 22 Feb 2013 04:05:51 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Benno Schulenberg <bens>
Open/Closed: ClosedRelease: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon 16 Jun 2014 03:29:06 PM UTC, comment #5:

Fixed in SVN, r4967. Thanks for reporting.

Benno Schulenberg <bens>
Project MemberIn charge of this item.
Mon 16 Jun 2014 09:50:58 AM UTC, comment #4:

Yep, that works. Thanks.

Alan Hourihane <alanh>
Sun 15 Jun 2014 08:49:11 PM UTC, comment #3:

Okay, with the attached patch the -lz flag gets added to the final linking stage of the compilation. Could you please test if this prevents the build failure on your system?

(I cannot test myself. When I tried, by moving /lib/libz* out of the way, everything stopped working: autoconf, ./configure, gcc... I begin to understand why one would want to have a statically linked system. :) Luckily mv still worked.)

(file #31557)

Benno Schulenberg <bens>
Project MemberIn charge of this item.
Sat 14 Jun 2014 09:04:39 PM UTC, comment #2:

I think this line ....

AC_CHECK_LIB(libz, deflate)

should be....

AC_CHECK_LIB(z, deflate)

Alan Hourihane <alanh>
Sat 14 Jun 2014 08:23:23 PM UTC, comment #1:

Okay. But how should I check for the presence of libz? If I add the following to configure.ac:

AS_IF([test "x$enable_libmagic" != "xno"], [
AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
AC_CHECK_LIB(libz, deflate)
])

I get this from ./configure:

checking for library containing zlibVersion... none required
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for deflate in -llibz... no

Is the AC_SEARCH_LIBS enough? Does it not matter that, even though zlib is present, none of its functions are detectable by ./configure?

Benno Schulenberg <bens>
Project MemberIn charge of this item.
Fri 22 Feb 2013 04:05:51 PM UTC, original submission:

I'm on a static only system, where there are no shared libraries.

libmagic.so on a shared system implicitly links libz, but nano doesn't check that.

On a static only system nano needs to link libz as well as libmagic otherwise the build fails.

Alan Hourihane <alanh>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #31557:  adding-lz.patch added by bens (398B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by alanh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

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

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Jun 2014 03:29:06 PM UTCbensStatusNone=>Fixed
      Assigned toNone=>bens
      Open/ClosedOpen=>Closed
    Sun 15 Jun 2014 08:49:11 PM UTCbensAttached File-=>Added adding-lz.patch, #31557

    Back to the top


    Powered by Savane 3.1-cleanup