Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 606894 - media-sound/timidity++-2.14.0-r2: mfi.c:(.text+0xe2a): undefined reference to `SendLastNoteInfo'
Summary: media-sound/timidity++-2.14.0-r2: mfi.c:(.text+0xe2a): undefined reference to...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2017-01-23 10:37 UTC by Thierry De Leeuw
Modified: 2018-08-26 09:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emergeInfo.txt,5.81 KB, text/plain)
2017-01-23 10:46 UTC, Thierry De Leeuw
Details
patch to fix mfi.c issue (mfi-fix.patch,1.12 KB, patch)
2017-02-14 04:00 UTC, nobody
Details | Diff
build log from -r3 (build-r3.log,200.42 KB, text/x-log)
2018-08-26 09:29 UTC, nobody
Details
patch for r3 (mfi-fix.patch,1.12 KB, patch)
2018-08-26 09:30 UTC, nobody
Details | Diff
emerge --info from host building -r3 (emergeinfo.log,7.35 KB, text/x-log)
2018-08-26 09:32 UTC, nobody
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry De Leeuw 2017-01-23 10:37:41 UTC
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
Comment 1 Thierry De Leeuw 2017-01-23 10:46:17 UTC
Created attachment 461050 [details]
emerge --info
Comment 2 Thierry De Leeuw 2017-01-23 10:49:57 UTC
https://sourceforge.net/p/timidity/git/ci/6e189f6073e979ceccaf05c3bb5f495a1b9ed87e/ is the patch for this issue
Comment 3 nobody 2017-02-14 03:59:07 UTC
* 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
Comment 4 nobody 2017-02-14 04:00:34 UTC
Created attachment 463692 [details, diff]
patch to fix mfi.c issue
Comment 5 Franz 2018-08-09 10:39:39 UTC
x86-ebuild isn't fixed. Same mfi.c linking error as described in 2017.
Comment 6 nobody 2018-08-26 09:29:13 UTC
Created attachment 545028 [details]
build log from -r3
Comment 7 nobody 2018-08-26 09:30:39 UTC
Created attachment 545030 [details, diff]
patch for r3
Comment 8 nobody 2018-08-26 09:32:54 UTC
Created attachment 545032 [details]
emerge --info from host building -r3
Comment 9 Andreas Sturmlechner gentoo-dev 2018-08-26 09:48:08 UTC
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.
Comment 10 Andreas Sturmlechner gentoo-dev 2018-08-26 09:48:44 UTC
s/build.log/USE flags/
Comment 11 Larry the Git Cow gentoo-dev 2018-08-26 09:50:22 UTC
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(+)