jacroe / pidora

A Raspberry Pi Radio. Includes Pandora (via pianobar) and NPR Hourly News
http://pidora.jacroe.com/
GNU General Public License v3.0
38 stars 12 forks source link

PianoBar Install Part Fails #53

Open earlgrei opened 10 years ago

earlgrei commented 10 years ago

I know that this is more directly related to Pianobar but since it causes your installer to fail I thought I would pass the issue in here. So when doing the git clone of Pianobar and it runs the build the Pianobar build fails with

Makefile:103: *** Please choose a valid libav implementation by setting LIBAV.  Stop.

If I open the Makefile in Pianobar and set the value in there no matter what I set it to nothing works. IT will fail as below. Let me know if you have any ideas.

pi@raspberrypi ~/pianobar $ make
Makefile:103: *** Please choose a valid libav implementation by setting LIBAV.  Stop.
pi@raspberrypi ~/pianobar $ nano Makefile
pi@raspberrypi ~/pianobar $ make
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
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
src/player.c:35:32: fatal error: libavcodec/avcodec.h: No such file or directory
compilation terminated.
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
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
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
src/player.c:35:32: fatal error: libavcodec/avcodec.h: No such file or directory
compilation terminated.
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
    CC  src/main.c
In file included from src/main.h:30:0,
                 from src/main.c:57:
src/player.h:34:34: fatal error: libavfilter/avfilter.h: No such file or directory
compilation terminated.
make: *** [src/main.o] Error 1
pi@raspberrypi ~/pianobar $
jacroe commented 10 years ago

Yeap. I've run into this on my own computer and was hoping it was just an issue of mine; looks like it isn't. There's some issue with ffmpeg or a similar audio/video library and how pianobar relies on either a deprecated API or the other way around. I don't quite remember. And I don't have the time right now to dig into it; I'm graduating from university in a couple of weeks, and that alone is occupying all my time.

Which isn't to say that I've given up on this. Far from it, Pidora is still one of my most used apps on my computer (right behind Chrome and Sublime Text). I'll fix this up as soon as I can.

In the meantime, you can comment out that code, download this working binary* to the /usr/local/bin folder (or any folder in your $PATH) and keep going. Thank you for confirming this is a bug on the Pi. I really do appreciate it.

* I should note that that link is to a file hosted on MEGA.co.nz. If you don't feel comfortable downloading from there, for whatever reason, let me know, and I'll give you a link to it elsewhere.

earlgrei commented 10 years ago

No problem. Focus on school and early congrats on graduation. I got past it by just installing the apt package of pianobar. On Apr 26, 2014 6:42 AM, "Jacob Roeland" notifications@github.com wrote:

Yeap. I've run into this on my own computer and was hoping it was just an issue of mine; looks like it isn't. There's some issue with ffmpeg or a similar audio/video library and how pianobar relies on either a deprecated API or the other way around. I don't quite remember. And I don't have the time right now to dig into it; I'm graduating from university in a couple of weeks, and that alone is occupying all my time.

Which isn't to say that I've given up on this. Far from it, Pidora is still one of my most used apps on my computer (right behind Chrome and Sublime Text). I'll fix this up as soon as I can.

In the meantime, you can comment out that code, download this working binaryhttps://mega.co.nz/#!HMFCUIqC!4ejsEtKOrmaGv6AlUhyqqJZV-vTPBt5n-hjsApJWL3cto the /usr/local/bin folder (or any folder in your $PATH) and keep going. Thank you for confirming this is a bug on the Pi. I really do appreciate it.

— Reply to this email directly or view it on GitHubhttps://github.com/jacroe/pidora/issues/53#issuecomment-41466575 .

pjz commented 10 years ago

FWIW, I got this to work by first removing all the libav* and ffmpeg libraries and then building a more recent ffmpeg just for pianobar. Something like:

  1. clone ffmpeg
  2. cd ffmpeg
  3. ./configure --prefix=/usr/local --enable-shared --disable-everything --enable-demuxer=mov --enable-decoder=aac --enable-protocol=http --enable-filter=volume --enable-filter=aformat --enable-filter=aresample --disable-programs --disable-doc
  4. make install # This installs ffmpeg libs and headers and etc into /usr/local/*
  5. cd ../pianobar
  6. LIBAV=ffmpeg2.2 make install

which should then put a built pianobar binary into /usr/local/bin.

Note you may need to apt-get install libao-dev ; I think pianobar needs it to build.

cyberhiker commented 10 years ago

I tried to download the binary, but Mega says it has been removed.

jacroe commented 10 years ago

@cyberhiker The file's been restored. Somehow ended up in the rubbish bin.

ssilva65 commented 6 years ago

When I had this problem during the install, I started another terminal and used 'sudo apt-get piano bar'. went back to install.sh terminal, hit continue and it worked. The only problem was my autostart station wasn't valid. That was easily fixed by lifting a station id from the web site and editing ~/.config/pianobar/config