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

Bug 513716 (PR61552)

Summary: sys-devel/gcc[gcj]: Incorrect dependency on media-libs/libart_lgpl
Product: Gentoo Linux Reporter: Arfrever Frehtes Taifersar Arahesis <arfrever.fta>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
URL: https://gcc.gnu.org/PR61552
See Also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61552
Whiteboard: masked in 17.0 profiles
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 511832    
Attachments: toolchain.eclass.patch
gcc_delete_libart_check.patch
gcc_delete_libart_check.patch
Patch for GCC 4.1.0 - 4.1.2
Patch for GCC 4.2.0 - 4.2.4
Patch for GCC 4.3.0 - 4.3.1
Patch for GCC 4.3.2 - 4.3.6
Patch for GCC 4.4.0 - 4.4.2
Patch for GCC 4.4.3 - 4.4.4
Patch for GCC 4.4.5 - 4.4.7
Patch for GCC 4.5.0 - 4.8.1
Patch for GCC 4.8.2 - 4.9.2
Combined patch for current sys-devel/gcc::gentoo
Combined patch for current sys-devel/gcc::gentoo

Description Arfrever Frehtes Taifersar Arahesis 2014-06-18 18:29:45 UTC
toolchain.eclass contains:

    tc_version_is_at_least 3 && IUSE+=" doc gcj
...
if in_iuse gcj ; then
    GCJ_DEPS=">=media-libs/libart_lgpl-2.1"
    ...
    DEPEND+=" gcj? ( awt? ( ${GCJ_GTK_DEPS} ) ${GCJ_DEPS} )"
fi



1. GCC <3.4 should not have any dependency on media-libs/libart_lgpl.

2. GCC 3.4.* and 4.0.* should have dependency on >=media-libs/libart_lgpl-2.1
   inside "awt?" conditional, since relevant check for libart in
   libjava/configure.ac is inside 'if test "$use_gtk_awt" = yes' conditional.

   GCC 3.4 branch libjava/configure.in:

   # Test for Gtk stuff, if asked for.
   if test "$use_gtk_awt" = yes; then
      AM_PATH_GTK_2_0(2.2.0,,exit 1)
      AM_PATH_GLIB_2_0(2.2.0,,exit 1,gthread)
      dnl XXX Fix me when libart.m4 has the compile test fixed!
      enable_libarttest=no
      AM_PATH_LIBART(2.1.0,,exit 1)
   fi


   GCC 4.0 branch libjava/configure.ac:

   # Test for Gtk stuff, if asked for.
   if test "$use_gtk_awt" = yes; then
      ...
      PKG_CHECK_MODULES(LIBART, libart-2.0 >= 2.1)
      AC_SUBST(LIBART_CFLAGS)
      AC_SUBST(LIBART_LIBS)
      ...
   fi


3. GCC >=4.1 should not have any dependency on media-libs/libart_lgpl.

4. GCC 4.1.* has useless reference to $(LIBART_LIBS) in libjava/Makefile.am:

lib_gnu_java_awt_peer_gtk_la_LIBADD = \
        gnu-java-awt-peer-gtk.lo \
        classpath/native/jni/gtk-peer/libgtkpeer.la \
        $(GTK_LIBS) $(GLIB_LIBS) $(LIBART_LIBS) $(CAIRO_LIBS) $(PANGOFT2_LIBS)


5. GCC >=4.1 has useless check for libart in libjava/configure.ac:
   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61552
   A workaround is to export e.g. LIBART_CFLAGS="unused" LIBART_LIBS="-lc".
Comment 1 Arfrever Frehtes Taifersar Arahesis 2014-06-20 19:46:33 UTC
GCC's libjava/configure contains very old versions of pkg-config macros (from pkg-config <0.16.0), which do not respect *_CFLAGS and *_LIBS environmental variables.
My patch creates a custom libart-2.0.pc in temporary directory and exports PKG_CONFIG_PATH environmental variable.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2014-06-20 19:55:28 UTC
Created attachment 379342 [details, diff]
toolchain.eclass.patch

Patch for bug #511832, bug #513576, bug #513578 and bug #513716.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2014-11-14 06:51:26 UTC
Created attachment 389278 [details, diff]
gcc_delete_libart_check.patch

Please include this patch in patchsets for 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0 branches.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2014-11-14 07:12:33 UTC
Created attachment 389282 [details, diff]
gcc_delete_libart_check.patch
Comment 5 SpanKY gentoo-dev 2014-11-14 17:24:48 UTC
Comment on attachment 379342 [details, diff]
toolchain.eclass.patch

this bug is only about libart, so let's not conflate it with multilib
Comment 6 SpanKY gentoo-dev 2014-11-14 17:25:37 UTC
Comment on attachment 389282 [details, diff]
gcc_delete_libart_check.patch

looks straightforward enough.  can you attach this to the upstream bug ?  you probably also want to send it to the gcc-patches@ mailing list unless you want me to do it.
Comment 7 Arfrever Frehtes Taifersar Arahesis 2014-11-14 19:04:14 UTC
(In reply to SpanKY from comment #6)

Please send it to that list.
Comment 8 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:31:34 UTC
Created attachment 389798 [details, diff]
Patch for GCC 4.1.0 - 4.1.2
Comment 9 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:31:38 UTC
Created attachment 389800 [details, diff]
Patch for GCC 4.2.0 - 4.2.4
Comment 10 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:31:41 UTC
Created attachment 389802 [details, diff]
Patch for GCC 4.3.0 - 4.3.1
Comment 11 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:31:45 UTC
Created attachment 389804 [details, diff]
Patch for GCC 4.3.2 - 4.3.6
Comment 12 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:31:49 UTC
Created attachment 389806 [details, diff]
Patch for GCC 4.4.0 - 4.4.2
Comment 13 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:31:52 UTC
Created attachment 389808 [details, diff]
Patch for GCC 4.4.3 - 4.4.4
Comment 14 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:31:55 UTC
Created attachment 389810 [details, diff]
Patch for GCC 4.4.5 - 4.4.7
Comment 15 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:31:59 UTC
Created attachment 389812 [details, diff]
Patch for GCC 4.5.0 - 4.8.1
Comment 16 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:32:02 UTC
Created attachment 389814 [details, diff]
Patch for GCC 4.8.2 - 4.9.2
Comment 17 Arfrever Frehtes Taifersar Arahesis 2014-11-19 21:35:15 UTC
Created attachment 389816 [details, diff]
Combined patch for current sys-devel/gcc::gentoo
Comment 18 Arfrever Frehtes Taifersar Arahesis 2015-06-02 08:17:00 UTC
Created attachment 404450 [details, diff]
Combined patch for current sys-devel/gcc::gentoo
Comment 19 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-29 11:05:54 UTC
Let's close it as non-masked versions of gcc don't have gcj and related
libraries.