Nux

Fails to compile with GCC 4.6 (unless using -fpermissive)

Bug #745392 reported by Adam Williamson on 2011-03-30
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Nux
Fix Released
High
Unassigned
Unity
Invalid
High
Unassigned
nux (Ubuntu)
High
Unassigned

Bug Description

Trying to build nux 0.9.36 with GCC 4.6 (Fedora 15) I hit multiple errors in RenderingPipeGLSL.cpp:

[adamw@adam SPECS]$ grep error: /var/lib/mock/fedora-15-x86_64/result/build.log
./RenderingPipeGLSL.cpp:906:131: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:967:131: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1043:131: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1126:131: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1203:131: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1279:131: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1368:131: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1447:130: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1500:131: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1565:131: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1640:130: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1701:130: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1770:130: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1841:130: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1910:130: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:1981:130: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:2059:130: error: taking address of temporary [-fpermissive]
./RenderingPipeGLSL.cpp:2520:131: error: taking address of temporary [-fpermissive]

from Google, looks like GCC 4.6 is clamping down on some coding error or other here. I don't know what, I'm not a coder. :)

Related branches

Adam Williamson (awilliamson) wrote :

Fedora's handy-dandy guide to GCC 4.6 changes - http://lists.fedoraproject.org/pipermail/devel/2011-February/148523.html - says:

http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164704
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02144.html

This used to be just a warning, now it is an error (unless -fpermissive). Please don't add -fpermissive, instead just add a variable and pass address of the variable if at all possible.

Alex Launi (alexlauni) on 2011-04-05
Changed in nux:
status: New → Confirmed
Changed in unity:
status: New → Invalid
Changed in nux (Ubuntu):
status: New → Confirmed
status: Confirmed → Invalid
Changed in nux:
importance: Undecided → Low
Didier Roche (didrocks) on 2011-04-07
Changed in unity:
status: Invalid → Confirmed
Changed in nux (Ubuntu):
status: Invalid → Confirmed
Neil J. Patel (njpatel) on 2011-04-09
Changed in nux:
assignee: nobody → Jay Taoko (jaytaoko)
Hicham HAOUARI (funnylife-ma) wrote :

Attached patch fixes it

Hicham HAOUARI (funnylife-ma) wrote :

Also don't redefine GLEW_MX since it is define in glewmx pkgconfig file

tags: added: patch
Hicham HAOUARI (funnylife-ma) wrote :

the glew_mx patch breaks unity build, as a side note, so GLEW_MX needs to be defined in unity

Didier Roche (didrocks) wrote :

Setting as high now that oneiric have 4.6 by default. Thanks Adam, I'm currently trying to build nux with your patch to unbreak nux in oneiric.

Upstream should do a proper review and integrate it for next oneiric upload.

Changed in nux:
importance: Low → High
Changed in unity:
importance: Undecided → High
Changed in nux (Ubuntu):
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nux - 0.9.48-0ubuntu2

---------------
nux (0.9.48-0ubuntu2) oneiric; urgency=low

  * debian/patches/01_build_with_gcc46.patch:
    - Fix Fails to compile with GCC 4.6 (thanks Adam Williamson) (LP: #745392)
  * debian/control, rules, patches/series:
    - add quilt infrastructure
 -- Didier Roche <email address hidden> Wed, 18 May 2011 13:13:49 +0200

Changed in nux (Ubuntu):
status: Confirmed → Fix Released
Adam Williamson (awilliamson) wrote :

just for the record, you should probably thank Hicham, not me: he wrote the patch :)

Changed in nux:
assignee: Jay Taoko (jaytaoko) → Marco Biscaro (marcobiscaro2112)
status: Confirmed → In Progress
Changed in unity:
status: Confirmed → In Progress
status: In Progress → Invalid
Didier Roche (didrocks) on 2011-06-20
Changed in unity:
status: Invalid → In Progress
Changed in nux:
assignee: Marco Biscaro (marcobiscaro2112) → nobody

Updating status.

Changed in nux:
status: In Progress → Fix Released
Changed in unity:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers