Opened 6 years ago
Closed 6 years ago
#56918 closed defect (fixed)
gnucash @3.2 : error: no matching constructor for initialization of 'Path' (aka 'vector<std::string>')
Reported by: | kencu (Ken) | Owned by: | drkp (Dan Ports) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | lion | Cc: | |
Port: | gnucash |
Description
[ 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.
Attachments (1)
Change History (4)
comment:1 Changed 6 years ago by kencu (Ken)
Changed 6 years ago by kencu (Ken)
Attachment: | gnucash-10.7.5-clang-5.0.fail.log added |
---|
failed attemp to build gnucash 3.2 using clang-5.0 on 10.7.5
comment:2 Changed 6 years ago by kencu (Ken)
Finally, and connected to this, the Portfile doesn't work quite right when the cxx11 1.1 PG
sets the cxx_stdlib
to macports-libstdc++
.
A few months ago, we moved webkit-gtk3
to the cxx11 1.1 PG
and it builds on all supported systems now <http://packages.macports.org/webkit-gtk3/>. So the test block forcing webkit-gtk3-2.0
on certain older systems can now be deleted, which in turn removes the macports-libstdc++
issue. (We may have to do the same with a few other ports that force webkit-gtk3-2.0
on older systems as well.)
With these small fixes, and the python fix currently in as a PR, gnucash
and gnucash-devel
build through on 10.7.5
at least:
$ port -v installed gnucash-devel The following ports are currently installed: gnucash-devel @3.2_0 (active) platform='darwin 11' archs='x86_64' date='2018-08-05T19:04:54+0200'
$ port -v installed gnucash The following ports are currently installed: gnucash @3.2_0 (active) platform='darwin 11' archs='x86_64' date='2018-08-06T07:35:47+0200'
comment:3 Changed 6 years ago by ken-cunningham-webuse
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The same error happens if you try to build
gnucash
withclang-5.0
(but not using thecxx11 1.1 PG
). Log attached.So it looks like it will need the portgroup.
gnucash-devel
also builds with thecxx11 1.1 PG
.