svgalib gets multiple redefinition errors of the form: quickmath.o: In function `fsqr': quickmath.c:(.text+0x0): multiple definition of `fsqr' 3dinit.o:3dinit.c:(.text+0x0): first defined here quickmath.o: In function `lsqr': quickmath.c:(.text+0x10): multiple definition of `lsqr' 3dinit.o:3dinit.c:(.text+0x10): first defined here quickmath.o: In function `fmax': quickmath.c:(.text+0x20): multiple definition of `fmax' 3dinit.o:3dinit.c:(.text+0x20): first defined here quickmath.o: In function `fmin': quickmath.c:(.text+0x40): multiple definition of `fmin' 3dinit.o:3dinit.c:(.text+0x40): first defined here quickmath.o: In function `fsgn': quickmath.c:(.text+0x60): multiple definition of `fsgn' 3dinit.o:3dinit.c:(.text+0x60): first defined here quickmath.o: In function `dot': quickmath.c:(.text+0xb0): multiple definition of `dot' 3dinit.o:3dinit.c:(.text+0xb0): first defined here quickmath.o: In function `cross': quickmath.c:(.text+0xd0): multiple definition of `cross' 3dinit.o:3dinit.c:(.text+0xd0): first defined here quickmath.o: In function `plus': quickmath.c:(.text+0x120): multiple definition of `plus' 3dinit.o:3dinit.c:(.text+0x120): first defined here quickmath.o: In function `minus': quickmath.c:(.text+0x150): multiple definition of `minus' 3dinit.o:3dinit.c:(.text+0x150): first defined here quickmath.o: In function `times': quickmath.c:(.text+0x180): multiple definition of `times' this may be related to building with gcc-5.3.0? It looks like Fedora and RedHat have experienced this problem. I'll attach a patch that works for me (but should be cleaned up.) Reproducible: Always Steps to Reproduce: 1. emerge -av1 media-libs/svgalib 2. 3. Actual Results: Build fails with errors about redefinitions in quickmath.h Expected Results: Build is successful
Created attachment 427226 [details, diff] Patch that works for me in /usr/portage/patches/media-libs/svgalib
Yep, this is gcc-5.3 related issue (new C11 standard is enforced by default).
Fixed in tree, no patch is needed: -fgnu89-inline is sufficient (and recommended by GCC-5 porting guide). No version bump, refetch tree if necessary.