Opened 13 months ago

Last modified 13 months ago

#68441 assigned request

Pianobar - it works with ffmpeg6 however

Reported by: Behinder (behinder) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: pianobar

Description

I was able to compile pianobar by hand from the macports source tree. I modified Portfile and changed dependency to ffmpeg6. However ffmpeg6 puts relevant headers in different subdirectory:

/opt/local/libexec/ffmpeg6/include/
and pkg-config is not seeing relevant *.pc files until I set environment variable PKG_CONFIG_PATH=/opt/local/libexec/ffmpeg6/lib/pkgconfig.

After that sudo gmake && sudo gmake install worked and pianobar work. But when I try to install something else macporsts complain that pianobar and libpiano are broken and they must be rebuild. I contacted developer of Pianobar but he told he is not maintaing the macports version. But if this works in Homebrew there is no reason for not making it work in MP.

I have no experience in building Portfiles so I don't know how to modify this to set PKG_CONFIG_PATH variable and how to make Macports to look also in /opt/local/libexec/ffmpeg6/include/ or how to create variant of the port?
I also do not understand why libpiano and pianobar being two ports, only the latter can be found in /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/audio/

Attachments (1)

Portfile (3.0 KB) - added by Behinder (behinder) 13 months ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 13 months ago by jmroot (Joshua Root)

Owner: set to ryandesign
Status: newassigned

comment:2 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: pianobar libpiano removed

pianobar and libpiano are separate ports so that they can be installed separately if desired. If you want to use the pianobar command line program, you install the pianobar port; it depends on libpiano so it will install that port for you first. If you want to use the libpiano library in your own project, you install the libpiano port and don't need to install the pianobar port. Both ports are defined in the single pianobar Portfile using subports.

I haven't quite understood what you are saying in this ticket. Are you saying that you cannot install pianobar without making the changes you propose? If so, what error were you getting? Or are you just saying that it is possible to switch pianobar to use the ffmpeg6 port instead of the ffmpeg port?

Changed 13 months ago by Behinder (behinder)

Attachment: Portfile added

comment:3 Changed 13 months ago by Behinder (behinder)

Ok sorry, I was not precise. After looking into Portfile documentation I understood libpiano is a subport therefore sources are include inside pianobar sources. However, it looks that after change I did pianobar compiled but apparently with some errors and the reason pianobar binary works is quite mysterious to me. on one hand libpiano seems to compile correctly but on the other hand MacPorts show linking error because libpiano is trying to reference libraries from ffmpeg that does not exist.

I've fought with these for 3 days and have some conclusion:

  1. Portfile does not recognise depends_lib-append option, only depends_lib-delete. I tried to add dependency and displaying depends_lib variable after shows that no content was added. (bug in TCL? bug in MacPorts engine?)
  1. Apparently in MacOS Ventura shell does not recognize/not allow? environmental variables set by the user which wouldn't surprise me as Apple is trying to close OS like they do on iPhones and iPads.

I am in folder /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/audio/pianobar/work/pianobar-2022.04.01:

After running gmake I got:

Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavformat was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavformat.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavformat' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavfilter was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavfilter.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavfilter' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavformat was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavformat.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavformat' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavfilter was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavfilter.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavfilter' found
    CC  src/main.c
error: unable to open output file 'src/main.o': 'Permission denied'
1 error generated.
gmake: *** [Makefile:113: src/main.o] Błąd 1

but my env shows:

TERM_SESSION_ID=w0t0p0:7158875C-8D65-4E3F-A0BB-0AE200A6F171
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.nBSuMtrJm9/Listeners
LC_TERMINAL_VERSION=3.4.21
COLORFGBG=15;0
ITERM_PROFILE=Darkula
XPC_FLAGS=0x0
LANG=pl_PL.UTF-8
PWD=/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/audio/pianobar/work/pianobar-2022.04.01
SHELL=/bin/zsh
__CFBundleIdentifier=com.googlecode.iterm2
SECURITYSESSIONID=186af
TERM_PROGRAM_VERSION=3.4.21
TERM_PROGRAM=iTerm.app
PATH=/Users/sebastian/.rvm/gems/ruby-3.2.2/bin:/Users/sebastian/.rvm/gems/ruby-3.2.2@global/bin:/Users/sebastian/.rvm/rubies/ruby-3.2.2/bin:/Users/sebastian/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/sebastian/.rvm/bin
LC_TERMINAL=iTerm2
COLORTERM=truecolor
COMMAND_MODE=unix2003
TERM=xterm-256color
HOME=/Users/sebastian
TMPDIR=/var/folders/g1/xvy1y9xd757_9pqdq1f3pxvm0000gn/T/
USER=sebastian
XPC_SERVICE_NAME=0
LOGNAME=sebastian
LaunchInstanceID=8959A53D-F827-49E3-969C-25A6EF6CDF23
__CF_USER_TEXT_ENCODING=0x0:29:42
ITERM_SESSION_ID=w0t0p0:7158875C-8D65-4E3F-A0BB-0AE200A6F171
SHLVL=1
OLDPWD=/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/audio/pianobar/work
ZSH=/Users/sebastian/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
PKG_CONFIG_PATH=/opt/local/libexec/ffmpeg6/lib/pkgconfig
rvm_prefix=/Users/sebastian
rvm_path=/Users/sebastian/.rvm
rvm_bin_path=/Users/sebastian/.rvm/bin
rvm_version=1.29.12 (latest)
GEM_HOME=/Users/sebastian/.rvm/gems/ruby-3.2.2
GEM_PATH=/Users/sebastian/.rvm/gems/ruby-3.2.2:/Users/sebastian/.rvm/gems/ruby-3.2.2@global
MY_RUBY_HOME=/Users/sebastian/.rvm/rubies/ruby-3.2.2
IRBRC=/Users/sebastian/.rvm/rubies/ruby-3.2.2/.irbrc
RUBY_VERSION=ruby-3.2.2

so the variable PKG_CONFIG_PATH is set and is correct but it is not recognized.

ls /opt/local/libexec/ffmpeg6/lib/pkgconfig
libavcodec.pc    libavdevice.pc   libavfilter.pc   libavformat.pc   libavutil.pc     libpostproc.pc   libswresample.pc libswscale.pc

It is even worse when doing sudo gmake because sudo creates own shell and does not preserve variables and nobody will install macports with sudo -E command/ I tried to export PKG_CONFIG_PATH in Makefile but also no luck. As I said I have no experience with TCL language except ancient times when IRC bots was written in this. I learned a lot during this 3 days but I feel like this is waisted effort :( but at least I have broken binary that works :)

Last edited 13 months ago by Behinder (behinder) (previous) (diff)

comment:4 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

I still don't know why you have filed this ticket. Did you have some problem installing the pianobar port as it was provided by us? If so, please attach the main.log file.

Or are you requesting that we change pianobar from depending on ffmpeg to depending on ffmpeg6, and you are trying to make that modification yourself and are having trouble?

Note: See TracTickets for help on using tickets.