Opened 2 months ago

Last modified 7 hours ago

#61041 new defect

icu @67.1_2: ld: duplicate symbol icu_67::number::NumberFormatterSettings<icu_67::number::UnlocalizedNumberFormatter>::copyErrorTo(UErrorCode&) const in number_skeletons.o and number_fluent.o

Reported by: kencu (Ken) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: tiger leopard Cc:
Port: icu

Description (last modified by kencu (Ken))

Tiger and Leopard PPC, building with gcc6 or gcc7:

ld: duplicate symbol icu_67::number::NumberFormatterSettings<icu_67::number::UnlocalizedNumberFormatter>::copyErrorTo(UErrorCode&) const in number_skeletons.o and number_fluent.o
collect2: error: ld returned 1 exit status
gnumake[1]: *** [../lib/libicui18n.67.1.dylib] Error 1

Attachments (2)

icu-tiger-fail.log (404.2 KB) - added by kencu (Ken) 2 months ago.
icu-gcc7-x86_64.log (728.3 KB) - added by kencu (Ken) 7 hours ago.

Download all attachments as: .zip

Change History (7)

Changed 2 months ago by kencu (Ken)

Attachment: icu-tiger-fail.log added

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

Description: modified (diff)
Keywords: leopard added

comment:2 Changed 2 months ago by kencu (Ken)

Same error on 10.5 PPC.

comment:3 Changed 8 hours ago by kencu (Ken)

I am still not able to get past this error -- it has to do with c++ templates being instantiated in multiple cpp files. Apparently somehow this can work, but not with gcc7 on Tiger or Leopard it doesn't.

If anyone has any insight into this magic, love to hear about it. Probably only Michael or Ionic know enough c++ to work through this one.

In the meantime, all I can think of to do is roll back to icu @65 pending some kind of resolution. That is what I've done in my own repos...

comment:4 Changed 7 hours ago by kencu (Ken)

For the curious, the issue appear to involve this bit of code:

<https://github.com/unicode-org/icu/blob/7c8f857da820506b061604db21a6bbd3ec908f0f/icu4c/source/i18n/number_skeletons.cpp#L1705>

which takes you to this explanation:

<https://stackoverflow.com/a/495056/1407170>

and this bit of c++ wisdom:

<https://isocpp.org/wiki/faq/templates#templates-defn-vs-decl>

which is causing the symbols to be multiply defined, and the linker to (therefore) barf.

comment:5 Changed 7 hours ago by kencu (Ken)

Just to be a bit frustrating, it seems to build fine with gcc7 on x86_64 on MacOS 10.14.

Changed 7 hours ago by kencu (Ken)

Attachment: icu-gcc7-x86_64.log added
Note: See TracTickets for help on using tickets.