wolfpld / tracy

Frame profiler
https://tracy.nereid.pl/
Other
8.61k stars 592 forks source link

mold+gcc14 causes link failure for profiler gui #791

Closed HeliumAnt closed 1 month ago

HeliumAnt commented 1 month ago

The profiler GUI doesn't link with mold (master branch, Arch Linux, gcc-14.1.1). Which would be fine since it still works with other linkers, however due to the hardcoded override this is quite annoying.

mold: error: undefined symbol: tracy::OpsList
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans0.ltrans.o:(tracy::SourceView::SourceView())

mold: error: undefined symbol: tracy::MicroArchitectureNum
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans5.ltrans.o:(tracy::SourceView::SelectMicroArchitecture(char const*))
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans5.ltrans.o:(tracy::SourceView::SelectMicroArchitecture(char const*))

mold: error: undefined symbol: tracy::IsaList
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans5.ltrans.o:(tracy::SourceView::RenderAsmLine(tracy::SourceView::AsmLine&, tracy::SourceView::AddrStat const&, tracy::SourceView::AddrStatData const&, tracy::Worker&, unsigned long&, int, int, tracy::View&))

mold: error: undefined symbol: tracy::MicroArchitectureData
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans5.ltrans.o:(tracy::SourceView::RenderAsmLine(tracy::SourceView::AsmLine&, tracy::SourceView::AddrStat const&, tracy::SourceView::AddrStatData const&, tracy::Worker&, unsigned long&, int, int, tracy::View&))

mold: error: undefined symbol: tracy::OpsNum
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans0.ltrans.o:(tracy::SourceView::SourceView())
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans0.ltrans.o:(tracy::SourceView::SourceView())

mold: error: undefined symbol: tracy::MicroArchitectureList
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans5.ltrans.o:(tracy::SourceView::SelectMicroArchitecture(char const*))

mold: error: undefined symbol: tracy::PortList
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans5.ltrans.o:(tracy::SourceView::RenderAsmLine(tracy::SourceView::AsmLine&, tracy::SourceView::AddrStat const&, tracy::SourceView::AddrStatData const&, tracy::Worker&, unsigned long&, int, int, tracy::View&))

mold: error: undefined symbol: tracy::OpDescList
>>> referenced by <artificial>
>>>               /tmp/cc0ZtERB.ltrans5.ltrans.o:(tracy::SourceView::RenderAsmLine(tracy::SourceView::AsmLine&, tracy::SourceView::AddrStat const&, tracy::SourceView::AddrStatData const&, tracy::Worker&, unsigned long&, int, int, tracy::View&))
wolfpld commented 1 month ago

This happens with gcc 13 or 14, when LTO is enabled.

With 813f4243 mold will only be used if clang is the compiler.