openscenegraph 3.2.0~rc1 doesn't build on ARM (armhf), but builds fine in Debian

Bug #1284190 reported by Mantas Kriaučiūnas
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
openscenegraph (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Saikrishna Arcot

Bug Description

[Impact]

openscenegraph FTBFS for armhf partly because it tries to build for OpenGL, partly because there is a typedef conflict for GLdouble between this package and Qt, and partly because freeglut does not support OpenGL ES yet. As a result, any package dependent on this package does not build either.

The changes made:
1. Tell openscenegraph to not use OpenGL and to instead use OpenGL ES.
2. Backport part of a commit that tells the build system not to build an example application when compiling for OpenGL ES, as that application doesn't support OpenGL ES.
3. Fix a typedef conflict for GLdouble and Qt by changing it from a typedef to a #define. On the Qt side, Qt checks to see if GLdouble is #defined and if it's not #defined, it gives its own typedef.
4. Not to include freeglut-dev on armhf, so that the example that uses freeglut isn't built.

[Test Case]

Try to build openscenegraph as is.

[Regression Potential]

No regressions should occur for non-armhf (and non-OpenGL ES) architectures, as no code related to those architectures is being changed. As for armhf, the package will build, but the example that uses freeglut will not be included in the final package.

That being said, some packages that depend on this package also depend on freeglut as well, which, as of 2.8, does not support OpenGL ES. OpenGL ES support is expected for 3.0, and compiling the current git version for armhf (with the necessary modifications to tell it to build for OpenGL ES) works. Therefore, those packages will still FTBFS.

[Original Description]

openscenegraph 3.2.0~rc1-4 package (from Ubuntu Trusty) doesn't build on ARM (armhf) in Ubuntu (see https://launchpad.net/ubuntu/+source/openscenegraph/3.2.0~rc1-4/+build/5615979 ), but builds fine in Debian, see:

https://buildd.debian.org/status/fetch.php?pkg=openscenegraph&arch=armhf&ver=3.2.0~rc1-4&stamp=1392733150

I don't know why build fails in Ubuntu - I found only this error in build log:

[ 94%] Building CXX object src/osgPlugins/pdf/CMakeFiles/osgdb_pdf.dir/ReaderWriterPDF.o
cd "/build/buildd/openscenegraph-3.2.0~rc1/build/osg/src/osgPlugins/pdf" && /usr/bin/arm-linux-gnueabihf-g++ -Dosgdb_pdf_EXPORTS -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive -fPIC -I"/build/buildd/openscenegraph-3.2.0~rc1/OpenSceneGraph/include" -I"/build/buildd/openscenegraph-3.2.0~rc1/build/osg/include" -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/poppler/glib -I/usr/include/poppler -o CMakeFiles/osgdb_pdf.dir/ReaderWriterPDF.o -c "/build/buildd/openscenegraph-3.2.0~rc1/OpenSceneGraph/src/osgPlugins/pdf/ReaderWriterPDF.cpp"
make[3]: Leaving directory `/build/buildd/openscenegraph-3.2.0~rc1/build/osg'
make[2]: *** [src/osgQt/CMakeFiles/osgQt.dir/all] Error 2

Please build openscenegraph for ARMHF architecture - now there are no QGIS ARM packages in Ubuntu Trusty because of missing libopenscenegraph-dev :(

Related branches

Revision history for this message
Scott Kitterman (kitterman) wrote :

It's because it's making direct GL calls and on armhf Ubuntu only support GLES. This is a difference between Ubuntu and Debian.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openscenegraph (Ubuntu):
status: New → Confirmed
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

How I can help to get libopenscenegraph-dev packages for armhf architecture? Or should we use Debian on ARM computers instead of Ubuntu?

Scott Kitterman (kitterman) wrote on 2014-02-24: #1
> It's because it's making direct GL calls and on armhf Ubuntu only support GLES.
> This is a difference between Ubuntu and Debian.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Maybe latest OpenSceneGraph 3.2.1 release would compile in Ubuntu (GLES) - I've found some fixes related to GLES2 in 3.2.1rc2 Changelog:

2013-10-01 09:05 robert

 * src/osg/PointSprite.cpp: From Thomas Hogarth, "Attached is a
   small build fix for PointSprite when compiling under GLES2
   (r13788)

   GL_POINT_SPRITE_OES does not exist in GLES2, instead you just
   draw using GL_POINTS then use gl_PointSize in a vertex shader to
   set the size."

See http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.2.1-rc2/ChangeLog

More info about 3.2.1rc2 release (and 3.2 final release) is here:
http://www.openscenegraph.org/index.php/download-section/stable-releases/155-openscenegraph-3-2-1-release-candidate-2
http://www.openscenegraph.org/index.php/community/press-releases/143-openscenegraph-3-2-release

Revision history for this message
Daniel Holbach (dholbach) wrote :

Failed to build for me on armhf. Log attached.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Seems to fail in a similar way.

You might want to use -5.1ubuntu1 as version number.

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Something's odd there. Openscenegraph shouldn't be building with Qt5 in Ubuntu (although it is supported, IIRC). I take it this is not in a chroot?

I've attached my sbuild log for comparison. Note that qt5 is not mentioned at all (except as a suggested package).

Also, I'll correct the version number.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openscenegraph - 3.2.0~rc1-5.1ubuntu1

---------------
openscenegraph (3.2.0~rc1-5.1ubuntu1) utopic; urgency=low

  * Add support for building on armhf by building with OpenGL ES 2.0
    (LP: #1284190).
  * Backport part of a commit to not build osgframerenderer example.
  * Add change-typedef.patch to fix conflicting typedefs for GLdouble
    with OpenGL ES 2.0
  * Exclude freeglut3-dev from dependencies for armhf
 -- Saikrishna Arcot <email address hidden> Wed, 06 Aug 2014 17:41:46 -0500

Changed in openscenegraph (Ubuntu):
status: Confirmed → Fix Released
description: updated
Changed in openscenegraph (Ubuntu Trusty):
status: New → Confirmed
Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Build log for trusty armhf is attached.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :
Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Considering that this hasn't been SRU'ed, can I include another bug fix into the SRU? If so, would I need to bump up the version?

Also, for openwalnut, I fixed the build error with openscenegraph, but there's an undefined variable that might only be in OpenGL and not OpenGL ES.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Your SRU upload is currently in Unapproved queue:
https://launchpad.net/ubuntu/trusty/+queue?queue_state=1

Until it is accepted, we can ask the SRU team to reject it and do other upload with the same version number. But after it's accepted, you'll have to do upload with higher version number.

Feel free to attach a new debdiff here, sponsors will take care of it.

Revision history for this message
Chris J Arges (arges) wrote :

I've rejected the upload for Trusty, per comment #12.
Thanks!

Revision history for this message
Iain Lane (laney) wrote :

I'm unsubscribing the sponsors since there is no current work to sponsor - please resubscribe ubuntu-sponsors once there is

Iain Lane (laney)
Changed in openscenegraph (Ubuntu Trusty):
status: Confirmed → In Progress
assignee: nobody → Saikrishna Arcot (saiarcot895)
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Mantas, or anyone else affected,

Accepted openscenegraph into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/openscenegraph/3.2.0~rc1-4ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in openscenegraph (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Openscenegraph now installs in Ubuntu Trusty armhf.

Revision history for this message
Mathew Hodson (mhodson) wrote :

Tagging based on comment #16.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openscenegraph - 3.2.0~rc1-4ubuntu0.1

---------------
openscenegraph (3.2.0~rc1-4ubuntu0.1) trusty; urgency=low

  * Add support for building on armhf by building with OpenGL ES 2.0
    (LP: #1284190).
  * Backport part of a commit to not build osgframerenderer example.
  * Add change-typedef.patch to fix conflicting typedefs for GLdouble
    with OpenGL ES 2.0
  * Exclude freeglut3-dev from dependencies for armhf
  * Add patch to fix FreeType library detection (LP: #1339264).
 -- Saikrishna Arcot <email address hidden> Wed, 06 Aug 2014 17:41:46 -0500

Changed in openscenegraph (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for openscenegraph has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.