Opened 4 years ago
Closed 3 years ago
#60927 closed defect (fixed)
inkscape 0.92.5_2 +x11: error: no member named 'min' in namespace 'std::__1'
Reported by: | joel-coffman (Joel Coffman) | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.3 |
Keywords: | Cc: | ||
Port: | inkscape |
Description
Inkscape fails to install on macOS Catalina. Numerous errors in the build log, such as the following:
:info:build /usr/bin/clang++ -DHAVE_CAIRO_PDF=1 -DHAVE_CONFIG_H -DHAVE_POTRACE -DHAVE_TR1_UNORDERED_SET -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DORBIT2=1 -DWITH_CSSBLEND -DWITH_CSSCOMPOSITE -DWITH_MESH -DWITH_SVG2 -D_FORTIFY_SOURCE=2 -D_REENTRANT -Isrc/libvpsc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_inkscape/inkscape/work/inkscape-0.92.5/src/libvpsc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_inkscape/inkscape/work/inkscape-0.92.5 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_inkscape/inkscape/work/inkscape-0.92.5/src -Iinclude -isystem /opt/local/include/pango-1.0 -isystem /opt/local/include/cairo -isystem /opt/local/include/pixman-1 -isystem /opt/local/include/harfbuzz -isystem /opt/local/include/fribidi -isystem /opt/local/include/ossp -isystem /opt/local/include/freetype2 -isystem /opt/local/include/libpng16 -isystem /opt/local/include/glib-2.0 -isystem /opt/local/lib/glib-2.0/include -isystem /opt/local/include -isystem /opt/local/include/gc -isystem /opt/local/include/poppler -isystem /opt/local/include/libwpg-0.3 -isystem /opt/local/include/librevenge-0.0 -isystem /opt/local/include/libvisio-0.1 -isystem /opt/local/include/libcdr-0.1 -isystem /opt/local/include/dbus-1.0 -isystem /opt/local/lib/dbus-1.0/include -isystem src/extension/dbus -isystem /opt/local/include/gtkmm-2.4 -isystem /opt/local/lib/gtkmm-2.4/include -isystem /opt/local/include/atkmm-1.6 -isystem /opt/local/include/gtk-unix-print-2.0 -isystem /opt/local/include/gtk-2.0 -isystem /opt/local/include/gdkmm-2.4 -isystem /opt/local/lib/gdkmm-2.4/include -isystem /opt/local/include/giomm-2.4 -isystem /opt/local/lib/giomm-2.4/include -isystem /opt/local/include/pangomm-1.4 -isystem /opt/local/lib/pangomm-1.4/include -isystem /opt/local/include/glibmm-2.4 -isystem /opt/local/lib/glibmm-2.4/include -isystem /opt/local/include/cairomm-1.0 -isystem /opt/local/lib/cairomm-1.0/include -isystem /opt/local/include/sigc++-2.0 -isystem /opt/local/lib/sigc++-2.0/include -isystem /opt/local/lib/gtk-2.0/include -isystem /opt/local/include/atk-1.0 -isystem /opt/local/include/gio-unix-2.0 -isystem /opt/local/include/gdk-pixbuf-2.0 -isystem /opt/local/include/gtkspell-2.0 -isystem /opt/local/include/libxml2 -isystem /opt/local/include/ImageMagick-6 -DNDEBUG -D_REENTRANT -I/opt/local/include -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -pipe -std=c++11 -stdlib=libc++ -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.15 -UWITH_LPETOOL -ULPE_ENABLE_TEST_EFFECTS -fPIC -MD -MT src/libvpsc/CMakeFiles/vpsc_LIB.dir/block.cpp.o -MF src/libvpsc/CMakeFiles/vpsc_LIB.dir/block.cpp.o.d -o src/libvpsc/CMakeFiles/vpsc_LIB.dir/block.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_inkscape/inkscape/work/inkscape-0.92.5/src/libvpsc/block.cpp :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_inkscape/inkscape/work/inkscape-0.92.5/src/libvpsc/block.cpp:10: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_inkscape/inkscape/work/inkscape-0.92.5/src/libvpsc/pairingheap/PairingHeap.h:15: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:215: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:14: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:504: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string_view:175: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__string:57: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:644: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:512: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_inkscape/inkscape/work/inkscape-0.92.5/src/libvpsc/Block.h:13: :info:build In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/vector:274: :info:build /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__bit_reference:172:38: error: no member named 'min' in namespace 'std::__1' :info:build __storage_type __dn = _VSTD::min(__clz_f, __n); :info:build ~~~~~~~^
The message error: no member named 'min' in namespace
appears more than 50 times in the build log.
Attachments (2)
Change History (20)
Changed 4 years ago by joel-coffman (Joel Coffman)
Attachment: | main.log.gz added |
---|
comment:1 Changed 4 years ago by kencu (Ken)
comment:2 Changed 4 years ago by kencu (Ken)
In the portfile, we're forcing it to -std=c++11
:
platform darwin { if {[string match "*clang*" ${configure.compiler}]} { if {${configure.cxx_stdlib} eq "libstdc++"} { configure.cxxflags-append -std=c++98 } else { configure.cxxflags-append -std=c++11 } } }
comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | dbevans removed |
---|---|
Owner: | set to dbevans |
Status: | new → assigned |
Summary: | inkscape 0.92.5_2 +x11: build failure → inkscape 0.92.5_2 +x11: error: no member named 'min' in namespace 'std::__1' |
comment:4 Changed 4 years ago by joel-coffman (Joel Coffman)
Is there a way to change the standard from the command line (e.g., passing -std=c++14
as a command line option), or does the portfile take precedence?
comment:5 Changed 4 years ago by kencu (Ken)
you'd have to change it in the Portfle to test it out. It's super-easy to do that. I use bbedit, which has a free version.
bbedit `port file inkscape`
change -std=c++11
to -std=c++14
and then try your build again.
If it still fails, no harm done. Do this:
sudo port clean inkscape sudo port selfupdate
and your portfiles are all back to stock again -- your edits are removed with each selfupdate.
comment:6 Changed 4 years ago by joel-coffman (Joel Coffman)
Thanks for the assistance, but unfortunately that didn't work.
Looks like the code that was originally referenced was removed by 97e8bff/macports-ports. The explicit dependency on c++11 was removed in e9190ff/macports-ports if I'm reading the portfile correctly.
comment:7 Changed 4 years ago by kencu (Ken)
My bad. Sorry.
Just for interest, I did run a build yesterday on the 10.6.8 system I'm sitting in front of:
$ port -v installed inkscape The following ports are currently installed: inkscape @0.92.5_2+x11 (active) platform='darwin 10' archs='x86_64' date='2020-07-30T20:51:49-0700'
and that went smoothly. So it will build... and it did build on the Catalina buildbot recently as well <https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/33964/steps/install-port/logs/stdio>.
Changed 4 years ago by d7gonzo (Ryan E. Johnson)
Attachment: | main.log.2.gz added |
---|
Additional user log file with same error.
comment:8 Changed 4 years ago by d7gonzo (Ryan E. Johnson)
I was unable to compile with the same error. Additional log file attached.
comment:9 Changed 4 years ago by joel-coffman (Joel Coffman)
This problem disappeared for me after reinstalling the Xcode Command Line Tools. Unfortunately, now there's a different error related to iconv (#60956).
comment:10 Changed 4 years ago by BradWardPS
I'm having the same problem. I'm new to MacPorts and am inexperienced in its use. I'm asking for a simple way to build Inkscape in MacPorts in plain English that will give me my Inkscape back. Anyone?
comment:11 Changed 4 years ago by kencu (Ken)
Hi Brad,
Are you also having an error that says error: no member named 'min' in namespace 'std::__1'
? If so, Joel says it went away after he reinstalled the Xcode Command Line Tools. If you do try that and it still fails to install, then please give me the result of this command:
$ ls -la /Library/Developer/CommandLineTools/SDKs
All the best,
Ken
comment:12 Changed 4 years ago by BradWardPS
Yes, that's one of many error messages I get on the notice the install failed. I'd attach my log, but I don't have that capability here for some reason. I reinstalled the CLT yesterday hoping that would remedy the problem, but it failed again. Using your command, I get zsh: la not found
.
comment:13 Changed 4 years ago by kencu (Ken)
Oh dear, if that is so, and you get that result from running ls -la
then something on your system is seriously messed up.
Here's me on Catalina right now :
% uname -a Darwin MacBook-Pro.local 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64 % ls -la /Library/Developer/CommandLineTools/SDKs total 0 drwxr-xr-x 5 root wheel 160 7 Jun 18:27 . drwxr-xr-x 5 root wheel 160 2 May 08:30 .. lrwxr-xr-x 1 root wheel 15 7 Jun 18:26 MacOSX.sdk -> MacOSX10.15.sdk drwxr-xr-x 7 root wheel 224 7 Jun 18:26 MacOSX10.14.sdk drwxr-xr-x 8 root wheel 256 7 Jun 18:27 MacOSX10.15.sdk
comment:14 Changed 4 years ago by BradWardPS
Oddly, I got the results you did when I tried it a second time. Go figure.
comment:15 Changed 4 years ago by neilt (Neil Tiffin)
I had the same problem as the OP. Reinstalling the command line tools worked for me.
The only difference in my system between the time I updated to the new version 0.92.5_3 and the previous 0.92.5_2 was the installation of Xcode 12 Beta 4. I was not using Xcode 12 Beta 4 for command line tools, but they were recently installed.
comment:16 Changed 4 years ago by murrayE
I'm getting the same errors reported in the OP when trying to upgrade to inkscape-0.92.5_3+x11. I have:
ls -la /Library/Developer/CommandLineTools/SDKs total 0 drwxr-xr-x 6 root wheel 192 Aug 2 10:17 . drwxr-xr-x@ 5 root admin 160 Nov 4 2019 .. lrwxr-xr-x 1 root wheel 14 Aug 2 10:16 MacOSX.sdk -> MacOSX11.0.sdk drwxr-xr-x 7 root wheel 224 Nov 12 2019 MacOSX10.14.sdk drwxr-xr-x 8 root wheel 256 Aug 2 10:17 MacOSX10.15.sdk drwxr-xr-x 7 root wheel 224 Jul 17 06:25 MacOSX11.0.sdk
comment:17 Changed 3 years ago by Christopher Nielsen <mascguy@…>
comment:18 Changed 3 years ago by evanmiller (Evan Miller)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I'm not sure exactly why, but it might need
-std=c++14
according to <https://en.cppreference.com/w/cpp/algorithm/min>