Opened 10 months ago

Last modified 9 months ago

#60655 assigned defect

flatbuffers: error: use of undeclared identifier 'asprintf_l'

Reported by: ryandesign (Ryan Schmidt) Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: mountainlion Cc:
Port: flatbuffers

Description

flatbuffers fails to build on Mountain Lion with this error:

In file included from /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/sstream:173:
In file included from /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/ostream:140:
/opt/local/libexec/llvm-9.0/bin/../include/c++/v1/locale:1571:20: error: use of undeclared identifier 'asprintf_l'
            __nc = __libcpp_asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, (int)__iob.precision(), __v);
                   ^
/opt/local/libexec/llvm-9.0/bin/../include/c++/v1/__bsd_locale_defaults.h:33:61: note: expanded from macro '__libcpp_asprintf_l'
#define __libcpp_asprintf_l(...)                            asprintf_l(__VA_ARGS__)
                                                            ^

this llvm bug report suggests defining _DARWIN_C_SOURCE is the solution.

Change History (1)

comment:1 Changed 9 months ago by kencu (Ken)

same thing happens now with cmake 60885.

I wonder why, after all these years, this starts showing up now in two ports... coincidence?

Note: See TracTickets for help on using tickets.