Opened 18 months ago

Last modified 10 months ago

#66234 assigned defect

taglib fails to build with gcc-4.2, needs cxx_standard 2011

Reported by: barracuda156 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: powerpc, leopard, snowleopard Cc:
Port: taglib

Description

Universal build on Leopard fails almost immediately with:

g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make[2]: *** [taglib/CMakeFiles/tag.dir/mpeg/mpegfile.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Single-arch build fails later, with numerous errors:

In file included from /opt/local/include/cppunit/TestAssert.h:8,
                 from /opt/local/include/cppunit/TestCase.h:6,
                 from /opt/local/include/cppunit/TestCaller.h:5,
                 from /opt/local/include/cppunit/extensions/HelperMacros.h:9,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_taglib/taglib/work/taglib-1.13/tests/test_map.cpp:28:
/opt/local/include/cppunit/tools/StringHelper.h:7:23: error: type_traits: No such file or directory
In file included from /opt/local/include/cppunit/TestAssert.h:8,
                 from /opt/local/include/cppunit/TestCase.h:6,
                 from /opt/local/include/cppunit/TestCaller.h:5,
                 from /opt/local/include/cppunit/extensions/HelperMacros.h:9,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_taglib/taglib/work/taglib-1.13/tests/test_list.cpp:27:
/opt/local/include/cppunit/tools/StringHelper.h:7:23: error: type_traits: No such file or directory
In file included from /opt/local/include/cppunit/TestAssert.h:6,
                 from /opt/local/include/cppunit/TestCase.h:6,
                 from /opt/local/include/cppunit/TestCaller.h:5,
                 from /opt/local/include/cppunit/extensions/HelperMacros.h:9,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_taglib/taglib/work/taglib-1.13/tests/test_list.cpp:27:
/opt/local/include/cppunit/Asserter.h:50: error: expected unqualified-id before ‘[’ token
/opt/local/include/cppunit/Asserter.h:56: error: expected unqualified-id before ‘[’ token
/opt/local/include/cppunit/Asserter.h:162: error: expected unqualified-id before ‘[’ token
In file included from /opt/local/include/cppunit/TestAssert.h:8,
                 from /opt/local/include/cppunit/TestCase.h:6,
                 from /opt/local/include/cppunit/TestCaller.h:5,
                 from /opt/local/include/cppunit/extensions/HelperMacros.h:9,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_taglib/taglib/work/taglib-1.13/tests/test_list.cpp:27:
/opt/local/include/cppunit/tools/StringHelper.h:22: error: ‘enable_if’ in namespace ‘std’ does not name a type
/opt/local/include/cppunit/tools/StringHelper.h:22: error: expected unqualified-id before ‘<’ token
/opt/local/include/cppunit/tools/StringHelper.h:31: error: ‘enable_if’ in namespace ‘std’ does not name a type
/opt/local/include/cppunit/tools/StringHelper.h:31: error: expected unqualified-id before ‘<’ token
/opt/local/include/cppunit/tools/StringHelper.h:39: error: ‘toString’ is not a template function
/opt/local/include/cppunit/tools/StringHelper.h:44: error: ‘toString’ is not a template function

Attachments (2)

taglib.log (616.7 KB) - added by barracuda156 18 months ago.
taglib_universal.log (40.8 KB) - added by barracuda156 18 months ago.

Download all attachments as: .zip

Change History (5)

Changed 18 months ago by barracuda156

Attachment: taglib.log added

Changed 18 months ago by barracuda156

Attachment: taglib_universal.log added

comment:1 Changed 18 months ago by barracuda156

Looks like it uses cppunit without tests variant being chosen.

Adding compiler.cxx_standard 2011 for a general case fixes the build. Then, to fix universal we also need muniversal 1.0, or if it breaks Clang builds, then:

platform darwin powerpc {
    PortGroup muniversal 1.0

}

After these two fixes made, it builds fine:

36-43:~ svacchanda$ port -v installed taglib
The following ports are currently installed:
  taglib @1.13_0+universal (active) requested_variants='+universal' platform='darwin 9' archs='ppc ppc64' date='2022-11-12T11:24:44+0800'
Last edited 18 months ago by barracuda156 (previous) (diff)

comment:2 Changed 18 months ago by barracuda156

Summary: taglib fails to build with gcc-4.2taglib fails to build with gcc-4.2, needs cxx_standard 2011

comment:3 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

In 739504a654df49d29b15165c76fce62c67d27e2c/macports-ports (master):

taglib: Don't build tests if not requested

See: #66234

Note: See TracTickets for help on using tickets.