[MacPorts] #56918: gnucash @3.2 : error: no matching constructor for initialization of 'Path' (aka 'vector<std::string>')

MacPorts noreply at macports.org
Sun Aug 5 16:40:23 UTC 2018


#56918: gnucash @3.2 : error: no matching constructor for initialization of 'Path'
(aka 'vector<std::string>')
--------------------+----------------------
 Reporter:  kencu   |      Owner:  drkp
     Type:  defect  |     Status:  assigned
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:  lion    |       Port:  gnucash
--------------------+----------------------
 {{{
 [ 22%] Building CXX object libgnucash/engine/test-core/CMakeFiles/gncmod-
 test-engine.dir/test-engine-stuff.cpp.o
 cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/build/libgnucash/engine
 /test-core && /usr/bin/clang++  -DHAVE_CONFIG_H -DHAVE_GUILE22
 -I/opt/local/include -I/opt/local/share/cmake/Modules/include
 -I/opt/local/include/glib-2.0
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/glib-2.0/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-3.2/libgnucash
 /gnc-module
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/build/common
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-3.2/common
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-3.2/libgnucash/engine
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-3.2/common
 /test-core  -Werror -Wall -Wmissing-declarations -Wno-unused -Wno-
 error=parentheses -std=gnu++11 -Wno-typedef-redefinition -Wmissing-
 prototypes -pipe -Os -DNDEBUG -isystem/opt/local/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-3.2
 -stdlib=libstdc++ -arch x86_64 -mmacosx-version-min=10.7   -o CMakeFiles
 /gncmod-test-engine.dir/test-engine-stuff.cpp.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-3.2/libgnucash/engine
 /test-core/test-engine-stuff.cpp
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-3.2/libgnucash/engine
 /test-core/test-engine-stuff.cpp:393:23: error: no matching constructor
 for initialization of 'Path' (aka 'vector<std::string>')
         ret->set_path({key}, val);
                       ^~~~~
 /usr/include/c++/4.2.1/bits/stl_vector.h:213:7: note: candidate
 constructor not viable: no known conversion from 'gchar *' (aka 'char *')
 to 'size_type' (aka 'unsigned long') for 1st argument; dereference the
 argument with *
       vector(size_type __n, const value_type& __value = value_type(),
       ^
 /usr/include/c++/4.2.1/bits/stl_vector.h:201:7: note: candidate
 constructor not viable: no known conversion from 'gchar *' (aka 'char *')
 to 'const allocator_type' (aka 'const
 std::allocator<std::basic_string<char> >') for 1st argument
       vector(const allocator_type& __a = allocator_type())
       ^
 /usr/include/c++/4.2.1/bits/stl_vector.h:231:7: note: candidate
 constructor not viable: no known conversion from 'gchar *' (aka 'char *')
 to 'const std::vector<std::basic_string<char>,
 std::allocator<std::basic_string<char> > > &' for 1st argument
       vector(const vector& __x)
       ^
 /usr/include/c++/4.2.1/bits/stl_vector.h:255:9: note: candidate
 constructor template not viable: requires at least 2 arguments, but 1 was
 provided
         vector(_InputIterator __first, _InputIterator __last,
         ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-3.2/libgnucash/engine
 /kvp-frame.hpp:171:29: note: passing argument to parameter 'path' here
     KvpValue* set_path(Path path, KvpValue* newvalue) noexcept;
                             ^
 1 error generated.
 make[2]: *** [libgnucash/engine/test-core/CMakeFiles/gncmod-test-
 engine.dir/test-engine-stuff.cpp.o] Error 1
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/build'
 make[1]: *** [libgnucash/engine/test-core/CMakeFiles/gncmod-test-
 engine.dir/all] Error 2
 make[1]: *** Waiting for unfinished jobs....
 }}}

 This looks like a too-old compiler error, and sure enough adding
 {{{
 PortGroup cxx11 1.1
 }}}
 and rejigging some stuff with this block:
 {{{
 platform darwin {
 #   if {${configure.cxx_stdlib} eq "libstdc++"} {
        depends_lib-delete path:${prefix}/libpkgconfig/webkitgtk-3.0.pc
 :webkit-gtk3
        depends_lib-append path:${prefix}/libpkgconfig/webkitgtk-3.0.pc
 :webkit-gtk3-2.0
 #    }
 }
 }}}
 fixes the build:
 {{{
 $ port -v installed gnucash
 The following ports are currently installed:
   gnucash @3.2_0 (active) platform='darwin 11' archs='x86_64'
 date='2018-08-05T18:31:19+0200'
 }}}
 I'll do some more testing and try gnucash-devel, then put together some
 kind of a PR that fixes this up.

-- 
Ticket URL: <https://trac.macports.org/ticket/56918>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list