Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 429646 - dev-games/openscenegraph-3.0.1 with sys-devel/clang-3.1 - error: cannot initialize a parameter of type 'void *' with an lvalue of type 'const void *const' return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew);
Summary: dev-games/openscenegraph-3.0.1 with sys-devel/clang-3.1 - error: cannot initi...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Maciej Mrozowski
URL: http://lists.openscenegraph.org/piper...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-08-03 13:56 UTC by Michael Seifert
Modified: 2015-07-14 17:41 UTC (History)
1 user (show)

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


Attachments
Backport of an OpenSceneGraph patch to work with LLVM/Clang 3.1 (openscenegraph-3.0.1-clang.patch,611 bytes, patch)
2012-08-03 13:56 UTC, Michael Seifert
Details | Diff
Patch for the ebuild dev-games/openscenegraph-3.0.1.ebuild (openscenegraph-3.0.1-to-3.0.1-r1.patch,532 bytes, patch)
2012-08-03 13:58 UTC, Michael Seifert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Seifert 2012-08-03 13:56:24 UTC
Created attachment 320174 [details, diff]
Backport of an OpenSceneGraph patch to work with LLVM/Clang 3.1

It turns out that when using clang-3.1 to compile a minimal application which depends on openscenegraph-3.0.1, you get the following error message[1]:

error: cannot initialize a parameter of type 'void *' with an lvalue of
type 'const void *const'
    return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew);

This seems to be a clang bug[2]. This bug can be circumvented with a patch for openscenegraph suggested by Ulrich Hertlein[1] which went upstream.

The patch for the header file and for the ebuild is attached. Applying these two worked for me.

Kind Regards,
Michael Seifert

[1] http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/2012-March/009206.html
[2] http://llvm.org/bugs/show_bug.cgi?id=11280
Comment 1 Michael Seifert 2012-08-03 13:58:31 UTC
Created attachment 320176 [details, diff]
Patch for the ebuild dev-games/openscenegraph-3.0.1.ebuild
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-04 00:28:52 UTC
Comment on attachment 320176 [details, diff]
Patch for the ebuild dev-games/openscenegraph-3.0.1.ebuild

${PN}-${PV} should be simply written as ${P}.
Comment 3 Maciej Mrozowski gentoo-dev 2015-07-14 17:41:17 UTC
Already in 3.2.1