| Summary: | graphics/osg: /usr/ports/graphics/osg/work/OpenSceneGraph-3.0.1/include/OpenThreads/Atomic:244:48: error: cannot initialize a parameter of type 'void *' with an lvalue of type 'const void *const' return __sync_bool_compare_and_swap(& | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | O. Hartmann <ohartmann> |
| Component: | Individual Port(s) | Assignee: | Dmitry Marakasov <amdmi3> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-ports-bugs->amdmi3 Over to maintainer (via the GNATS Auto Assign Tool) http://www.freebsd.org/cgi/query-pr.cgi?pr=167550 Date: Thu, 03 May 2012 08:35:58 +0200 State Changed From-To: open->open Appending misfiled followup ports/167552. Responsible Changed From-To: amdmi3->amdmi3 State Changed From-To: open->feedback Awaiting submitters feedback On 05/03/12 13:57, Dmitry Marakasov wrote: > * Oliver Hartmann (ohartman@zedat.fu-berlin.de) wrote: > >> ===> Building for osg-3.0.1 >> Scanning dependencies of target OpenThreads >> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThread.o >> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadBarrier.o >> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadCondition.o >> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadMutex.o >> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Version.o >> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Atomic.o >> In file included from /usr/ports/graphics/osg/work/OpenSceneGraph-3.0.1/src/OpenThreads/common/Atomic.cpp:14: >> /usr/ports/graphics/osg/work/OpenSceneGraph-3.0.1/include/OpenThreads/Atomic:244:48: 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); > > Could you please demostrate gcc error? This one looks like a clang > problem, as __sync_bool_compare_and_swap must take const void* as its > second argument. In this case it should not be fixed in osg. See below. In /etc/make.conf, I use this clause for the build: # graphics/osg .if ${.CURDIR:M/usr/ports/graphics/osg} USE_GCC= 4.6+ #CC= cc #CXX= c++ #CPP= cpp .endif This is due to the fact I use clang as the system's compiler and therefore the recommended settings for CC, CXX, CPP. This works so far on FreeBSD 10.0-CURRENT and did so on FreeBSD 9.0-STABLE. > > It builds fine here in 9-release with system gcc and 46, 48 from ports; > it builds fine in my tinderbox (7-stable, 8-stable), and it seems to > build fine on pointyhat. > It build here with gcc 4.6, gcc 4.7 as well as the legacy gcc 4.2.1 of the system on all FreeBSD 10.0-CUR boxes. It doesn't work on all FreeBSD 9.0-STABLE boxes (server and a notebook) without the patch. I guess this indicates that on my configuration, at least, the alternative gcc as described above doesn't work properly. using the clang patch makes things run well. [...] The build system is configured to install libraries to /usr/local/lib Your applications may not be able to find your installed libraries unless you: set your LD_LIBRARY_PATH (user specific) or update your ld.so configuration (system wide) -- Configuring done -- Generating done -- Build files have been written to: /usr/ports/graphics/osg/work/OpenSceneGraph-3.0.1 ===> Building for osg-3.0.1 Scanning dependencies of target OpenThreads [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThread.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadBarrier.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Version.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadCondition.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Atomic.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadMutex.o In file included from /usr/ports/graphics/osg/work/OpenSceneGraph-3.0.1/src/OpenThreads/common/Atomic.cpp:14: /usr/ports/graphics/osg/work/OpenSceneGraph-3.0.1/include/OpenThreads/Atomic:244:48: 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); ^~~~~~ 1 error generated. *** Error code 1 1 error *** Error code 2 1 error *** Error code 2 1 error *** Error code 1 Stop in /usr/ports/graphics/osg. *** Error code 1 Stop in /usr/ports/graphics/osg. ===>>> make failed for graphics/osg ===>>> Aborting update Terminated ===>>> You can restart from the point of failure with this command line: portmaster <flags> graphics/osg State Changed From-To: feedback->closed Clang problem. |
On FreeBSD 9.0-STABLE/amd64, built with CLANG, updating of graphics/osg fails the subsequent noticed error. This error also occur when trying compiling with CLANG, legacy gcc 4.2.1 (system) and GCC 4.6 and gcc 4.7. This error does not happen when compiling on FreeBSD 10.0-CURRENT/amd64. ===> Building for osg-3.0.1 Scanning dependencies of target OpenThreads [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThread.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadBarrier.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadCondition.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadMutex.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Version.o [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Atomic.o In file included from /usr/ports/graphics/osg/work/OpenSceneGraph-3.0.1/src/OpenThreads/common/Atomic.cpp:14: /usr/ports/graphics/osg/work/OpenSceneGraph-3.0.1/include/OpenThreads/Atomic:244:48: 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); ^~~~~~ 1 error generated. *** Error code 1 1 error *** Error code 2 1 error *** Error code 2 1 error *** Error code 1 Stop in /usr/ports/graphics/osg. How-To-Repeat: Try updating graphics/osg on FreeBSD 9.0-STABLE/amd64.