Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#37184 closed defect (fixed)

digikam @2.9.0_0 Build error

Reported by: legendre17@… Owned by: jgosmann (Jan Gosmann)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: raimue (Rainer Müller)
Port: digikam

Description

Digikam 2.9.0 no longer builds after newest OpenCV update. The log shows some C++ compilation errors related to the CV_XADD macro of OpenCV; compilation stops after too many errors are encountered. Here's a sample of the errors that are generated:

:info:build [ 44%] Building CXX object extra/libkface/libkface/CMakeFiles/kface.dir/database.cpp.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/build/extra/libkface/libkface && /usr/bin/clang++   -DMAKE_KFACE_LIB -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=128 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DKDE_DEFAULT_DEBUG_AREA=51005 -pipe -O2 -arch x86_64  -fno-common -O3 -DNDEBUG -DQT_NO_DEBUG -arch x86_64 -fPIC -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/build/extra/libkface/libkface -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/digikam-2.9.0/extra/libkface/libkface -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/digikam-2.9.0/extra/libkface -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/build/extra/libkface -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/build/extra/libkface/libface -I/opt/local/include -I/opt/local/include/KDE -I/opt/local/include/phonon -I/opt/local/include/QtXmlPatterns -I/opt/local/include/QtXml -I/opt/local/include/QtWebKit -I/opt/local/include/QtUiTools -I/opt/local/include/QtTest -I/opt/local/include/QtSvg -I/opt/local/include/QtSql -I/opt/local/include/QtScriptTools -I/opt/local/include/QtScript -I/opt/local/include/QtOpenGL -I/opt/local/include/QtNetwork -I/opt/local/include/QtMultimedia -I/opt/local/include/QtHelp -I/opt/local/include/QtDesigner -I/opt/local/include/QtDeclarative -I/opt/local/include/QtDBus -I/opt/local/include/Qt3Support -I/opt/local/include/QtGui -I/opt/local/include/QtCore -I/opt/local/share/qt4/mkspecs/default -I/opt/local/include/opencv    -D__APPLE_KDE__  -o CMakeFiles/kface.dir/database.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/digikam-2.9.0/extra/libkface/libkface/database.cpp
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/digikam-2.9.0/extra/libkface/libkface/database.cpp:46:
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/digikam-2.9.0/extra/libkface/libkface/libopencv.h:38:
:info:build In file included from /opt/local/include/opencv2/opencv.hpp:47:
:info:build In file included from /opt/local/include/opencv2/core/core.hpp:4735:
:info:build /opt/local/include/opencv2/core/operations.hpp:2313:17: error: expected '(' for function-style cast or type construction
:info:build                 CV_XADD(d.hdr.refcount, 1);
:info:build                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/opencv2/core/operations.hpp:63:69: note: instantiated from:
:info:build         #define CV_XADD(addr, delta) __atomic_fetch_add((_Atomic(int)*)(addr), (delta), 5)
:info:build                                                                  ~~~^
:info:build /opt/local/include/opencv2/core/operations.hpp:2313:17: error: expected expression
:info:build                 CV_XADD(d.hdr.refcount, 1);
:info:build                 ^
:info:build /opt/local/include/opencv2/core/operations.hpp:63:71: note: instantiated from:
:info:build         #define CV_XADD(addr, delta) __atomic_fetch_add((_Atomic(int)*)(addr), (delta), 5)
:info:build                                                                       ^
:info:build /opt/local/include/opencv2/core/operations.hpp:2326:17: error: expected '(' for function-style cast or type construction
:info:build                 CV_XADD(d.hdr.refcount, 1);
:info:build                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/opencv2/core/operations.hpp:63:69: note: instantiated from:
:info:build         #define CV_XADD(addr, delta) __atomic_fetch_add((_Atomic(int)*)(addr), (delta), 5)
:info:build                                                                  ~~~^

[...]

:info:build /opt/local/include/opencv2/core/operations.hpp:2686:9: error: expected expression
:info:build         CV_XADD(refcount, 1);
:info:build         ^
:info:build /opt/local/include/opencv2/core/operations.hpp:63:71: note: instantiated from:
:info:build         #define CV_XADD(addr, delta) __atomic_fetch_add((_Atomic(int)*)(addr), (delta), 5)
:info:build                                                                       ^
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/digikam-2.9.0/extra/libkface/libkface/database.cpp:46:
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_digikam/digikam/work/digikam-2.9.0/extra/libkface/libkface/libopencv.h:38:
:info:build In file included from /opt/local/include/opencv2/opencv.hpp:47:
:info:build In file included from /opt/local/include/opencv2/core/core.hpp:4736:
:info:build /opt/local/include/opencv2/core/mat.hpp:117:9: error: expected '(' for function-style cast or type construction
:info:build         CV_XADD(refcount, 1);
:info:build         ^~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/opencv2/core/operations.hpp:63:69: note: instantiated from:
:info:build         #define CV_XADD(addr, delta) __atomic_fetch_add((_Atomic(int)*)(addr), (delta), 5)
:info:build                                                                  ~~~^
:info:build fatal error: too many errors emitted, stopping now [-ferror-limit=]

Attachments (2)

digikam_main.log.gz (163.8 KB) - added by legendre17@… 12 years ago.
Log file for digikam build
Portfile-digikam.diff (909 bytes) - added by jgosmann (Jan Gosmann) 12 years ago.
Patch to fix build of digikam with new opencv

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by legendre17@…

Attachment: digikam_main.log.gz added

Log file for digikam build

comment:1 Changed 12 years ago by legendre17@…

I probably should've mentioned this: this happens on a late 2010 13-inch MacBook Air, running Mac OS X 10.7.5. Xcode version: 4.5.2.

comment:2 Changed 12 years ago by mf2k (Frank Schima)

Keywords: digikam opencv removed
Owner: changed from macports-tickets@… to jan@…
Port: digikam added

In the future, please fill in the Port field and Cc the port maintainer(s).

Changed 12 years ago by jgosmann (Jan Gosmann)

Attachment: Portfile-digikam.diff added

Patch to fix build of digikam with new opencv

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Could you explain the blacklisting of the compilers? Blacklisting gcc-4.0 means the port probably can't build on Tiger anymore. Blacklisting clang should usually not be done; if it is necessary for now, add a link to the relevant upstream bug report so that we can track the problem and re-enable clang once digikam works with it.

comment:4 Changed 12 years ago by jgosmann (Jan Gosmann)

Both compilers are also blacklisted for opencv on which digikam depends. clang stumbles over the CV_XADD macro in the opencv header files (see the log of the original bug report). At the moment I cannot test gcc-4.0 because I have no g++ 4.0 installed and cannot do so easily (the apple-gcc40 port only installs only gcc).

comment:5 Changed 12 years ago by raimue (Rainer Müller)

In this case add at least an explanation that clang failed on the CV_XADD macro and add a reference to this ticket. This will make it easier to verify the correct compilation with clang later.

comment:6 Changed 12 years ago by raimue (Rainer Müller)

Cc: raimue@… added
Resolution: fixed
Status: newclosed

Committed in r101176, with modifications:

  • Added a note explaining blacklisting of compilers and a reference to this ticket
  • Removed use_parallel_build yes since that is the default

comment:7 Changed 12 years ago by jgosmann (Jan Gosmann)

Thank you very much!

The last week I was traveling and could not make those changes myself or respond.

Note: See TracTickets for help on using tickets.