Replies: 3 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
-
Adding my case here as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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_objectswhich thegerbviewexecutable does not link to because there's agerbview_kifacethat instead uses it. In fact none of objects thatgerbviewis normally looking to link fromlibcommon.ashould 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