git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Re: configure: use AC_SEARCH_LIBS instead of AC_CHECK_LIB

From
NSNicolas Sebrecht <nicolas.s.dev@gmx.fr>
Date
Jul 19, 2009, 13:14 UTC
Message-ID
<20090719131404.GA11546@vidovic>
In-Reply-To
<a52be8ba36206abc5ff5c91a759036a931e2658c.1248007036.git.nicolas.s.dev@gmx.fr>
The 19/07/09, Nicolas Sebrecht wrote:
Show 17 quoted lines
> 
> > and when I did "rm configure ; make configure ; ./configure"
> > it gave me
> > 
> >   NO_LIBGEN_H=
> >   NEEDS_RESOLV=
> > 
> >   SNPRINTF_RETURNS_BOGUS=UnfortunatelyYes
> > 
> > I have tried to find which commit introduced this regression.
> > 
> >  $ git bisect start origin v1.6.3 v1.6.3.2 -- configure.ac config.mak.in
> >  $ git bisect run ~/git/test.sh
> > 
> > finds ecc395c (Makefile: add NEEDS_LIBGEN to optionally add -lgen to
> > compile arguments, 2009-07-10) as a first bad commit.  But I don't see
> > how it could have changed it... Strange...

The wrong check of lib gen added a flag ' -lgen' to $LIBS (in configure). This wrong flag then gave:

 [...]/bin/ld: cannot find -lgen collect2: ld returned 1 exit status
which made wrongly fail the next compilation test (using $LIBS).
> > CC-ed Brandon Casey, author of blamed changeset, and David Syzdek who
> > offered at some time help with maintaining autoconf.
> 
> Thank you, I did the same investigation here. :-)

I wonder if we could have some feedbacks on this patch. The change on the whole file may make more bad than good. Works as expected here on Linux (glibc 2.9).

Otherwise, the following lines are sufficient to correct the original error:

Show 7 quoted lines
>  test -n "$NEEDS_RESOLV" && LIBS="$LIBS -lresolv"
>  
> -AC_CHECK_LIB([gen], [basename],
> +AC_SEARCH_LIBS([basename], [gen],
>  [NEEDS_LIBGEN=],
>  [NEEDS_LIBGEN=YesPlease])
>  AC_SUBST(NEEDS_LIBGEN)
-- 
Nicolas Sebrecht
Previous: Nicolas SebrechtNext: Junio C Hamano
Message 13 of 32 in “[test failure] t4114 binary file becomes symlink”
  1. Nicolas SebrechtJul 18, 2009
  2. Jeff KingJul 18, 2009
  3. [test failure] Re: t4114 binary file becomes symlinkNicolas Sebrecht, Jul 18, 2009
  4. Jeff KingJul 18, 2009
  5. Junio C HamanoJul 18, 2009
  6. [test failure] Re: t4114 binary file becomes symlinkNicolas Sebrecht, Jul 18, 2009
  7. Linus TorvaldsJul 18, 2009
  8. Johannes SixtJul 18, 2009
  9. [test failure] Re: t4114 binary file becomes symlinkNicolas Sebrecht, Jul 18, 2009
  10. [test failure] Re: t4114 binary file becomes symlinkNicolas Sebrecht, Jul 18, 2009
  11. ./configure misdetects SNPRINTF_RETURNS_BOGUS (was: [test failure] t4114 binary file becomes symlink)Jakub Narebski, Jul 19, 2009
  12. configure: use AC_SEARCH_LIBS instead of AC_CHECK_LIBNicolas Sebrecht, Jul 19, 2009
  13. Re: configure: use AC_SEARCH_LIBS instead of AC_CHECK_LIBNicolas Sebrecht, Jul 19, 2009
  14. Junio C HamanoJul 19, 2009
  15. Eric BlakeJul 19, 2009
  16. Brandon CaseyJul 21, 2009
  17. Brandon CaseyJul 21, 2009
  18. Paolo BonziniJul 21, 2009
  19. Brandon CaseyJul 21, 2009
  20. configure.ac: rework/fix the NEEDS_RESOLV and NEEDS_LIBGEN testsBrandon Casey, Jul 21, 2009
  21. Junio C HamanoJul 21, 2009
  22. Brandon CaseyJul 22, 2009
  23. config.mak.in: continue fixing NEEDS_LIBGEN autoconfigure featureBrandon Casey, Jul 22, 2009
  24. Junio C HamanoJul 22, 2009
  25. Brandon CaseyJul 23, 2009
  26. Johannes SixtJul 18, 2009
  27. Jeff KingJul 18, 2009
  28. [test failure] Re: t4114 binary file becomes symlinkNicolas Sebrecht, Jul 18, 2009
  29. Johannes SixtJul 19, 2009
  30. Jeff KingJul 20, 2009
  31. Johannes SixtJul 20, 2009
  32. Linus TorvaldsJul 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.