[MacPorts] #70341: g++ fails to compile when -libstd=libc++ is set
MacPorts
noreply at macports.org
Wed Jan 22 22:20:19 UTC 2025
#70341: g++ fails to compile when -libstd=libc++ is set
--------------------------------+--------------------
Reporter: mouse07410 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gcc12 gcc13 gcc14 |
--------------------------------+--------------------
Comment (by barracuda156):
Replying to [comment:25 mouse07410]:
> In general, I do constrain myself to building with Clang only. Usually
Xcode Clang, occasionally with Macports Clang. Xcode GCC has been nothing
for a long time, so I don't even check it now to see if it improved at
all.
>
> Thus, most if not all of the C++ libraries on my systems are libc++
compatible, not stdc++. So, for those thankfully rare cases that I need to
use GCC, it greatly improves usability and usefulness if it can produce
libc++ compatible binaries.
>
> Regarding Xcode having nothing to do with our libc++ support, here's
what the upstream got to say:
>
> The libc++ headers include some of the SDK headers. When updating XCode
you get new (more recent) SDK headers, which should (apparently) now
include declarations for quick_exit and friends.
>
> Re. inconsistencies - so far, after applying the relevant patches to the
header files, it's more or less smooth. Except for one weird problem ;-0
> that I'm having linking Crypto++ library:
> {{{
> Undefined symbols for architecture x86_64:
> "___cxa_call_terminate", referenced from:
> CryptoPP::LazyPutter::~LazyPutter() in asn.o
> CryptoPP::LazyPutter::~LazyPutter() in asn.o
> CryptoPP::DERSequenceEncoder::~DERSequenceEncoder() in asn.o
> non-virtual thunk to
CryptoPP::DERSequenceEncoder::~DERSequenceEncoder() in asn.o
> CryptoPP::DERSequenceEncoder::~DERSequenceEncoder() in asn.o
> non-virtual thunk to
CryptoPP::DERSequenceEncoder::~DERSequenceEncoder() in asn.o
> CryptoPP::BERSequenceDecoder::~BERSequenceDecoder() in asn.o
> ...
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> }}}
I got this error with `icu` now:
{{{
/opt/local/bin/g++-mp-14 -dynamiclib -dynamic -pipe -Os -stdlib=libc++
-arch ppc -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-
long -std=c++17 -fvisibility=hidden -Wl,-headerpad_max_install_names
-arch ppc -Wl,-compatibility_version -Wl,76 -Wl,-current_version
-Wl,76.1 -install_name /opt/local/lib/libicui18n.76.dylib -o
../lib/libicui18n.76.1.dylib alphaindex.o anytrans.o astro.o basictz.o
bocsu.o brktrans.o buddhcal.o calendar.o casetrn.o cecal.o chnsecal.o
choicfmt.o coleitr.o coll.o collation.o collationbuilder.o
collationcompare.o collationdata.o collationdatabuilder.o
collationdatareader.o collationdatawriter.o collationfastlatin.o
collationfastlatinbuilder.o collationfcd.o collationiterator.o
collationkeys.o collationroot.o collationrootelements.o
collationruleparser.o collationsets.o collationsettings.o
collationtailoring.o collationweights.o compactdecimalformat.o coptccal.o
cpdtrans.o csdetect.o csmatch.o csr2022.o csrecog.o csrmbcs.o csrsbcs.o
csrucode.o csrutf8.o curramt.o currfmt.o currpinf.o currunit.o dangical.o
datefmt.o dayperiodrules.o dcfmtsym.o decContext.o decNumber.o decimfmt.o
displayoptions.o double-conversion-bignum-dtoa.o double-conversion-
bignum.o double-conversion-cached-powers.o double-conversion-double-to-
string.o double-conversion-fast-dtoa.o double-conversion-string-to-
double.o double-conversion-strtod.o dtfmtsym.o dtitvfmt.o dtitvinf.o
dtptngen.o dtrule.o erarules.o esctrn.o ethpccal.o fmtable.o fmtable_cnv.o
format.o formatted_string_builder.o formattedval_iterimpl.o
formattedval_sbimpl.o formattedvalue.o fphdlimp.o fpositer.o funcrepl.o
gender.o gregocal.o gregoimp.o hebrwcal.o indiancal.o inputext.o
islamcal.o iso8601cal.o japancal.o listformatter.o measfmt.o measunit.o
measunit_extra.o measure.o msgfmt.o messageformat2.o
messageformat2_arguments.o messageformat2_checker.o
messageformat2_data_model.o messageformat2_errors.o
messageformat2_evaluation.o messageformat2_formatter.o
messageformat2_formattable.o messageformat2_function_registry.o
messageformat2_parser.o messageformat2_serializer.o name2uni.o nfrs.o
nfrule.o nfsubs.o nortrans.o nultrans.o number_affixutils.o
number_asformat.o number_capi.o number_compact.o number_currencysymbols.o
number_decimalquantity.o number_decimfmtprops.o number_fluent.o
number_formatimpl.o number_grouping.o number_integerwidth.o
number_longnames.o number_mapper.o number_modifiers.o number_multiplier.o
number_notation.o number_output.o number_padding.o
number_patternmodifier.o number_patternstring.o number_rounding.o
number_scientific.o number_simple.o number_skeletons.o
number_symbolswrapper.o number_usageprefs.o number_utils.o numfmt.o
numparse_affixes.o numparse_compositions.o numparse_currency.o
numparse_decimal.o numparse_impl.o numparse_parsednumber.o
numparse_scientific.o numparse_symbols.o numparse_validators.o
numrange_capi.o numrange_fluent.o numrange_impl.o numsys.o olsontz.o
persncal.o pluralranges.o plurfmt.o plurrule.o quant.o quantityformatter.o
rbnf.o rbt.o rbt_data.o rbt_pars.o rbt_rule.o rbt_set.o rbtz.o regexcmp.o
regeximp.o regexst.o regextxt.o region.o reldatefmt.o reldtfmt.o rematch.o
remtrans.o repattrn.o rulebasedcollator.o scientificnumberformatter.o
scriptset.o search.o selfmt.o sharedbreakiterator.o simpletz.o smpdtfmt.o
smpdtfst.o sortkey.o standardplural.o string_segment.o strmatch.o
strrepl.o stsearch.o taiwncal.o timezone.o titletrn.o tmunit.o tmutamt.o
tmutfmt.o tolowtrn.o toupptrn.o translit.o transreg.o tridpars.o tzfmt.o
tzgnames.o tznames.o tznames_impl.o tzrule.o tztrans.o ucal.o ucln_in.o
ucol.o ucol_res.o ucol_sit.o ucoleitr.o ucsdet.o udat.o
udateintervalformat.o udatpg.o ufieldpositer.o uitercollationiterator.o
ulistformatter.o ulocdata.o umsg.o unesctrn.o uni2name.o units_data.o
units_complexconverter.o units_converter.o units_router.o unum.o unumsys.o
upluralrules.o uregex.o uregexc.o uregion.o usearch.o uspoof.o
uspoof_build.o uspoof_conf.o uspoof_impl.o utf16collationiterator.o
utf8collationiterator.o utmscale.o utrans.o vtzone.o vzone.o windtfmt.o
winnmfmt.o wintzimpl.o zonemeta.o zrule.o ztrans.o -L../lib -licuuc
-L../stubdata -licudata -lpthread -lm
Undefined symbols for architecture ppc:
"___cxa_call_terminate", referenced from:
icu_76::message2::data_model::SelectorKeys::Builder::add(icu_76::message2::data_model::Key&&,
UErrorCode&) in messageformat2_data_model.o
icu_76::message2::MFDataModel::Builder::addVariant(icu_76::message2::data_model::SelectorKeys&&,
icu_76::message2::data_model::Pattern&&, UErrorCode&) in
messageformat2_data_model.o
icu_76::message2::data_model::Pattern::Builder::add(icu_76::UnicodeString&&,
UErrorCode&) in messageformat2_data_model.o
icu_76::message2::data_model::Pattern::Builder::add(icu_76::message2::data_model::Expression&&,
UErrorCode&) in messageformat2_data_model.o
icu_76::message2::MFDataModel::Builder::addSelector(icu_76::message2::data_model::Expression&&,
UErrorCode&) in messageformat2_data_model.o
icu_76::message2::data_model::Pattern::Builder::add(icu_76::message2::data_model::Markup&&,
UErrorCode&) in messageformat2_data_model.o
icu_76::message2::data_model::swap(icu_76::message2::data_model::PatternPart&,
icu_76::message2::data_model::PatternPart&) in messageformat2_data_model.o
...
ld: symbol(s) not found for architecture ppc
collect2: error: ld returned 1 exit status
gnumake[1]: *** [../lib/libicui18n.76.1.dylib] Error 1
}}}
--
Ticket URL: <https://trac.macports.org/ticket/70341#comment:28>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list