After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 388788 - Subtle bug in autotools checks for iconv
Subtle bug in autotools checks for iconv
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
1.10.x (obsolete)
Other Linux
: High normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-12-22 23:41 UTC by Elijah Newren
Modified: 2013-09-14 16:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Change AC_TRY_LINK to AC_TRY_RUN (974 bytes, patch)
2006-12-22 23:43 UTC, Elijah Newren
committed Details | Review
Supplemental patch (255 bytes, patch)
2007-03-26 03:01 UTC, Matthew Barnes
committed Details | Review
Trivial fix to the bug pointed out by Eric in my previous patch (347 bytes, patch)
2007-04-11 21:04 UTC, Elijah Newren
committed Details | Review

Description Elijah Newren 2006-12-22 23:41:57 UTC
I'm guessing I'm the only one in the universe with a system weird enough to trigger this build bug:

configure.in does three things in regards to iconv:
  1) Check for any special --with-libiconv flag, setting $ICONV_CFLAGS and
     $ICONV_LIBS if found
  2) Check if a program can *link* (which implies compile as well, I guess)
     against -liconv, adding -liconv to $ICONV_LIBS if so
  3) Checks to see if a simple program can compile, link, AND run with the above
     determined ICONV_CFLAGS and ICONV_LIBS

I think the logic from 2->3 is buggy; -liconv should only be added to ICONV_LIBS if a program can compile, link, *and run* against -liconv.  The patch to fix this is trivial; I'll attach it in a minute.  With the patch (and a similar one for evolution), everything builds and functions well for me.
Comment 1 Elijah Newren 2006-12-22 23:43:00 UTC
Created attachment 78820 [details] [review]
Change AC_TRY_LINK to AC_TRY_RUN
Comment 2 Kjartan Maraas 2007-01-25 14:31:20 UTC
Please review.
Comment 3 Matthew Barnes 2007-03-26 03:01:51 UTC
Created attachment 85290 [details] [review]
Supplemental patch

Elijah's patch looks good, though I've not run into the problem myself.  I guess Elijah has the weirder system.

While we're on the topic of iconv, I'm attaching a small rider to this bug.  It's a patch for iconv-detect.c that fixes an implicit function declaration.
Comment 4 Matthew Barnes 2007-03-26 22:40:18 UTC
Patches committed to Subversion trunk, revision 7668.
Comment 5 Elijah Newren 2007-03-26 22:55:20 UTC
Awesome, could I convince you to look at the identical bug against evolution, bug 388789?

Thanks!
Comment 6 Matthew Barnes 2007-03-27 00:03:27 UTC
Sure.  Actually, I almost committed your patch to evolution by mistake.
Comment 7 Matthew Barnes 2007-04-04 19:19:15 UTC
Also committed to gnome-2-18 branch (revision 7684).
Comment 8 Elijah Newren 2007-04-11 21:03:23 UTC
Eric pointed out a bug in my patch in bug 428375; the program doesn't have a return value.  I'm reopening and will attach a trivial patch to fix this issue.
Comment 9 Elijah Newren 2007-04-11 21:04:12 UTC
Created attachment 86202 [details] [review]
Trivial fix to the bug pointed out by Eric in my previous patch
Comment 10 Matthew Barnes 2007-04-12 00:31:41 UTC
Thanks.  Also added "#include <stdlib.h>" to the test program to make sure it plays nicely with -Werror-implicit-function-declaration.

Committed to trunk (revision #7697) and gnome-2-18 branch (revision #7698).