← Back to team overview

kicad-developers team mailing list archive

Re: Linker Error (self made...)



On Tue, Aug 27, 2019 at 02:56:37AM +0200, Ian McInerney wrote:

> I was trying to do a fresh build of master with the address sanitizer
> enabled in Clang, and I am receiving a strange linker error, and was
> curious if anyone else had any thoughts on it.

I fixed a similar error on MSVC once. MSVC encodes the return type in the
mangled symbol, while gcc does not, and the build fell over on MSVC because
we had two different declarations for Pgm(), one returning a reference to
PGM_BASE, the other returning a reference to a compatible type (so this
wasn't a runtime problem).

My suspicion is that something similar is going on here. This could be
something stupid even like a mismatch in compiler flags (which are a mix of

Compiling with -flto on gcc gives a few warnings[1] about different types
being used in the 3D viewer, usually related to GLM vector types (so
presumably different translation units use different preprocessor macros
when including GLM), but nothing Kiface related (this wouldn't catch any
mismatch in modules that are not linked together though).


[1] https://jenkins.simonrichter.eu/job/linux-kicad-head-lto/lastStableBuild/gcc/

Follow ups