Bug 207892 - audio/audacity: build failure after r410194
Summary: audio/audacity: build failure after r410194
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thomas Zander
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2016-03-10 22:42 UTC by Barbara Guida
Modified: 2016-03-25 22:08 UTC (History)
5 users (show)

See Also:
xxjack12xx: maintainer-feedback+


Attachments
output of make showconfig (996 bytes, text/plain)
2016-03-10 22:42 UTC, Barbara Guida
no flags Details
output of make configure (63.78 KB, text/plain)
2016-03-10 22:43 UTC, Barbara Guida
no flags Details
output of make (297.67 KB, text/plain)
2016-03-10 22:43 UTC, Barbara Guida
no flags Details
patch for audio/audacity (1.24 KB, patch)
2016-03-11 03:40 UTC, Tatsuki Makino
no flags Details | Diff
patch for audio/audacity (1.27 KB, patch)
2016-03-11 08:59 UTC, Tatsuki Makino
no flags Details | Diff
patch for audio/audacity (3.35 KB, patch)
2016-03-12 05:42 UTC, Tatsuki Makino
xxjack12xx: maintainer-approval+
Details | Diff
build log (attachment 168034) (55.15 KB, application/x-xz)
2016-03-12 05:44 UTC, Tatsuki Makino
no flags Details
Error with alsa unchecked (9.58 KB, text/plain)
2016-03-16 00:46 UTC, Jack
no flags Details
patch for audio/audacity (6.51 KB, patch)
2016-03-16 06:50 UTC, Tatsuki Makino
no flags Details | Diff
patch for audio/audacity (4.86 KB, patch)
2016-03-18 09:02 UTC, Tatsuki Makino
riggs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara Guida freebsd_committer freebsd_triage 2016-03-10 22:42:44 UTC
Created attachment 167980 [details]
output of make showconfig

Trying to upgrade audio audacity, I'm getting the following error:

libtool: compile:  cc -c -O2 -pipe -fno-strict-aliasing -march=athlon64-sse3 -DLIBICONV_PLUG -fstack-protector -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/unix -pthread -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_SYS_SOUNDCARD_H=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_CLOCK_GETTIME=1 -DHAVE_NANOSLEEP=1 -DPA_USE_ALSA=1 -DPA_USE_OSS=1 src/hostapi/alsa/pa_linux_alsa.c -o src/hostapi/alsa/pa_linux_alsa.o
src/hostapi/alsa/pa_linux_alsa.c:52:10: fatal error: 'alsa/asoundlib.h' file not found
#include <alsa/asoundlib.h>
         ^
1 error generated.
Makefile:231: recipe for target 'src/hostapi/alsa/pa_linux_alsa.lo' failed

It seems that alsa gets autodetected during configure, and then in portaudio-v19 the build fails because an include is not found.
If these could be of any help, note that:
- in the failing command, %LOCALBASE/include/alsa is not included
- $ pkg which /usr/local/include/alsa/asoundlib.h 
/usr/local/include/alsa/asoundlib.h was installed by package alsa-lib-1.1.0
- audio/alsa-lib has been update a couple of days after audacity
Comment 1 Barbara Guida freebsd_committer freebsd_triage 2016-03-10 22:43:12 UTC
Created attachment 167981 [details]
output of make configure
Comment 2 Barbara Guida freebsd_committer freebsd_triage 2016-03-10 22:43:35 UTC
Created attachment 167982 [details]
output of make
Comment 3 w.schwarzenfeld 2016-03-11 02:40:49 UTC
The option LAME causes this error. The option FFMPEG causes another error.
Comment 4 w.schwarzenfeld 2016-03-11 03:06:17 UTC
Sorry , misinterpreted one error - option FFMPEG builds without problems.
Comment 5 Tatsuki Makino 2016-03-11 03:40:16 UTC
Created attachment 167986 [details]
patch for audio/audacity

I'm sorry, I missed it because ./configure --help doesn't say "alsaがあるさ".

This problem affects the environment FreeBSD >= 10 and audio/alsa-lib is installed.
9.3-STABLE can be built. But libasound.so is used in implicit if it exists.

I made a patch. But I haven't tested it yet.
Comment 6 w.schwarzenfeld 2016-03-11 04:16:58 UTC
With ALSA and LAME on:
Same error as above.
With ALSA off and LAME on:

../lib-src/portmixer/src/.libs/libportmixer.a(libportmixer_la-px_linux_alsa.o): In function `OpenMixer_Linux_ALSA':
px_linux_alsa.c:(.text+0xdc): undefined reference to `PaAlsa_GetStreamInputCard'
px_linux_alsa.c:(.text+0x104): undefined reference to `PaAlsa_GetStreamOutputCard'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 7 Barbara Guida freebsd_committer freebsd_triage 2016-03-11 06:28:28 UTC
(In reply to Tatsuki Makino from comment #5)
./configure in ${WRKSRC}/lib-src/portaudio-v19 do.
Comment 8 Tatsuki Makino 2016-03-11 08:59:37 UTC
Created attachment 167996 [details]
patch for audio/audacity

correction of attachment 167986 [details]. But I haven't tested yet. (poudriere is building www/webkit-gtk2 now...)

(In reply to Barbara Guida from comment #7)
${WRKSRC}/lib-src/libsndfile/configure and ${WRKSRC}/lib-src/portaudio-v19/configure have help string. But, ${WRKSRC}/configure and ${WRKSRC}/lib-src/portmixer/configure.ac doesn't have help string.

This patch cannot disable alsa perfectly because ${WRKSRC}/configure always detects alsa.
Comment 9 Tatsuki Makino 2016-03-12 05:42:48 UTC
Created attachment 168034 [details]
patch for audio/audacity

correction of attachment 167996 [details] and suppressing some warnings.
Comment 10 Tatsuki Makino 2016-03-12 05:44:55 UTC
Created attachment 168035 [details]
build log (attachment 168034 [details])
Comment 11 Jack 2016-03-14 04:47:29 UTC
I will check it out.
Comment 12 Jack 2016-03-16 00:46:17 UTC
Created attachment 168277 [details]
Error with alsa unchecked

I'm getting this error if alsa is unchecked.
Comment 13 Tatsuki Makino 2016-03-16 06:50:24 UTC
Created attachment 168282 [details]
patch for audio/audacity

Perhaps, probrem of attachment 168277 [details] is fixed.
I don't have build log. But I checked @USE_LINUX_ALSA_TRUE@ in ${WRKSRC} lib-src/portmixer/src/Makefile.in is substituted to # if OPTION ALSA is turned off.

audio/audacity/files/patch-lib-src_portmixer_configure doesn't need if Bug 206914 is committed. Because it is overwritten by autoreconf.
Comment 14 Jack 2016-03-16 21:40:20 UTC
Ok, newest patch appears to compile fine on 11. I'll test some more on 10.
Comment 15 Jack 2016-03-16 22:03:15 UTC
Works fine on 10 also
Comment 16 Thomas Zander freebsd_committer freebsd_triage 2016-03-18 06:57:22 UTC
After r411331, the latest change set does not apply cleanly:
U         Makefile
A         files/patch-lib-src_libnyquist_nyquist_nyqsrc_sound.h
Skipped missing target: 'files/patch-lib-src_portmixer_configure'
U         files/patch-lib-src_portmixer_configure.ac
A         files/patch-lib-src_portmixer_src_px__linux__alsa.c
A         files/patch-src_BatchCommands.cpp
Summary of conflicts:
  Skipped paths: 1

Could you prepare an updated patch? Thank you!
Comment 17 Tatsuki Makino 2016-03-18 09:02:24 UTC
Created attachment 168364 [details]
patch for audio/audacity

This is an updated patch.
audio/audacity/files/patch-lib-src_portmixer_configure has been deleted in r411331.
Comment 18 Thomas Zander freebsd_committer freebsd_triage 2016-03-19 14:09:53 UTC
(In reply to Tatsuki Makino from comment #17)

Patch works for me, builds succeed with and without ALSA, and accidental detection is avoided. Thank you!

Only remaining question for me would be if ALSA should really be DEFAULT.
This is for the maintainer to decide.
Comment 19 Tatsuki Makino 2016-03-20 00:53:36 UTC
(In reply to Thomas Zander from comment #18)
I intend that all my patches are just a proposal. I have turned on ALSA by default because audacity (audacity-2.1.2_1) on my 9.3-STABLE linked ALSA with no dependent by gcc48.
Of course, it should be adjusted by maintainer or committers.
Comment 20 Jack 2016-03-21 20:33:45 UTC
Since we are just adding alsa support and not making it the default setting within audacity, I think we are good to leave the alsa support enabled by default.
Comment 21 Thomas Zander freebsd_committer freebsd_triage 2016-03-23 05:12:54 UTC
(In reply to xxjack12xx from comment #20)

Just to be totally clear: The current patch not only adds ALSA support, but also LIB_DEPENDS per default(!) on alsa. IMHO this should only be done if it is beneficial to have. Personally I don't see this benefit, that's why I was asking to make sure before committing the change. Should ALSA be part of OPTIONS_DEFAULT?
Comment 22 Jack 2016-03-23 09:22:15 UTC
I see what you mean, lets not have it on by default since alsa isn't the default sound system anyways.
Comment 23 Thomas Zander freebsd_committer freebsd_triage 2016-03-23 20:32:21 UTC
Comment on attachment 168364 [details]
patch for audio/audacity

Approval by comment, with one change: Exclude ALSA from OPTIONS_DEFAULT.
Comment 24 commit-hook freebsd_committer freebsd_triage 2016-03-23 20:43:09 UTC
A commit references this bug:

Author: riggs
Date: Wed Mar 23 20:42:42 UTC 2016
New revision: 411741
URL: https://svnweb.freebsd.org/changeset/ports/411741

Log:
  Fix build failure when accidentally picking up alsa (libasound).

  Currently, there is no configure switch for consistently disabling
  alsa detection. This changeset introduces the possibility to do so
  during the configure stage and adds ALSA as a non-default OPTION.

  PR:		207892
  Submitted by:	tatsuki_makino@hotmail.com
  Reported by:	bar
  Reviewed by:	xxjack12xx@gmail.com, riggs
  Approved by:	xxjack12xx@gmail.com (maintainer)

Changes:
  head/audio/audacity/Makefile
  head/audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqsrc_sound.h
  head/audio/audacity/files/patch-lib-src_portmixer_configure.ac
  head/audio/audacity/files/patch-lib-src_portmixer_src_px__linux__alsa.c
  head/audio/audacity/files/patch-src_BatchCommands.cpp
Comment 25 Jack 2016-03-24 20:12:07 UTC
Do we need to bump the portrevision?
Comment 26 Thomas Zander freebsd_committer freebsd_triage 2016-03-25 05:50:42 UTC
(In reply to xxjack12xx from comment #25)

It's great that you keep double-checking!

In this case, it's not strictly necessary to bump PORTREVISION because
- pkg builders and pkg clients will rebuild / reinstall anyway due to the changed set of OPTIONS
- for those who could build it successfully before, the package does not change. The rest could not build it anyway and need this fix to build it in the first place.
- This fix does not introduce a breaking change of an API/ABI that could lead to problems with consumers
Comment 27 Tatsuki Makino 2016-03-25 22:08:20 UTC
Perhaps, FreeBSD 9.x users who install audio/audacity from r410194 ports tree will not notice differences :)

Thank you everyone.