Bug 213513

Summary: audio/fluidsynth: 1.1.6 build fail - patch
Product: Ports & Packages Reporter: Ivan Rozhuk <rozhuk.im>
Component: Individual Port(s)Assignee: Thomas Zander <riggs>
Status: Closed FIXED    
Severity: Affects Many People CC: hselasky, riggs, rozhuk.im
Priority: --- Flags: riggs: maintainer-feedback+
riggs: merge-quarterly+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
disable libreadline and make sure that enable-aufile=true set. none

Description Ivan Rozhuk 2016-10-15 20:26:02 UTC
Created attachment 175790 [details]
disable libreadline and make sure that enable-aufile=true set.

...
**************************************************************
Summary:
Build type:            Release
...
Readline:              yes (NOTE: GPL library)
...
**************************************************************
...
[38/39] /usr/bin/cc  -DHAVE_CONFIG_H -I. -Isrc -Isrc/drivers -Isrc/synth -Isrc/rvoice -Isrc/midi -Isrc/utils -Isrc/sfloader -Isrc/bindings -Iinclude -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -O2 -msse2 -msse3 -mssse3 -msse4.1 -pipe  -fstack-protector -fno-strict-aliasing -O2 -msse2 -msse3 -mssse3 -msse4.1 -pipe  -fstack-protector -fno-strict-aliasing -MD -MT src/CMakeFiles/fluidsynth.dir/fluidsynth.c.o -MF src/CMakeFiles/fluidsynth.dir/fluidsynth.c.o.d -o src/CMakeFiles/fluidsynth.dir/fluidsynth.c.o   -c src/fluidsynth.c
[39/39] : && /usr/bin/cc  -O2 -msse2 -msse3 -mssse3 -msse4.1 -pipe  -fstack-protector -fno-strict-aliasing -O2 -msse2 -msse3 -mssse3 -msse4.1 -pipe  -fstack-protector -fno-strict-aliasing  -lpthread -fstack-protector src/CMakeFiles/fluidsynth.dir/fluidsynth.c.o  -o src/fluidsynth -L/usr/local/lib src/libfluidsynth.so.1.5.2 -lgthread-2.0 -lglib-2.0 -lintl -ldbus-1 /usr/local/lib/libreadline.so -lm -Wl,-rpath,/tmp/ports/usr/ports/audio/fluidsynth/work/fluidsynth-1.1.6/src:/usr/local/lib: && :
FAILED: src/fluidsynth 
: && /usr/bin/cc  -O2 -msse2 -msse3 -mssse3 -msse4.1 -pipe  -fstack-protector -fno-strict-aliasing -O2 -msse2 -msse3 -mssse3 -msse4.1 -pipe  -fstack-protector -fno-strict-aliasing  -lpthread -fstack-protector src/CMakeFiles/fluidsynth.dir/fluidsynth.c.o  -o src/fluidsynth -L/usr/local/lib src/libfluidsynth.so.1.5.2 -lgthread-2.0 -lglib-2.0 -lintl -ldbus-1 /usr/local/lib/libreadline.so -lm -Wl,-rpath,/tmp/ports/usr/ports/audio/fluidsynth/work/fluidsynth-1.1.6/src:/usr/local/lib: && :
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `BC'
/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1


readline not listed as LIB_DEPENDS in port makefile.
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2016-11-08 21:32:24 UTC
Is perhaps the wrong libreadline used?

Can you check if it should link with /usr/lib/libreadline.so instead?

--HPS
Comment 2 Ivan Rozhuk 2016-11-08 23:01:29 UTC
No.
Port makefile does not contain dependent=libreadline, so I just disable it to quick fix port build.

Let maintainer decides what to do with libreadline.
Comment 3 Thomas Zander freebsd_committer freebsd_triage 2016-11-28 10:36:09 UTC
Does it work if you simply add readline to USES ?
Comment 4 Ivan Rozhuk 2016-11-28 10:54:55 UTC
No.

USES=		cmake pkgconfig ninja tar:bzip2 readline
CMAKE_ARGS=	-Denable-ladcca:BOOL=FALSE \
		-Denable-midishare:BOOL=FALSE \
		-Denable-aufile:BOOL=TRUE \
		-Denable-readline:BOOL=TRUE

build fail with same errors.
Comment 5 Thomas Zander freebsd_committer freebsd_triage 2016-12-17 16:49:07 UTC
(In reply to rozhuk.im from comment #4)

I still can't reproduce this. fluidsynth builds fine with libreadline from ports (which is pulled in during build by python)
Comment 6 Ivan Rozhuk 2017-02-16 22:32:00 UTC
I found how to reproduce: build and reinstall devel/readline without TERMCAP option.

May be add option to makefile for enable/disable libreadline usage?
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-03-04 12:09:59 UTC
A commit references this bug:

Author: riggs
Date: Sat Mar  4 12:08:59 UTC 2017
New revision: 435389
URL: https://svnweb.freebsd.org/changeset/ports/435389

Log:
  Add default OPTION for READLINE so users can disable it for custom builds

  PR:		213513
  Reported by:	rozhuk.im@gmail.com
  MFH:		2017Q1

Changes:
  head/audio/fluidsynth/Makefile
Comment 8 commit-hook freebsd_committer freebsd_triage 2017-03-05 08:52:27 UTC
A commit references this bug:

Author: riggs
Date: Sun Mar  5 08:51:23 UTC 2017
New revision: 435458
URL: https://svnweb.freebsd.org/changeset/ports/435458

Log:
  MFH: r435389

  Add default OPTION for READLINE so users can disable it for custom builds

  PR:		213513
  Reported by:	rozhuk.im@gmail.com

  Approved by:	ports-secteam (junovitch)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/audio/fluidsynth/Makefile
Comment 9 Ivan Rozhuk 2017-03-05 23:14:34 UTC
Thanks!