Bug 196054 - audio/py-pyaudio: Links with portaudio instead of portaudio2
Summary: audio/py-pyaudio: Links with portaudio instead of portaudio2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Some People
Assignee: Pawel Pekala
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2014-12-17 09:04 UTC by martin.dieringer
Modified: 2015-01-01 20:00 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
fix (2.11 KB, patch)
2014-12-17 21:44 UTC, Jan Beich
no flags Details | Diff
patch to py-pyaudio (2.07 KB, patch)
2014-12-18 19:37 UTC, Jaap Akkerhuis
no flags Details | Diff
Patch to py-pyaudio (2.65 KB, patch)
2014-12-27 20:02 UTC, Jaap Akkerhuis
no flags Details | Diff
Poudriere build log (14.82 KB, text/plain)
2014-12-27 20:17 UTC, Jaap Akkerhuis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description martin.dieringer 2014-12-17 09:04:33 UTC
$  ldd  /usr/local/lib/python2.7/site-packages/_portaudio.so
/usr/local/lib/python2.7/site-packages/_portaudio.so:
        libportaudio.so => /usr/local/lib/libportaudio.so (0x801608000)
[...]
Comment 1 martin.dieringer 2014-12-17 09:10:31 UTC
"-L/usr/local/lib/portaudio2" is appended instead of prepended:

cc -shared -fstack-protector -O2 -pipe -fstack-protector -fno-strict-aliasing build/temp.freebsd-10.1-STABLE-amd64-2.7/src/_portaudiomodule.o -L/usr/local/lib -lportaudio -lpython2.7 -o build/lib.freebsd-10.1-STABLE-amd64-2.7/_portaudio.so -L/usr/local/lib/portaudio2
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-17 12:09:23 UTC
Maintainer CC'd and maintainer-feedback requested.
Comment 3 Jan Beich freebsd_committer 2014-12-17 21:44:24 UTC
Created attachment 150695 [details]
fix

Try the attached patch. It also fixes:
- build on DragonFly DPorts
- LIB_DEPENDS to ignore libportaudio.so from audio/portaudio
- LOCALBASE != PREFIX build
Comment 4 martin.dieringer 2014-12-18 12:29:32 UTC
the fix works here
Comment 5 Jaap Akkerhuis 2014-12-18 19:37:22 UTC
Created attachment 150732 [details]
patch to py-pyaudio
Comment 6 Jaap Akkerhuis 2014-12-18 19:41:50 UTC
I decided that the fix from Jann Bleich was fine (was working on a similar one).

Both portlint and poudriere complainded about the LIB_DEPENDS line so I replaced in with a somewhat ugly BUILD_DEPENDS version.

Thanks for reporting this and the proposed fix.

        jaap
Comment 7 Jan Beich freebsd_committer 2014-12-18 20:50:08 UTC
Comment on attachment 150732 [details]
patch to py-pyaudio

>-LIB_DEPENDS=	libportaudio.so:${PORTSDIR}/audio/portaudio2
>+BUILD_DEPENDS=	${LOCALBASE}/include/portaudio2/portaudio.h:${PORTSDIR}/audio/portaudio2

portaudio2 is linked directly, not via dlopen. RUN_DEPENDS is still required to not break runtime for package users.
And there's a generic way to depend on package that fits on 80col terminal.

  BUILD_DEPENDS=  portaudio2>0:${PORTSDIR}/audio/portaudio2
  RUN_DEPENDS=    portaudio2>0:${PORTSDIR}/audio/portaudio2
Comment 8 Jan Beich freebsd_committer 2014-12-18 20:51:20 UTC
Comment on attachment 150695 [details]
fix

Illegal use of LIB_DEPENDS, at least before bug 196109.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-27 08:33:22 UTC
Please don't forget to update keywords, and set/update flags as issues progress.

Maintainer, if you can attach a successful poudriere build, that would be great.
Comment 10 Jaap Akkerhuis 2014-12-27 20:02:47 UTC
Created attachment 151004 [details]
Patch to py-pyaudio

- Improved fix for link problem

- Update to version 0.28
Comment 11 Jaap Akkerhuis 2014-12-27 20:17:06 UTC
Created attachment 151006 [details]
Poudriere build log

The poudriere buildlog after applying proposed patch, attachment 151004 [details].  Log requested by Kubilay Kocak (See comment #9).
Comment 12 Jaap Akkerhuis 2014-12-27 23:03:30 UTC
(In reply to Kubilay Kocak from comment #9)
> Please don't forget to update keywords, and set/update flags as issues
> progress.
> 
> Maintainer, if you can attach a successful poudriere build, that would be
> great.

Poudrere build is attached
Comment 13 commit-hook freebsd_committer 2015-01-01 19:56:49 UTC
A commit references this bug:

Author: pawel
Date: Thu Jan  1 19:56:46 UTC 2015
New revision: 376027
URL: https://svnweb.freebsd.org/changeset/ports/376027

Log:
  - Update to version 0.2.8, add LICENSE [1]
  - Fix build on DragonFly and when LOCALBASE != PREFIX [2]
  - Make sure to link with audio/portaudio2 [2]

  PR:		196054
  Submitted by:	maintainer [1], Jan Beich [2]

Changes:
  head/audio/py-pyaudio/Makefile
  head/audio/py-pyaudio/distinfo
  head/audio/py-pyaudio/files/patch-setup.py
Comment 14 Pawel Pekala freebsd_committer 2015-01-01 20:00:04 UTC
Committed with small change:

LIB_DEPENDS=    libportaudio.so.2:${PORTSDIR}/audio/portaudio2

this prevents false library detection in more elegant way.

audio/portaudio => libportaudio.so.0
audio/portaudio2 => libportaudio.so.2

Thanks.