Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 250930

Summary: dev-python/4suite has an internal copy of expat-2.0.0
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: Tiziano Müller (RETIRED) <dev-zero>
Status: RESOLVED FIXED    
Severity: normal CC: djc, esigra, treecleaner
Priority: High Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: Pending removal: 2012-06-15
Package list:
Runtime testing required: ---
Bug Depends on: 306655, 393587    
Bug Blocks: 251464, 280615, 303727, 407519    

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-12-14 13:47:27 UTC
4Suite-XML-1.0.2/Ft/Xml/src/expat/lib

Would be nice if upstream let us use the system copy of the library.
Comment 1 Dirkjan Ochtman (RETIRED) gentoo-dev 2010-01-01 22:13:42 UTC
4suite seems to have a dead upstream, I vote for just sunsetting it.
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-01-01 23:08:28 UTC
4suite has some reverse dependencies, so it currently cannot be removed.
Ft/Xml/src/domlette/xmlchar.h requires expat built with UTF-16 encoding, but dev-libs/expat is built with UTF-8 encoding.
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2010-02-24 09:34:04 UTC
Amara2 is going to replace Amara which is a rev-dep for 4suite. It doesn't need 4suite anymore but it bundles expat for the very same reason as 4suite: expat has to be built with UTF-16.

@Diego: You reported this bug, do you have a suggestion on how to proceed?

Has anyone an idea what happens if expat gets built with UTF-16?

One possible solution is to build expat twice and install the UTF-16 versions with different library- and so-names and the headers for UTF-16 in a subdir.
Comment 4 Tiziano Müller (RETIRED) gentoo-dev 2010-02-24 09:36:21 UTC
aah, wait, that's what expat upstream recommends:
[...]
If you are interested in building Expat to provide document
information in UTF-16 rather than the default UTF-8, follow these
instructions (after having run "make distclean"):

        1. For UTF-16 output as unsigned short (and version/error
           strings as char), run:

               ./configure CPPFLAGS=-DXML_UNICODE

           For UTF-16 output as wchar_t (incl. version/error strings),
           run:

               ./configure CFLAGS="-g -O2 -fshort-wchar" \
                           CPPFLAGS=-DXML_UNICODE_WCHAR_T

        2. Edit the MakeFile, changing:

               LIBRARY = libexpat.la

           to:

               LIBRARY = libexpatw.la

           (Note the additional "w" in the library name.)

        3. Run "make buildlib" (which builds the library only).
           Or, to save step 2, run "make buildlib LIBRARY=libexpatw.la".

        4. Run "make installlib" (which installs the library only).
           Or, if step 2 was omitted, run "make installlib LIBRARY=libexpatw.la".
[...]
Comment 5 Tiziano Müller (RETIRED) gentoo-dev 2010-02-24 11:16:18 UTC
Done. A modified expat ebuild is here: http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git;a=blob_plain;f=dev-libs/expat/expat-2.0.1-r4.ebuild;hb=HEAD
Comment 6 Tiziano Müller (RETIRED) gentoo-dev 2010-02-24 12:57:21 UTC
Just in case someone looked at it already: just rewrote it (again).
New ebuild for amara-2 is also in my overlay...
Comment 7 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-02-16 13:06:15 UTC
Reassigning to dev-zero, he seems to have a handle on this.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2012-05-16 01:41:50 UTC
This package is still using the now obsolete dev-python/pyxml package (Bug 367745) and fails to install (Bug 368089).

For me this simply hangs at:

>>> Configuring source in /var/tmp/portage/dev-python/4suite-1.0.2-r2/work/4Suite-XML-1.0.2 ...
 * Configuration of dev-python/4suite-1.0.2-r2 with CPython 2.7...

And nothing happens (waited 2 hours).

And it's vulnerable even when bug 306655 was fixed and there is nothing stopping fixing this now.

Since it's clearly not maintained by upstream, or Gentoo, I suppose it's time for lastriting the package?
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2012-05-16 01:44:20 UTC
This means p.masking the following:

dev-python/4suite
dev-python/amara
dev-python/testoob

Any objections?
Comment 10 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-05-16 06:50:26 UTC
Good riddance, as far as I'm concerned.
Comment 11 Tiziano Müller (RETIRED) gentoo-dev 2012-05-16 08:40:41 UTC
I have a version bump for amara-2.0.0_alpha6 in my overlay and somehow tested, but it requires another version expat: built with unicode support using wchar_t and not using -fshort-wchar (as in the current expat ebuild).
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2012-05-16 08:43:24 UTC
(In reply to comment #11)
> I have a version bump for amara-2.0.0_alpha6 in my overlay and somehow
> tested, but it requires another version expat: built with unicode support
> using wchar_t and not using -fshort-wchar (as in the current expat ebuild).

We have packaged what upstream has documented in README:

        1. For UTF-16 output as unsigned short (and version/error
           strings as char), run:

               ./configure CPPFLAGS=-DXML_UNICODE

^ libexpatu

           For UTF-16 output as wchar_t (incl. version/error strings),
           run:

               ./configure CFLAGS="-g -O2 -fshort-wchar" \
                           CPPFLAGS=-DXML_UNICODE_WCHAR_T

^ libexpatw

So a third one, that's not documented in upstream files? Uh please no.
Comment 13 Tiziano Müller (RETIRED) gentoo-dev 2012-05-16 09:43:33 UTC
amara-1 is gone and expatw is now built without -fshort-wchar as discussed on IRC.
Comment 14 Rafał Mużyło 2012-05-19 08:59:19 UTC
@comment 16:
It's not only undocumented upstream, it's also unreachable in expat 2.1.0.

In the old sources, '-DXML_UNICODE -DXML_UNICODE_WIDE' (basically, what's in the tarball) resulted in:
typedef unsigned int XML_Char;
typedef char XML_LChar;
while now '-DXML_UNICODE' (expatu) gives:
typedef unsigned short XML_Char;
typedef char XML_LChar;
while '-DXML_UNICODE_WCHAR_T' (expatw):
typedef wchar_t XML_Char;
typedef wchar_t XML_LChar;

Neither combination fits.
Comment 15 Tiziano Müller (RETIRED) gentoo-dev 2012-06-16 07:50:35 UTC
4suite is gone.