Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417105 - =dev-qt/qtcore-4.8*[glib] + gcc-4.7 + graphite: glib.cpp:44:18: error fatal: glib.h: No such file or directory
Summary: =dev-qt/qtcore-4.8*[glib] + gcc-4.7 + graphite: glib.cpp:44:18: error fatal: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 463473 477400 478432 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-22 14:55 UTC by Joel
Modified: 2013-08-20 13:24 UTC (History)
9 users (show)

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


Attachments
build.log (build.log,135.09 KB, text/plain)
2012-05-22 14:56 UTC, Joel
Details
emerge --info (info,5.50 KB, text/plain)
2012-05-22 14:56 UTC, Joel
Details
build.log (build.log,133.39 KB, text/plain)
2012-07-30 21:09 UTC, Sergey Ilinykh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel 2012-05-22 14:55:22 UTC
I've upgraded to gcc 4.7 this morning, and tried to do an "emerge -e system". When emerge tries to compile qt-core-4.8.1-r3, it complains that glib.h doesn't exist (but it's under /usr/include/glib-2.0/glib.h). Doesn't happens with gcc 4.6.3.

Reproducible: Always
Comment 1 Joel 2012-05-22 14:56:14 UTC
Created attachment 312697 [details]
build.log
Comment 2 Joel 2012-05-22 14:56:55 UTC
Created attachment 312699 [details]
emerge --info
Comment 3 Joel 2012-05-22 15:08:45 UTC
Seems that it is because of graphite use flags. (Still compiling)
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-23 14:12:14 UTC
It looks like qmake doesn't pass the relevant CFLAGS (includes and such) to the compiler.
Comment 5 Joel 2012-05-23 14:13:18 UTC
Anyway, I've confirmed on my machine that this only happens with graphite flags (see emerge --info) enabled.
Comment 6 Davide Pesavento gentoo-dev 2012-05-23 14:46:20 UTC
(In reply to comment #4)
> It looks like qmake doesn't pass the relevant CFLAGS (includes and such) to
> the compiler.

Yep, probably related to the many "Unknown test function: load" warnings.
Comment 7 Alex Turbov 2012-06-04 14:10:58 UTC
confirmed w/ qt-core-4.8.2 and gcc 4.7 (w/ graphite ON)
Comment 8 Davide Pesavento gentoo-dev 2012-06-15 13:05:31 UTC
Does it still happen with gcc-4.7.1 ?
Comment 9 Bernd Buschinski 2012-06-15 15:38:17 UTC
compiles fine for me with
x11-libs/qt-core-4.8.2 with glib
and gcc-4.7.1 with graphite
Comment 10 Davide Pesavento gentoo-dev 2012-06-17 23:48:20 UTC
(In reply to comment #9)
> compiles fine for me with
> x11-libs/qt-core-4.8.2 with glib
> and gcc-4.7.1 with graphite

Thanks for testing.
I assume it was a gcc bug that got fixed in 4.7.1.
Comment 11 Sergey Ilinykh 2012-07-28 10:41:22 UTC
also gcc-4.7.1 + graphite

CFLAGS="-march=core2 -O2 -pipe -ftree-vectorize -fgraphite-identity -maes -floop-parallelize-all -floop-interchange -floop-block -fira-loop-pressure"
CXXFLAGS="${CFLAGS}"

the error is still reproducible while compiling qt-4.8.2
Comment 12 Sergey Ilinykh 2012-07-28 10:44:05 UTC
also while next packages compiled with graphite...

qt-webkit: psi (USE=webkit extras) hangs on start
qt-script: qt-creator crashes on start
Comment 13 Davide Pesavento gentoo-dev 2012-07-28 16:31:19 UTC
Uhm... are there any particular graphite-related C(XX)FLAGS we could blacklist in qt4-build.eclass?
Comment 14 Sergey Ilinykh 2012-07-28 16:47:31 UTC
I'm not sure which of these.

-ftree-vectorize -fgraphite-identity -floop-parallelize-all -floop-interchange -floop-block -fira-loop-pressure

but looks like I have problems only with qt apps.
Comment 15 Davide Pesavento gentoo-dev 2012-07-28 23:09:10 UTC
I don't understand... is this a problem in qt apps or in qt libs themselves? Did you build the entire world set with graphite cflags or just qt?
Comment 16 Sergey Ilinykh 2012-07-29 16:19:36 UTC
entire world.

I skipped qt-core for the first time since it won't build, so it was built with gcc-4.6+graphite until everything other with gcc-4.7+graphite.
then I rebuilt qt-core with gcc-4.7 but w/o graphite
in both cases I had the same issues as described above.

then I rebuilt qt-webkit and qt-script w/o graphite and now everything seems to work properly.
Comment 17 Shubhadeep Chaudhuri 2012-07-29 19:05:50 UTC
I'm doing a new gentoo install and this error occurs with gcc-4.7.1 + graphite for me as well.
Comment 18 Davide Pesavento gentoo-dev 2012-07-30 04:59:01 UTC
Sounds like a regression in gcc 4.7 then, and still present in 4.7.1, assigning to toolchain.

Rion/Jesse: please attach a build.log of the failure using latest qt-core and gcc versions.
Comment 19 Sergey Ilinykh 2012-07-30 21:09:50 UTC
Created attachment 319782 [details]
build.log
Comment 20 Davide Pesavento gentoo-dev 2012-07-30 22:51:38 UTC
I'd say that qmake is being miscompiled, judging from the weird warnings it throws during configure...
Comment 21 Sergey Ilinykh 2012-07-31 04:33:02 UTC
Agreed.

I saw fixes for graphite problems in firefox and that was something with concatenation of strings and macro defined strings. pretty strange for graphite but how knows.
Comment 22 Ryan Hill (RETIRED) gentoo-dev 2012-07-31 05:17:57 UTC
I can reproduce with -O2 -fgraphite-identity.

(In reply to comment #13)
> Uhm... are there any particular graphite-related C(XX)FLAGS we could
> blacklist in qt4-build.eclass?

No, we don't really support graphite, and we don't as a general rule filter flags that we don't support.  This should be fixed in the compiler if possible.

Is there a log somewhere of what exactly is being run for "floatmath auto-detection... ()" etc, like an equivalent of config.log?  We'll need to isolate a testcase.
Comment 23 Davide Pesavento gentoo-dev 2012-07-31 05:59:52 UTC
(In reply to comment #22)
> Is there a log somewhere of what exactly is being run for "floatmath
> auto-detection... ()" etc, like an equivalent of config.log?  We'll need to
> isolate a testcase.

That output is produced by qmake itself, which is used to build the config programs, thus the miscompilation happens in qmake code, not in one of the test programs used by configure.

You can find the actual qmake invocation inside ${S}/config.tests/unix/*.test (in particular, compile.test is the one used to check for glib IIRC). Be sure to run src_prepare before though, because we patch some of those files.
Comment 24 Rob 2012-09-26 21:43:10 UTC
I upgraded to gcc 4.7.2 using the method described by Andreas in Bug 435852 and this issue is resolved for me.
Comment 25 Ryan Hill (RETIRED) gentoo-dev 2012-09-30 06:24:20 UTC
It still fails for me with 4.7.2.
Comment 26 cruzki 2012-10-13 20:40:11 UTC
It fails for my too with 4.7.2
Comment 27 Sean Santos 2013-02-23 05:49:29 UTC
On a whim I tried gcc 4.7.2, qt-core-4.8.4-r2, with these:

CFLAGS="-O2 -fgraphite-identity"

No problem.
Comment 28 Davide Pesavento gentoo-dev 2013-04-02 10:21:10 UTC
*** Bug 463473 has been marked as a duplicate of this bug. ***
Comment 29 Davide Pesavento gentoo-dev 2013-07-19 16:11:39 UTC
*** Bug 477400 has been marked as a duplicate of this bug. ***
Comment 30 Davide Pesavento gentoo-dev 2013-07-19 16:14:12 UTC
still NOT fixed in gcc-4.7.3, judging from the latest dupe.
Comment 31 dE 2013-07-29 14:48:09 UTC
*** Bug 478432 has been marked as a duplicate of this bug. ***
Comment 32 Ryan Hill (RETIRED) gentoo-dev 2013-08-12 19:27:27 UTC
We won't be seeing any graphite-related fixes from upstream for 4.7, so there's nothing we can do here.

Qt guys, something like 

  [[ $(gcc-version) == "4.7" ]] && filter-flags -fgraphite-identity

should work.
Comment 33 Davide Pesavento gentoo-dev 2013-08-13 10:20:22 UTC
(In reply to Ryan Hill from comment #32)

Filtering implemented in qt4-build.eclass.
Thanks to everyone involved!
Comment 34 dE 2013-08-20 13:24:10 UTC
Reported upstream.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58202