When compiling timidity++ with GCC 5.4, timidity++ linking phase fails with the error below. https://sourceforge.net/p/timidity/mailman/message/34951578/ indictaes that "With newer versions of gcc, "inline" defaults to extern, and not static if not specified. This causes linking problems at the end of the compile. Most of this occurences are fixed (or #ifdef'ed away) except these two small ones in timidity/mfi.c" Changing mfi.c by adding "static" in front of "inline void StoreLastNoteInfo" and "inline void SendLastNoteInfo" olved the linking issue. So maybe a patch should be added to support recent versions of GCC x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../libarc -I../libunimod -I../interface -I../utils -D_GNU_SOURCE -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -DAU_ALSA -DAU_VORBIS -DAU_FLAC -march=core-avx2 -march=core-avx2 -pthread -c -o resample.o resample.c x86_64-pc-linux-gnu-gcc -march=core-avx2 -march=core-avx2 -pthread -rdynamic -Wl,-O1 -Wl,--as-needed -o timidity aiff_a.o aq.o au_a.o audio_cnv.o common.o controls.o effect.o filter.o freq.o instrum.o list_a.o loadtab.o m2m.o mfi.o miditrace.o midi_a.o mix.o mod.o mod2midi.o modmid_a.o mt19937ar.o optcode.o output.o playmidi.o quantity.o raw_a.o rcp.o readmidi.o recache.o resample.o reverb.o sbkconv.o sffile.o sfitem.o smfconv.o smplfile.o sndfont.o tables.o timidity.o version.o wave_a.o wrd_read.o wrdt.o alsa_a.o vorbis_a.o flac_a.o dl_dlopen.o ../interface/libinterface.a ../libarc/libarc.a ../libunimod/libunimod.a ../utils/libutils.a -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lX11 -lasound -lm -ldl -lpthread -lm -ldl -lpthread -ltk -ltcl -lX11 -lm -ldl -lpthread -lFLAC -lm -lncurses -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -ldl -lpng -lz -lvorbis -lm -lvorbisenc -logg mfi.o: In function `read_mfi_track': mfi.c:(.text+0xe2a): undefined reference to `SendLastNoteInfo' mfi.c:(.text+0xe62): undefined reference to `StoreLastNoteInfo' mfi.c:(.text+0xecd): undefined reference to `StoreLastNoteInfo' mfi.c:(.text+0x1550): undefined reference to `SendLastNoteInfo' mfi.c:(.text+0x1884): undefined reference to `SendLastNoteInfo' mfi.c:(.text+0x190f): undefined reference to `SendLastNoteInfo' mfi.c:(.text+0x1c96): undefined reference to `SendLastNoteInfo' collect2: error: ld returned 1 exit status
Created attachment 461050 [details] emerge --info
https://sourceforge.net/p/timidity/git/ci/6e189f6073e979ceccaf05c3bb5f495a1b9ed87e/ is the patch for this issue
* mkdir -p /etc/portage/patches/media-sound/timidity++-2.14.0-r2 * cp mfi-fix.patch /etc/portage/patches/media-sound/timidity++-2.14.0-r2 * sed -i 's/eautoreconf/epatch_user\ \&\&\ eautoreconf/g' /usr/portage/media-sound/timidity++/timidity++-2.14.0-r2.ebuild * ebuild /usr/portage/media-sound/timidity++/timidity++-2.14.0-r2.ebuild manifest Would be great if the ebuild was fix also to default enable epatch_user
Created attachment 463692 [details, diff] patch to fix mfi.c issue
x86-ebuild isn't fixed. Same mfi.c linking error as described in 2017.
Created attachment 545028 [details] build log from -r3
Created attachment 545030 [details, diff] patch for r3
Created attachment 545032 [details] emerge --info from host building -r3
Thanks. Interestingly, I still can't reproduce the issue even with the exact same build.log. I'm going to add it based on the fact that the fix is in upstream git master as well.
s/build.log/USE flags/
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e22fc38985047ca60503b0eac793c9a16648d5ba commit e22fc38985047ca60503b0eac793c9a16648d5ba Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2018-08-26 09:49:43 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2018-08-26 09:50:05 +0000 media-sound/timidity++: Fix build with GCC-5 Closes: https://bugs.gentoo.org/606894 Package-Manager: Portage-2.3.48, Repoman-2.3.10 .../timidity++/files/timidity++-2.14.0-gcc5.patch | 31 ++++++++++++++++++++++ media-sound/timidity++/timidity++-2.14.0-r3.ebuild | 1 + 2 files changed, 32 insertions(+)