Opened 7 years ago

Closed 7 years ago

#53072 closed defect (fixed)

chromaprint @1.4.0: default build fails on 10.8 and earlier due to inclusion of C++11 header <cstdint>

Reported by: dbevans (David B. Evans) Owned by: kurthindenburg (Kurt Hindenburg)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: chromaprint

Description

Build on 10.8 fails as follows (using default libstdc++)

:info:build [ 50%] Building CXX object src/CMakeFiles/chromaprint_objs.dir/image_builder.cpp.o
:info:build cd /opt/local/var/macports/build/_Volumes_MiniHD_opt_github.com_macports_macports-ports_audio_chromaprint/chromaprint/work/build/src && /usr/bin/clang++   -DHAVE_CONFIG_H -D_SCL_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/opt/local/var/macports/build/_Volumes_MiniHD_opt_github.com_macports_macports-ports_audio_chromaprint/chromaprint/work/build -I/opt/local/var/macports/build/_Volumes_MiniHD_opt_github.com_macports_macports-ports_audio_chromaprint/chromaprint/work/chromaprint-1.4/src -I/opt/local/include  -pipe -Os -stdlib=libstdc++ -std=c++11 -DNDEBUG -arch x86_64 -mmacosx-version-min=10.8 -fPIC   -o CMakeFiles/chromaprint_objs.dir/image_builder.cpp.o -c /opt/local/var/macports/build/_Volumes_MiniHD_opt_github.com_macports_macports-ports_audio_chromaprint/chromaprint/work/chromaprint-1.4/src/image_builder.cpp
:info:build In file included from /opt/local/var/macports/build/_Volumes_MiniHD_opt_github.com_macports_macports-ports_audio_chromaprint/chromaprint/work/chromaprint-1.4/src/fingerprinter.cpp:9:
:info:build In file included from /opt/local/var/macports/build/_Volumes_MiniHD_opt_github.com_macports_macports-ports_audio_chromaprint/chromaprint/work/chromaprint-1.4/src/fft.h:13:
:info:build /opt/local/var/macports/build/_Volumes_MiniHD_opt_github.com_macports_macports-ports_audio_chromaprint/chromaprint/work/chromaprint-1.4/src/audio/audio_slicer.h:8:10: fatal error: 'cstdint' file not found
:info:build #include <cstdint>
:info:build          ^
:info:build 1 error generated.

Because of the inclusion of this C++11 header libc++ is required instead and, in fact, -std=c++11 is declared as a build argument.

Suggest using PortGroup cxx11 to clarify this issue and to point to the solution on the earlier platforms.

Attachments (1)

main.log (100.4 KB) - added by dbevans (David B. Evans) 7 years ago.
Log showing build failure on 10.8 and earlier

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by dbevans (David B. Evans)

Attachment: main.log added

Log showing build failure on 10.8 and earlier

comment:1 Changed 7 years ago by dbevans (David B. Evans)

In 7456389e/macports-ports:

gstreamer1-gst-plugins-bad: disable chromaprint plugin if cxx_stdlib is libstdc++

chromaprint 1.4+ build requires libc++.
See: #53072

comment:2 Changed 7 years ago by dbevans (David B. Evans)

In 3683ed1/macports-ports:

gstreamer1-gst-plugins-bad: disable chromaprint plugin if cxx_stdlib is libstdc++

chromaprint 1.4+ build requires libc++.
See: #53072

comment:3 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

Thanks, is the only thing I need to do is add 'PortGroup cxx11 1.0' ? I don't know how to test this w/o committing and looking at the buildbot.

comment:4 in reply to:  3 Changed 7 years ago by dbevans (David B. Evans)

Replying to kurthindenburg:

Thanks, is the only thing I need to do is add 'PortGroup cxx11 1.0' ? I don't know how to test this w/o committing and looking at the buildbot.

Yes. Build will still fail where the C++ runtime is libstdc++ but the port group provides a better error message with a pointer to the instructions for installing LibcxxOnOlderSystems.

comment:5 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

In a39c0434/macports-ports:

chromaprint: add PortGroup cxx11

For better messages when the build fails
see #53072

comment:6 Changed 7 years ago by Ken <kencu@…>

Resolution: fixed
Status: newclosed

In c583c9c15db64ad66df0ef7749877527eee7f07b/macports-ports:

chromaprint: change to cxx11 1.1 PortGroup

fixes build on older systems
closes: #53072

Note: See TracTickets for help on using tickets.