Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#59908 closed defect (fixed)

upc @5.2.0.1: error: no member named 'fancy_abort' in namespace 'std::__1'; did you mean simply 'fancy_abort'?

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: upc

Description

upc doesn't build on 10.13. I think the error is:

In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_upc/upc/work/upc-5.2.0.1/gcc/auto-profile.c:25:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/map:446:
/Library/Developer/CommandLineTools/usr/include/c++/v1/functional:1408:2: error: no member named 'fancy_abort' in namespace 'std::__1'; did you mean simply 'fancy_abort'?
        _VSTD::abort();
        ^~~~~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:441:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_upc/upc/work/upc-5.2.0.1/gcc/system.h:700:13: note: 'fancy_abort' declared here
extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
            ^

(It does build on 10.14.)

Change History (4)

comment:1 Changed 5 years ago by kencu (Ken)

This will probably be similar to the older gcc build failures we saw with gcc5, gcc4.7-9 a few years ago with a new xcode version that was subsequently fixed in a gcc backpatch for gcc5 at least.

e.g. this bug report <https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg543787.html>.

The problem is that <functional> is included (via <map>) after abort has been
defined as a macro to fancy_abort. And thus when the C++ standard headers try
to call std::abort, they end up calling std::fancy_abort, which of course
doesn't exist.

A simple fix is to include <map> in gcc/config.h before we mess with abort.
diff -pur a/gcc/system.h b/gcc/system.h
--- a/gcc/system.h	2015-01-05 13:33:28.000000000 +0100
+++ b/gcc/system.h	2017-09-03 18:28:15.000000000 +0200
@@ -216,6 +216,7 @@ extern int errno;
 
 #ifdef __cplusplus
 # include <algorithm>
+# include <map>
 # include <cstring>
 # include <utility>
 #endif
Last edited 5 years ago by kencu (Ken) (previous) (diff)

comment:2 Changed 5 years ago by tenomoto (Takeshi Enomoto)

I was wasting my time trying to install High Sierra on my old MacBook Pro, which did not boot. Finally I was able to set up High Sierra in Parallels, but it is slow. Anyway, I saw a report for FreeBSD, which suggest including <new>. This fix didn't work and I was wondering what to do. Yes, inclusion of <map> seems to work. Thanks for your help.

comment:3 Changed 5 years ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: assignedclosed

In 0b56bee81fe75958cb23dbcb603031d95f6c7a5a/macports-ports (master):

upc: fix build on High Sierra

Closes: #59908

comment:4 Changed 4 years ago by tenomoto (Takeshi Enomoto)

In 0b56bee81fe75958cb23dbcb603031d95f6c7a5a/macports-ports (dar, master, py38-reproject, revert-6945-rust-1.43.0, wireshark):

upc: fix build on High Sierra

Closes: #59908

Note: See TracTickets for help on using tickets.