Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80110 - glib2 does not build with iconv support disabled
Summary: glib2 does not build with iconv support disabled
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Embedded Gentoo Team
Depends on:
Reported: 2005-01-30 11:04 UTC by solar (RETIRED)
Modified: 2005-06-22 05:15 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---

glib-2.6.1.ebuild.diff (glib-2.6.1.ebuild.diff,1.51 KB, patch)
2005-01-30 11:06 UTC, solar (RETIRED)
Details | Diff
glib-2.4.6-no_iconv.patch (glib-2.4.6-no_iconv.patch,652 bytes, patch)
2005-01-30 11:07 UTC, solar (RETIRED)
Details | Diff
glib-2.4.6-config.patch (glib-2.4.6-config.patch,695 bytes, patch)
2005-01-30 11:08 UTC, solar (RETIRED)
Details | Diff
glib-2.4.8.ebuild.diff (glib-2.4.8.ebuild.diff,1.58 KB, patch)
2005-01-30 19:50 UTC, solar (RETIRED)
Details | Diff
glib-2.4.8.ebuild.diff (glib-2.4.8.ebuild.diff,1.50 KB, patch)
2005-02-01 08:19 UTC, solar (RETIRED)
Details | Diff
allows to build glib-2.6 w/o gettext (glib-2.6.1-no_gettext.patch,423 bytes, patch)
2005-02-01 08:53 UTC, Peter S. Mazinger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description solar (RETIRED) gentoo-dev 2005-01-30 11:04:05 UTC
On a uClibc host glib2 will will not compile. nls is not really 
supported so we are able to build a much lighter weight glib2.  I will
attach patches that provide the stubs and make the configure check non 
fatal that will allow us to make use of glib2 without the need to 
gettext or the masked libiconv. patches are provided by psm and myself.
initial testing was done on the embedded mailing list.
Comment 1 solar (RETIRED) gentoo-dev 2005-01-30 11:06:15 UTC
Created attachment 49965 [details, diff]

moves ppc-macos glibtoolize into src_unpack and does patching etc..
Comment 2 solar (RETIRED) gentoo-dev 2005-01-30 11:07:40 UTC
Created attachment 49966 [details, diff]

adds stubs to gconvert.c
Comment 3 solar (RETIRED) gentoo-dev 2005-01-30 11:08:46 UTC
Created attachment 49967 [details, diff]

makes configure non fatal and uses internal stubs
Comment 4 solar (RETIRED) gentoo-dev 2005-01-30 15:47:25 UTC
getext is still being used in this version. <=2.4.8 work here.. I hack to hack on it some more todo 2.6.1
Comment 5 solar (RETIRED) gentoo-dev 2005-01-30 19:22:18 UTC
I got 2.6.1 to compile but I had to use really ulgy hacks to work around gettext. 
For now I've put <dev-libs/glib-2.5 in the $PORTDIR/profiles/packages and will attach the 2.4.8 patches and get somebody to confirm they work for them without
Comment 6 solar (RETIRED) gentoo-dev 2005-01-30 19:50:27 UTC
Created attachment 50027 [details, diff]

working glib-2.4.8
Comment 7 foser (RETIRED) gentoo-dev 2005-01-31 08:26:49 UTC
what do you intend to do with it ? I don't think eg. pango & gtk will work very well without a functioning g_convert_* and glib functionality based on it.
Comment 8 solar (RETIRED) gentoo-dev 2005-01-31 09:08:41 UTC
g_convert should return everything in english.
As it stands now glib2 is a dep on quite a few things.
Users interested in building console apps such as irssi/mc/splashd/etc are unable todo so without this patch. 
Misc people have been using the patch for about 2-3 months.
As far as I know iggy the the only one who dove into a complete X windowing system. No idea if he used gtk or not.
If the interface --without-gettext --disable-nls --libiconv=no worked this would not be needed.
Comment 9 solar (RETIRED) gentoo-dev 2005-02-01 08:19:33 UTC
Created attachment 50138 [details, diff]

updated ebuild diff to use myconf.
Comment 10 foser (RETIRED) gentoo-dev 2005-02-01 08:31:37 UTC
i talked to iggy yesterday on IRC, not sure if you picked up that conversation. According to him it does not work (not even with irssi) and that seems logical to me, because afaics the strings should now return NULL and error if any of these functions are used.

I don't see this as a healthy solution, it might work on some apps that do not use these functions at all, but those are rare & glib to some extent uses this functionality as well internal.
Comment 11 Peter S. Mazinger 2005-02-01 08:53:47 UTC
Created attachment 50145 [details, diff]
allows to build glib-2.6 w/o gettext
Comment 12 solar (RETIRED) gentoo-dev 2005-02-01 09:43:03 UTC
foser: that's odd cuz I built and tested irssi v0.8.9 and mc.

ldd `which irssi` => /usr/lib/ (0x2777d000) => /lib/ (0x27782000) => /usr/lib/ (0x27786000) => /lib/ (0x27802000) => /lib/ (0x27842000) => /lib/ (0x27773000)

[ebuild   R   ] app-misc/mc-4.6.0-r12  -X -debug -gpm +ncurses (-nls) -samba -slang -unicode
ldd `which mc` => /usr/lib/ (0x26102000) => /lib/ (0x2617e000) => /lib/ (0x261be000) => /lib/ (0x261d8000) => /lib/ (0x261dc000) => /lib/ (0x260f8000)

For now all we can do is ask for more testing cuz when iconv_open() returns (-1)no conversion is supposed to take place. 
perhaps we should set errno = EINVAL;
Initial code is based on what the masked libiconv does.
Comment 13 solar (RETIRED) gentoo-dev 2005-02-01 10:49:34 UTC
Peter, thanks that patch for 2.6.1 worked around the problem cleanly 
Comment 14 Peter S. Mazinger 2005-02-02 01:09:18 UTC
I can't understand why it shouldn't work for iggy/foser.
I can use mc, I have built gtk+, the only unusual, but expected behaviour is
that a conversion from UTF8 to ASCII fails (saying not supported)
Comment 15 foser (RETIRED) gentoo-dev 2005-02-02 02:44:23 UTC
-iggy- VERSION irssi v0.8.10-rc5

This version is not in portage yet, it uses g_convert contrary to any version in portage. That is why you don't see it (yet) with irssi.

gtk/pango etc. might work to some extent as long as you don't deal with files & have utf8 po files, etc. i guess.

I do not doubt it works in some cases, but I do not think this is wise to apply gentoo wide. The proper solution to me seems ditching gconvert.h in this case, because then you will get a reasonable indication of when something will or will not work reliable. But I wouldn't want to support that in the tree either.

Something that seems more viable to me is having a local copy of iconv or something, but I have no real idea on what you want to achieve here anyway.
Comment 16 solar (RETIRED) gentoo-dev 2005-02-05 11:39:18 UTC
Confirmed the problems that foser mentions for the g_convert() Another solution will be found for the iconv() problems. The nls handling is good.
Comment 17 solar (RETIRED) gentoo-dev 2005-04-12 06:20:03 UTC
Ok foser this bug has been appears to have been stalled for quite a bit of time.

Are you going to add the slimed down patch from comment #11 which corrects a bug in glib?
Comment 18 foser (RETIRED) gentoo-dev 2005-04-16 05:17:54 UTC , here's the bug where it got removed.

It seems to me including gi18n.h means you got to have gettext, since glib itself uses it for goption you can't get around it.
Comment 19 solar (RETIRED) gentoo-dev 2005-04-16 05:49:52 UTC
nevermind foser. you clearly don't understand whats going on. I'll fix it.
Comment 20 foser (RETIRED) gentoo-dev 2005-04-16 06:10:49 UTC
I know what is going on, your attitude and wishes get in the way of stable development. So no, at this point, this 'patch' shouldn't be added. The iconv patch breaks stuff, the NLS patch breaks stuff. Your condescending attitude doesn't change that.
Comment 21 solar (RETIRED) gentoo-dev 2005-04-16 07:05:37 UTC
sigh. I already stated the iconv() patch and the g_convert() behavior showed up in
comment #16

The NLS patch works around the already broken code.
So that leaves me with a few options
1) do nothing
2) do something
If my plan was #1 I would have not opened a bug in the first place.
Comment 22 Stian Skjelstad 2005-04-19 09:43:07 UTC
I'm seeing somebody else has some simular problems building glib, and the developers response was this: 

> I have read the Makefile there, only to find they use a
> "--with-libiconv=gnu" configure argument. I don't know why theirs can
> succeed, while my "--with-libiconv=/usr/local" can't help pass the
> configuration step. :(

Because the allowed values of the --with-libiconv flag limit it. Output
from `./configure --help`:
                          use the libiconv library

So it is supposed to be possible to disable iconv usage from configure with the vanilla source.
Comment 23 foser (RETIRED) gentoo-dev 2005-06-22 05:15:50 UTC
the gettext patch is not applied for the following reasons :

a) it breaks things (comment #18)
b) just applying it like suggested has no impact at all
c) there has been no reasons given why we should add this patch while upstream
clearly has chosen to remove this functionality