By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 958 - Build issue: gcc 4.7 update causes build failures throughout TDE
Summary: Build issue: gcc 4.7 update causes build failures throughout TDE
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: other (any) (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: All Linux
: P5 major
Assignee: Timothy Pearson
URL:
Depends on:
Blocks:
 
Reported: 2012-04-05 13:40 CDT by David C. Rankin
Modified: 2012-05-06 14:33 CDT (History)
2 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
Complete Build Logs for packages listed in bug as non-building with gcc 4.7 (220.05 KB, application/x-xz)
2012-04-05 13:40 CDT, David C. Rankin
Details
gcc 4.7 patch for tdebase-kicker-launcher-easyvector.h (855 bytes, patch)
2012-04-05 19:04 CDT, David C. Rankin
Details | Diff
gcc 4.7 header inclusion patch for likeback.cpp (435 bytes, patch)
2012-04-10 18:42 CDT, David C. Rankin
Details | Diff
kima gcc 4.7 header inclusion patch for cpufreqdconnection.h (289 bytes, patch)
2012-04-10 20:31 CDT, David C. Rankin
Details | Diff
gcc 4.7 patch for tdeedu/kiten/dict.h <stl> class prefixes 'this->' (445 bytes, patch)
2012-04-11 01:34 CDT, David C. Rankin
Details | Diff
gcc 4.7 patch for k3b redecllaration of 'Range* r' in k3baudioeditorwidget.cpp (367 bytes, patch)
2012-04-18 13:51 CDT, David C. Rankin
Details | Diff
gcc 4.7 patch for k3b redecllaration of 'Range* r' - patch 2 (670 bytes, patch)
2012-04-18 15:49 CDT, David C. Rankin
Details | Diff
gcc 4.7 patch for k3b redecllaration of 'Range* r' - patch 3 (605 bytes, patch)
2012-04-18 16:52 CDT, David C. Rankin
Details | Diff
gcc 4.7 patch for tdepim (2.37 KB, patch)
2012-04-18 18:32 CDT, David C. Rankin
Details | Diff
gcc 4.7 + libpng 1.5 patch for digikam (consolidated) (1.67 KB, patch)
2012-04-19 17:00 CDT, David C. Rankin
Details | Diff
gcc 4.7 patch for kdegraphics 3.5.13 (8.91 KB, patch)
2012-04-25 16:18 CDT, Francois Andriot
Details | Diff
gcc 4.7 fix 'dcoptypes.h' in kdelibs 3.5.13 (766 bytes, patch)
2012-04-26 04:08 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for kdevelop 3.5.13 (844 bytes, patch)
2012-04-26 13:38 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for koffice 3.5.13 (2.46 KB, patch)
2012-04-26 16:14 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for amarok 3.5.13 (326 bytes, patch)
2012-05-01 04:47 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for basket 3.5.13 (268 bytes, patch)
2012-05-01 07:00 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for bibletime 3.5.13 (570 bytes, patch)
2012-05-01 07:17 CDT, Francois Andriot
Details | Diff
libpng patch for digikam 3.5.13 (1.12 KB, patch)
2012-05-01 08:51 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for python-trinity 3.5.13 (1.66 KB, patch)
2012-05-01 16:27 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for kdesvn 3.5.13 (506 bytes, patch)
2012-05-01 16:55 CDT, Francois Andriot
Details | Diff
sorry wrong file (2.64 KB, text/plain)
2012-05-01 17:40 CDT, Francois Andriot
Details
gcc 4.7 patch for kio-locate 3.5.13 (also fix installation in $DESTDIR) (890 bytes, patch)
2012-05-01 17:42 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for kmplayer 3.5.13 (error linking knpplayer) (330 bytes, patch)
2012-05-02 03:51 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for kmyfirewall 3.5.13 (WRONG FILE !) (1.33 KB, patch)
2012-05-02 04:12 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for kmymoney 3.5.13 (359 bytes, patch)
2012-05-02 04:29 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for kmyfirewall 3.5.13 (1.93 KB, patch)
2012-05-05 11:20 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for piklab 3.5.13 (1.56 KB, patch)
2012-05-06 04:51 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for rosegarden 3.5.13 (commit 15276f36 was incomplete) (782 bytes, patch)
2012-05-06 05:35 CDT, Francois Andriot
Details | Diff
gcc 4.7 patch for tellico 3.5.13 (315 bytes, patch)
2012-05-06 05:57 CDT, Francois Andriot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David C. Rankin 2012-04-05 13:40:32 CDT
Created attachment 518 [details]
Complete Build Logs for packages listed in bug as non-building with gcc 4.7

Due to the inevitable wisdom of the folks at gcc. The gcc 4.7 causes build failures throughout TDE that will have to be address. The failures seem to be related to implementation of additional C11 & C++11 extensions and optimization routines. The changes are summarized at http://gcc.gnu.org/gcc-4.7/changes.html.

  The impact of the gcc 4.7 release means distros that use the new release of gcc will no longer be able to build TDE without fixes. So far the following packages have been identified as no longer building on gcc 4.7:

basket
gwenview
k3b
kima
kipi-plugins
krusader
python-tqt
rosegarden
tdebase ( now requires -fpermissive )
tdegames
tdegraphics
tdepim
tdesdk

  Other packages may be affected, but out of all that we build, those were the ones that failed as of April 4. tdebase will build if '-fpermissive' is given as an option.  Thankfully the list is fairly short, and some of the build failures may be solvable (temporarily) with compiler/linker flags.
Comment 1 David C. Rankin 2012-04-05 19:04:39 CDT
Created attachment 519 [details]
gcc 4.7 patch for tdebase-kicker-launcher-easyvector.h

Patch for tdebase to build against gcc 4.7 without -fpermissive. easyvector.h needs a rewrite though...
Comment 2 David C. Rankin 2012-04-10 17:58:48 CDT
Some additional notes to help with gcc 4.7 fixes:

Many errors occur because gcc 47 removed numerous "unnecessary" includes from the standard library headers.

    You will now be required to #include <unistd.h> where you experience build
failures of the type:

error: ‘access’ was not declared in this scope
error: 'getuid' was not declared in this scope
error: ‘sleep’ was not declared in this scope
error: ‘usleep’ was not declared in this scope
Comment 3 David C. Rankin 2012-04-10 18:42:05 CDT
Created attachment 530 [details]
gcc 4.7 header inclusion patch for likeback.cpp

applications/basket failed to build due to:

likeback.cpp:618:23: error: 'getuid' was not declared in this scope

This was caused by gcc 4.7 no longer including "unnecessary" header files. Fixed with this patch.
Comment 4 David C. Rankin 2012-04-10 20:31:04 CDT
Created attachment 531 [details]
kima gcc 4.7 header inclusion patch for cpufreqdconnection.h

applications/kima fails to build on gcc47. This patch fixes the gcc 47 header inclusion issues in cpufreqdconnection.h.
Comment 5 David C. Rankin 2012-04-11 01:34:04 CDT
Created attachment 532 [details]
gcc 4.7 patch for tdeedu/kiten/dict.h <stl> class prefixes 'this->'

I was successful in developing a patch for the tdeedu package. It largely was another stl library vector with missing 'this->' prefixes in the class calls. tdeedu builds fine now!
Comment 6 David C. Rankin 2012-04-11 14:14:22 CDT
Packages SERIOUSLY broken by gcc47 that I cannot fix and that do NOT compile with '-fpermissive':

k3b:

k3baudioeditorwidget.cpp: In member function 'virtual void K3bAudioEditorWidget::mousePressEvent(TQMouseEvent*)':
k3baudioeditorwidget.cpp:674:12: error: redeclaration of 'K3bAudioEditorWidget::Range* r'
k3baudioeditorwidget.cpp:668:14: error: 'K3bAudioEditorWidget::Range* r' previously declared here

kipi-plugins:

imageslist.cpp: In member function 'void KIPIFlickrExportPlugin::ImagesList::slotAddImages(const KURL::List&)':
imageslist.cpp:231:35: error: redeclaration of 'TQListViewItemIterator it'
imageslist.cpp:223:36: error: 'TQValueList<KURL>::const_iterator it' previously declared here

tdepim:

Huge linker issue at [ 42%] Building CXX object libtdepim/CMakeFiles/tdepim-shared.dir/kmailcompletion.cpp.o. I don't know what this error is?

rosegarden:

/build/src/rosegarden/src/commands/notation/AddFingeringMarkCommand.cpp:76:69:   required from here
/build/src/rosegarden/src/base/Sets.h:680:70: error: 'class Rosegarden::GenericChord<Rosegarden::Event, Rosegarden::Segment, true>::PitchGreater' has no member named 'getAsEvent'
/build/src/rosegarden/src/base/Sets.h:681:70: error: 'class Rosegarden::GenericChord<Rosegarden::Event, Rosegarden::Segment, true>::PitchGreater' has no member named 'getAsEvent'

The following require '-fpermissive' to build with gcc47:

  tdegraphics
  krusader
  amarok
  kaffeine
  tdeadmin
  tdegames
  tdeedu
  python-tqt

The packages that would not build prior to gcc47 due to libpng15, eg: digikam, etc.. cannot be tested against gcc47 until the libpng15 bugs are fixed.

The list of files successfully build against gcc47 are here:

http://www.3111skyline.com/dl/dt/tde/err/gcc47/gcc47-building.txt
Comment 7 David C. Rankin 2012-04-18 13:51:21 CDT
Created attachment 548 [details]
gcc 4.7 patch for k3b redecllaration of 'Range* r' in k3baudioeditorwidget.cpp

This patch allows k3b to be build on gcc47. It eliminates the error:

k3baudioeditorwidget.cpp: In member function 'virtual void K3bAudioEditorWidget::mousePressEvent(TQMouseEvent*)':
k3baudioeditorwidget.cpp:674:12: error: redeclaration of 'K3bAudioEditorWidget::Range* r'
k3baudioeditorwidget.cpp:668:14: error: 'K3bAudioEditorWidget::Range* r' previously declared here
Comment 8 David C. Rankin 2012-04-18 15:49:43 CDT
Created attachment 549 [details]
gcc 4.7 patch for k3b redecllaration of 'Range* r' - patch 2

Second patch moving declaration of 'Range* r' outside the conditional statement of the 'if'. Clean up only - no functional difference.
Comment 9 David C. Rankin 2012-04-18 16:52:52 CDT
Created attachment 550 [details]
gcc 4.7 patch for k3b redecllaration of 'Range* r' - patch 3

Re ordered Range declaration order..
Comment 10 David C. Rankin 2012-04-18 18:32:13 CDT
Created attachment 551 [details]
gcc 4.7 patch for tdepim

This patch fixes gcc 4.7 build issues on tdepim. It builds on Archlinux, but requires -fpermissive, so additional patching will likely be necessary.
Comment 11 David C. Rankin 2012-04-19 17:00:23 CDT
Created attachment 552 [details]
gcc 4.7 + libpng 1.5 patch for digikam (consolidated)

This patch is "IN ADDITION TO" the png_jmpbuf patch Tim committed to digikam to correct remaining libpng 1.5 issues and correct gcc 4.7 redeclaration issues.
Comment 12 Darrell 2012-04-21 18:13:18 CDT
Paraphrasing from the mail list discussion:

Do the alpha-enabled thumbnail images still work properly in Digikam after the
patch? That is the only major code affected by the change.
Comment 13 Francois Andriot 2012-04-25 16:18:03 CDT
Created attachment 559 [details]
gcc 4.7 patch for kdegraphics 3.5.13

Hello, here is a patch to build kdegraphics 3.5.13 with GCC 4.7 without -fpermissive . It works on Fedora 17.
Comment 14 Darrell 2012-04-25 16:32:56 CDT
Francois, would you please attach your kdelibs-3.5.13-fix_dcoptypes_h.patch too? And any other gcc 4.7 patches? Thanks!
Comment 15 Francois Andriot 2012-04-26 04:08:43 CDT
Created attachment 561 [details]
gcc 4.7 fix 'dcoptypes.h' in kdelibs 3.5.13

Here is the kdelibs 'dcoptypes.h' patch.
Comment 16 Francois Andriot 2012-04-26 13:38:19 CDT
Created attachment 564 [details]
gcc 4.7 patch for kdevelop 3.5.13
Comment 17 Francois Andriot 2012-04-26 16:14:17 CDT
Created attachment 565 [details]
gcc 4.7 patch for koffice 3.5.13
Comment 18 Darrell 2012-04-28 13:19:15 CDT
All patches have been merged to GIT and tested against GCC 4.7. I am able to build without using -fpermissive anywhere and all packages build without incident.

I will run one more build run against GCC 4.7 and < GCC 4.7. If no new problems emerge I will close this bug report. Thereafter new GCC 4.7 problems can be opened for each individual package.

Thank you everybody for the patches!
Comment 19 Darrell 2012-04-29 00:03:58 CDT
I ran build runs against gcc 4.4.4 and 4.7.0 against the latest GIT fully patched for gcc 4.7. No build errors. I'm closing this report as resolved.

Thanks again everybody!
Comment 20 Francois Andriot 2012-05-01 04:47:57 CDT
Created attachment 570 [details]
gcc 4.7 patch for amarok 3.5.13
Comment 21 Francois Andriot 2012-05-01 07:00:15 CDT
Created attachment 572 [details]
gcc 4.7 patch for basket 3.5.13
Comment 22 Francois Andriot 2012-05-01 07:17:45 CDT
Created attachment 573 [details]
gcc 4.7 patch for bibletime 3.5.13
Comment 23 Francois Andriot 2012-05-01 08:51:29 CDT
Created attachment 574 [details]
libpng patch for digikam 3.5.13
Comment 24 Francois Andriot 2012-05-01 16:27:30 CDT
Created attachment 577 [details]
gcc 4.7 patch for python-trinity 3.5.13
Comment 25 Francois Andriot 2012-05-01 16:55:13 CDT
Created attachment 578 [details]
gcc 4.7 patch for kdesvn 3.5.13
Comment 26 Francois Andriot 2012-05-01 17:40:36 CDT
Created attachment 579 [details]
sorry wrong file
Comment 27 Francois Andriot 2012-05-01 17:42:58 CDT
Created attachment 580 [details]
gcc 4.7 patch for kio-locate 3.5.13 (also fix installation in $DESTDIR)
Comment 28 Francois Andriot 2012-05-02 03:51:04 CDT
Created attachment 581 [details]
gcc 4.7 patch for kmplayer 3.5.13 (error linking knpplayer)
Comment 29 Francois Andriot 2012-05-02 04:12:08 CDT
Created attachment 582 [details]
gcc 4.7 patch for  kmyfirewall 3.5.13 (WRONG FILE !)

Hi Darell, I think that the patch you pushed to Git 88d2d2a7 will not produce the expected behaviour (e.g app compiling but not working correctly).
I think the attached patch is better.
Comment 30 Francois Andriot 2012-05-02 04:29:12 CDT
Created attachment 583 [details]
gcc 4.7 patch for kmymoney 3.5.13
Comment 31 Darrell 2012-05-02 11:18:51 CDT
(In reply to comment #29)
> Created attachment 582 [details]
> gcc 4.7 patch for kmyfirewall 3.5.13
> 
> Hi Darell, I think that the patch you pushed to Git 88d2d2a7 will not produce
> the expected behaviour (e.g app compiling but not working correctly).
> I think the attached patch is better.

The patch you attached for kmyfirewall is for kmplayer from git hash 5106117b. :-)
Comment 32 Francois Andriot 2012-05-05 11:20:49 CDT
Created attachment 603 [details]
gcc 4.7 patch for kmyfirewall 3.5.13
Comment 33 Darrell 2012-05-05 11:59:43 CDT
Thanks!

I'll try to start pushing these patches to GIT. I prefer first to run builds across the platforms I support to verify no cross-platform errors, both 32-bit and 64-bit, but I'll get them pushed sooner or later. :-)
Comment 34 Francois Andriot 2012-05-06 04:51:23 CDT
Created attachment 608 [details]
gcc 4.7 patch for piklab 3.5.13
Comment 35 Francois Andriot 2012-05-06 05:35:26 CDT
Created attachment 609 [details]
gcc 4.7 patch for rosegarden 3.5.13 (commit 15276f36 was incomplete)
Comment 36 Francois Andriot 2012-05-06 05:57:07 CDT
Created attachment 610 [details]
gcc 4.7 patch for tellico 3.5.13
Comment 37 Darrell 2012-05-06 14:33:15 CDT
bibletime patch pushed to GIT in hash f40c4c84.

kmymoney patch pushed to GIT in hash c6db2e9c.

kmplayer patch pushed to GIT in hash 611a89f3.

kmyfirewall patch pushed to GIT in hash 5a6eca6c.

kdesvn patch applicable to 3.5.13 only. kdesvn was renamed to tdesvn. tdesvn was patched to find APR in GIT hash 220261c9, bug report 916. Possibly move that patch to bug report 984?

python-trinity patch pushed to GIT in hash 4ff6a82b.

kio-locate patch pushed to GIT in hash 5ca3dca6.

piklab patch pushed to GIT in hash ae1ac385.

rosegarden patch pushed to GIT in hash 0801c28c.

tellico patch pushed to GIT in hash 64692771.