Building lightspark-0.4.2 with gcc-4.3 fails with non-informative error

Bug #608228 reported by Chi-Thanh Christopher Nguyen on 2010-07-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lightspark
Medium
Unassigned
Gentoo Linux
Fix Released
Low

Bug Description

GCC 4.3 does not ship stdatomic.h. Maybe a check can be added to cmake to inform the user that a compiler with C++1x atomics is needed.

Build log:
---
Building CXX object CMakeFiles/spark.dir/swftypes.cpp.o
In file included from /var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.cpp:22:
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h:37:23: error: stdatomic.h: No such file or directory
In file included from /var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/tags.h:26,
                 from /var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/abc.h:29,
                 from /var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swf.cpp:26:
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h:37:23: error: stdatomic.h: No such file or directory
In file included from /var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.cpp:22:
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h:480: error: ISO C++ forbids declaration of 'atomic' with no type
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h:480: error: invalid use of '::'
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h:480: error: expected ';' before '<' token
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h: In member function 'void lightspark::ASObject::incRef()':
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h:506: error: 'ref_count' was not declared in this scope
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h: In member function 'void lightspark::ASObject::decRef()':
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h:512: error: 'ref_count' was not declared in this scope
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h:513: error: 'ref_count' was not declared in this scope
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h: In member function 'void lightspark::ASObject::fake_decRef()':
/var/tmp/portage/www-plugins/lightspark-0.4.2/work/lightspark-0.4.2/swftypes.h:531: error: 'ref_count' was not declared in this scope
---

Changed in gentoo:
status: Unknown → Confirmed

I've found no clean way to ask for GCC >= 4.4 in cmake, do you have any suggestions?

Changed in lightspark:
importance: Undecided → Medium
milestone: none → lightspark-0.4.3

I think checking for the existence of stdatomic.h rather than GCC 4.4 might be the way to go.

Current master checks for GCC>=4.4, as stdatomic.h is part of C++0x and provided since such GCC version.

The build system now reports that GCC>=4.4 is required. I'm closing the bug

Changed in lightspark:
status: New → Fix Released
status: Fix Released → Fix Committed
Changed in lightspark:
status: Fix Committed → Fix Released
Changed in gentoo:
status: Confirmed → Fix Released
Changed in gentoo:
importance: Unknown → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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