Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186342 - x11-libs/gtk+-2.10.14 patches to cross compile (ARM) against uclibc
Summary: x11-libs/gtk+-2.10.14 patches to cross compile (ARM) against uclibc
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: ARM Linux
: High enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2007-07-23 15:35 UTC by Angelo Arrifano (RETIRED)
Modified: 2016-04-03 10:44 UTC (History)
3 users (show)

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


Attachments
dummy iconv lib for uclibc (dummy-iconv.tar.bz2,2.74 KB, application/octet-stream)
2007-07-23 15:38 UTC, Angelo Arrifano (RETIRED)
Details
dummy intl for uclibc (dummy-intl.tar.bz2,4.33 KB, application/octet-stream)
2007-07-23 15:39 UTC, Angelo Arrifano (RETIRED)
Details
gtk+-2.10.14-nocups.diff (gtk+-2.10.14-nocups.diff,1.08 KB, patch)
2007-07-23 15:40 UTC, Angelo Arrifano (RETIRED)
Details | Diff
gtk+-2.10.14-libtool.diff (gtk+-2.10.14-libtool.diff,727 bytes, patch)
2007-07-23 15:40 UTC, Angelo Arrifano (RETIRED)
Details | Diff
gtk+-2.10.14-libintl.diff (gtk+-2.10.14-libintl.diff,37.97 KB, patch)
2007-07-23 15:41 UTC, Angelo Arrifano (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Angelo Arrifano (RETIRED) gentoo-dev 2007-07-23 15:35:51 UTC
The two tarballs are dummy libs to replace missing libintl and libiconv in uclibc.

gtk+-2.10.14-libintl.diff adds a missing -lintl to Makefiles, since the configure script doesn't add it when bind_textdomain_codeset() is present in a shared lib.

gtk+-2.10.14-libtool.diff fixes where libtool search shared libs. It was always searching in my build system and not in host system libdir.

gtk+-2.10.14-nocups.diff removes cups backend.

With these patches I could successfully cross compile x11-libs/gtk+-2.10.14 against uclibc in armv5te-ppc-linux-uclibc.

Reproducible: Always
Comment 1 Angelo Arrifano (RETIRED) gentoo-dev 2007-07-23 15:38:26 UTC
Created attachment 125751 [details]
dummy iconv lib for uclibc
Comment 2 Angelo Arrifano (RETIRED) gentoo-dev 2007-07-23 15:39:37 UTC
Created attachment 125752 [details]
dummy intl for uclibc
Comment 3 Angelo Arrifano (RETIRED) gentoo-dev 2007-07-23 15:40:25 UTC
Created attachment 125754 [details, diff]
gtk+-2.10.14-nocups.diff
Comment 4 Angelo Arrifano (RETIRED) gentoo-dev 2007-07-23 15:40:49 UTC
Created attachment 125755 [details, diff]
gtk+-2.10.14-libtool.diff
Comment 5 Angelo Arrifano (RETIRED) gentoo-dev 2007-07-23 15:41:09 UTC
Created attachment 125757 [details, diff]
gtk+-2.10.14-libintl.diff
Comment 6 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-08-27 16:06:42 UTC
This is a huge amount of changes for us to have locally.  Could you sumbit them upstream and paste the URL here?  I'd like to get their comments at least before putting anything this intrusive into portage.
Comment 7 Peter S. Mazinger 2007-08-27 18:29:54 UTC
I would separate the handling of nls and iconv.
nls should be handled generally within glib-2, providing a proper gi18n.h and gi18n-lib.h covering the case not having libintl.h with dummy macros for gettext() and friends. Most gnome apps can be compiled by replacing libintl.h with gi18n.h. Another possibility would be to create a dummy libintl.h that is copied into the source root after configure is ran, since all apps will have an include search path pointing there to find config.h, they can be compiled (I used the latter and compiled the whole gnome suite against uClibc, but also applied the first proposed change to glib-2). The implementation could maybe go to the gnome eclass. I think sed -i s/libintl.h/gi18n.h would be an upstream acceptable solution.
uClibc provides a possibility to enable nls, but I would not do it as it does not really provide gettext/libintl replacement.

A "correct" glib-2 app should not use directly iconv(), since glib-2 provides g_iconv/g_iconv_open/g_iconv_close so I would limit the iconv() related changes to glib-2 only (this assumption should though be checked with the gnome upstream developers), and use g_* instead of iconv*.
For glib-2 used in conjunction with uClibc we have the options:
1. enable iconv() in uClibc's libc (UCLIBC_HAS_LOCALE)
2. if iconv is disabled there are 2 variants floating around:
- provide really no-op dummies (I would extend though the ones proposed in one of the already attached tarballs to set errno when appropiate, telling the app that it does not support the functionality)
- yvasilev's mini-iconv that supports a subset of the iconv functionality
- compile libiconv within glib-2 build (using only the static library, so that we do not depend later on the shared one) and use that to compile glib-2 (using libiconv system-wide is not OK, as it will introduce dependency even in gcc if we provide the shared library, if only the static one is provided, it would make many binaries bigger)
And now to gtk+, neither nls nor iconv is needed as long as glib-2 is modified as I proposed to provide correct gi18n.h and sources are corrected to use gi18n.h instead of libintl.h, the configure test should be disabled or made non-critical.
Comment 8 Angelo Arrifano (RETIRED) gentoo-dev 2007-09-11 17:47:08 UTC
(In reply to comment #7)
In the next update to my ARM base system I'll follow your advice. Thanks for the info.
Comment 9 Natanael Copa 2008-02-25 10:51:56 UTC
(In reply to comment #7)
> - yvasilev's mini-iconv that supports a subset of the iconv functionality

Anyone knows where I can find this mini-iconv?
Comment 10 Peter S. Mazinger 2008-02-25 19:17:12 UTC
google for yvasilev zentoo, Index of /zentoo/; /zentoo/test/overlay/dev-libs/glib/files
Comment 11 Pacho Ramos gentoo-dev 2010-03-19 16:33:58 UTC
Is upstream aware of this problem? (if still valid)
Comment 12 SpanKY gentoo-dev 2010-03-19 17:28:40 UTC
i doubt upstream cares about systems that lack i18n and l10n support
Comment 13 Pacho Ramos gentoo-dev 2010-11-19 22:21:09 UTC
Gnome team, are we willing to use this set of patches downstream? If not, we should probably close this as "WONTFIX" since upstream could be non interested per comment #12
Comment 14 Angelo Arrifano (RETIRED) gentoo-dev 2010-11-20 04:24:07 UTC
(In reply to comment #13)
> Gnome team, are we willing to use this set of patches downstream? If not, we
> should probably close this as "WONTFIX" since upstream could be non interested
> per comment #12
> 

With the latest advancements in SoC CPUs (ARM Cortex et al.), pretty much everything can run gnu's libc without effort so I question the relevance of these patches nowadays.
Comment 15 solar (RETIRED) gentoo-dev 2010-11-24 04:17:06 UTC
This is valid as it's ever been and glibc is not fitting for every setup plus these patches are pretty trivial to maintain. These efforts to create code pulled together community members towards a goal. Sadly upstream gnome team is as messed up as we are. In that some developers "get it" and apply patches where they can, and others come along and make it harder for those in the know.

However before this bug can really solve stuff, glib-2 needs to be patched also. That one is the blocker for nearly all X/syslog-ng related activities.
Comment 16 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-11-24 09:35:16 UTC
Patches need to be reworked anyway since they are doing changes the wrong way. I'll try to find some time to work on that.