Okay, I'm finally getting to the point of writing up how I finally got forked-daapd installed on my CentOS 6.2 64 Bit media server. It was a pain, but it works.
My process was : try to configure, compile, and install. If it failed, deal with the problem and repeat.
Simple process, but there was a LOT that was problematic.
First, the dependencies (you will need the rpmfusion repository configured) :
yum install gcc glibc-devel avahi-devel ffmpeg-devel libplist-devel taglib-devel flac-devel libunistring-devel java libgcrypt-devel mxml-devel libevent-devel alsa-lib-devel gettext-devel libconfuse-devel gperf zlib-devel ant ant-antlr ant-apache-bcel ant-junit ant-trax antlr tcl-devel git
You will note that we need a stringtemplate RPM as well (hard to find, so I slapped a copy at http://svn.silverhawk.net/files/stringtemplate-3.2.1-3.jpp6.noarch.rpm). I needed to search a bit for one, as it's not in the regular distro, but grab that one.
This should get ALMOST everything. Note that sqlite has to be recompiled. In order to satisfy dependencies, I rebuilt that into an RPM to replace what was there (this one has the option required for forked-daapd). A few others were not found, so I slapped them together, building a number of these RPM's. Currently, the source RPM's are available here :
http://svn.silverhawk.net/files/antlr3-3.1.1-10.el6.src.rpm
http://svn.silverhawk.net/files/libantlr3c-3.1.3-0.2.src.rpm
http://svn.silverhawk.net/files/sqlite-3.6.20-2.el6.src.rpm
You will also want to install the -devel packages for each one once you've built good system packages. You can seamlessly replace any sqlite packages. Note that upgrades might not work with the custom sqlite, but it's easy to grab the source RPM for the upgraded sqlite, add the param, and then upgrade it manually, then the system should update again.
Once those dependencies are installed, you must toss in mxml (available from http://svn.silverhawk.net/files/mxml-2.7.tar (after compiling and installing, copy the mxml.pc file into the appropriate location, mine was /usr/share/pkgconfig/), and then libavl (available from http://alioth.debian.org/~jblache/forked-daapd/libavl_0.3.5.tar.gz) :
- Edit the make file, and Comment out "CFLAGS ?= -O2 -fomit-frame-pointer -pipe -mcpu=i686 -w"
- Add a new CFLAGS Line :
CFLAGS = -fPIC -O2 -fomit-frame-pointer -pipe -Wall -g
- Replace all "$(LIBRARIES)" variables with "$(LIBRARY)" due to a bug.
- Save and Close
- Build and install :
gmake -f GNUmakefile ; gmake -f GNUmakefile install
- mkdir tmp
- cd tmp/
- git clone https://github.com/CBGoodBuddy/forked-daapd.git
- cd forked-daapd
- git checkout itunes_v10_5
- autoreconf -i
- ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-flac --enable-musepack --enable-itunes
- make
- make install
useradd -s /sbin/nologin -M -r -d /var/cache/forked-daapd -c "iTunes service account" daapd
If you get an error about :
ReplyDeletefilescanner_ffmpeg.c:204: warning: "AVMetadata" is deprecated
filescanner_ffmpeg.c: In function "extract_metadata_core":
filescanner_ffmpeg.c:206: warning: "AVMetadataTag" is deprecated
filescanner_ffmpeg.c:225: warning: "av_metadata_get" is deprecated (declared at /usr/include/ffmpeg/libavformat/avformat.h:251)
filescanner_ffmpeg.c: In function "scan_metadata_ffmpeg":
filescanner_ffmpeg.c:312: warning: "av_open_input_file" is deprecated (declared at /usr/include/ffmpeg/libavformat/avformat.h:1480)
filescanner_ffmpeg.c:320: warning: "av_find_stream_info" is deprecated (declared at /usr/include/ffmpeg/libavformat/avformat.h:1526)
filescanner_ffmpeg.c:325: warning: "av_close_input_file" is deprecated (declared at /usr/include/ffmpeg/libavformat/avformat.h:1706)
filescanner_ffmpeg.c:347: error: "CODEC_TYPE_VIDEO" undeclared (first use in this function)
filescanner_ffmpeg.c:347: error: (Each undeclared identifier is reported only once
filescanner_ffmpeg.c:347: error: for each function it appears in.)
filescanner_ffmpeg.c:358: error: \u2018CODEC_TYPE_AUDIO" undeclared (first use in this function)
filescanner_ffmpeg.c:375: warning: "av_close_input_file" is deprecated (declared at /usr/include/ffmpeg/libavformat/avformat.h:1706)
filescanner_ffmpeg.c:397: warning: "av_get_bits_per_sample_format" is deprecated (declared at /usr/include/ffmpeg/libavcodec/avcodec.h:4529)
filescanner_ffmpeg.c:545: warning: "av_metadata_conv" is deprecated (declared at /usr/include/ffmpeg/libavformat/avformat.h:268)
filescanner_ffmpeg.c:576: warning: "av_close_input_file" is deprecated (declared at /usr/include/ffmpeg/libavformat/avformat.h:1706)
Then you probably have an old version of forked-daapd - try something more recent (e.g. 0.18 had the patch for this). It's a result of the ffmpeg-devel libraries being newer than the forked-daapd code you have.
Also, if you have iptables running between you and the client, the rules are :
ReplyDelete# forked-daapd iTunes media server
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3689 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 40306 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 39294 -j ACCEPT
Also, just to quote from a previous post :
ReplyDeleteHey, folks; I was setting up forked-daapd in CentOS 6.2 (64 Bit), and ran into a few problems. One of the most recent was that the libantlr3c was not being used (headers were found). I found that if I add a --enable-64bit to the configure line (I used an RPM spec file), it will create it for 64 bit, which is really what I needed. I realized this when it kept failing to configure the forked-daapd with an error about libantlr3 and a missing function, and when I looked in the config.log for the error, the linker was ignoring the 32 bit libraries. (If you haven't enabled 64 bit, it is 32 by default, and you would have to use a 32 bit compiler by default if you wanted to). So, there is another quick hack.
once I build the new sqlite, how do I install it as there is already an sqlite installed in /usr. Yum only knows about the version that is already there. If we put a different version there than yum knows about, doesn't that break package management?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThe files listed stringtemplate, antlr, libantlr, and sqlite are missing from your site. Livable seems to be gone from the other site, too. Have these anywhere?
ReplyDeleteAfter searching for the files at rpm.pbone.net I am only left with trying to find a working version of http://alioth.debian.org/~jblache/forked-daapd/libavl_0.3.5.tar.gz
ReplyDeleteAnybody?
Otherwise during configure I get
checking avl.h usability... no
checking avl.h presence... no
checking for avl.h... no
configure: error: avl.h not found
Sorry about the migration. I've changed my links. I don't have the debian link, but the rest are good.
ReplyDeleteOnce you have the new sqllite RPM, you can force remove it using a "-e rpm name --force". Then you can reinstall.
Note, I just gave up on forked-daad after the umpteenth recompile of everything after a security patch. I opted for mt-daapd. It has fewer dependencies, and works just as well.
ReplyDelete