Replies: 2 comments 11 replies
-
Can I reproduce the issue just by building kicad with gcc and mold? What is you gcc version? |
Beta Was this translation helpful? Give feedback.
8 replies
-
Is there another way to make mold work with C++20 and KiCad? If
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So recently I've migrated Kicad from C++17 to C++20. And I have it compiling under MSVC, Clang (with lld) on both Linux and macOS, and gcc with gold on Linux.
But gcc+mold and clang+mold are running into a linker error that is unique to the usage of mold.
The basic summary in our mess is
libcommon.a references a extern called
extern KIFACE_BASE& Kiface();
It is used by a few objects built as part of libcommon.a. The definition of KIFACE_BASE also exists in libcommon.a
The actual Kiface() function only exists in another static library called
gerbview_kiface_objects
which thegerbview
executable does not link to because there's agerbview_kiface
that instead uses it. In fact none of objects thatgerbview
is normally looking to link fromlibcommon.a
should be referencing Kiface().The oddity is this only happens with mold being used to link C++20, changing the project back to C++17 by flipping the std definition makes it work.
I installed the latest mold:
Is there a C++ standard related change that would affect specifically affect only mold?
Beta Was this translation helpful? Give feedback.
All reactions