Closed holleB closed 6 years ago
I'm having the same problems on FreeBSD 8.1-RELEASE
Same issue here on FreeBSD 8.1-STABLE, I installed libunistring from sources, and that worked, fine, but even though I specify --with-libunistring-prefix=/usr/local I can't find it. (I've verified that libunistring is installed to /usr/local/lib). output from ls: $ ls -l /usr/local/lib | grep unistring -rw-r--r-- 1 root wheel 5280722 Sep 3 01:56 libunistring.a -rwxr-xr-x 1 root wheel 1009 Sep 3 01:56 libunistring.la lrwxr-xr-x 1 root wheel 17 Sep 3 01:56 libunistring.so -> libunistring.so.1 -rwxr-xr-x 1 root wheel 2950870 Sep 3 01:56 libunistring.so.1
I downloaded the sources from git, then copied the src/pregen folder from the tarball sources into the git sources. I then modified configure.in and changed the CFLAGS variable to:
CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib -Wall -D_LARGEFILE_SOURCE"
then I ran:
autoreconf -i -Wno-portability
and then:
./configure
and I was able to get it to detect GNU libunistring and GNU libiconv. Since then, I've steadily worked at installing other library dependencies. Remember, libavl is not the GNU or FreeBSD ports version, you must download it from a site like: http://www.debian.co.il/debian/pool/main/liba/libavl/libavl_0.3.5.orig.tar.gz
and modify the GNUconfig file to remove the mcpu= option from the CFLAGS and also modify the install portion to install into the correct areas and make the correct symlinks. I had to uninstall GNU libavl and the FreeBSD libavl and create a symlink in /usr/lib back to /usr/local/lib/ port before I was able to get configure to detect the correct version of libavl.
lrwxr-xr-x 1 root wheel 28 Sep 6 22:18 libavl.so@ -> /usr/local/lib/libavl.so.1.5
I really hope libavl is replaced or removed in the future, it's a pain to get working and looks like it will conflict with the real version of libavl (GNU or FreeBSD port) if you use software that relies on it.
Remember, if the dependency you are compiling is giving you an error, try using gmake (GNU make) rather than FreeBSD's make.
I managed to get through configure, but it still doesn't compile.
raop.c includes
SorcererX,
I'm pretty sure you can overcome that last error on line 1837 of raop.c by changing:
IN6_ARE_ADDR_EQUAL(sa.sin6.sin6_addr.s6_addr32, rs->sa.sin6.sin6_addr.s6_addr32)
to
IN6_ARE_ADDR_EQUAL(sa.sin6.sin6_addr, rs->sa.sin6.sin6_addr)
Maybe the change could be wrapped in #ifdefs, like:
#if defined(__linux__)
if ((rs->sa.ss.ss_family == AF_INET6)
&& IN6_ARE_ADDR_EQUAL(sa.sin6.sin6_addr.s6_addr32, rs->sa.sin6.sin6_addr.s6_addr32))
break;
#elif defined(__FreeBSD__)
if ((rs->sa.ss.ss_family == AF_INET6)
&& IN6_ARE_ADDR_EQUAL(sa.sin6.sin6_addr, rs->sa.sin6.sin6_addr))
break;
#endif
Damn these macros, only bring more trouble. That's just a wrapper to memcmp. In Linux, it uses the s6_addr32 union member so it's 4 32-bit integer comparisons. The reason it fails with that message in FreeBSD is that s6_addr32 is a macro itself (so the compiler isn't required to support anonymous unions?) and its use as a macro argument doesn't work.
If I was the author, I would replace the whole thing with a memcmp of sin6_addr instead of using a BSD-inspired macro that no-one is willing to standardize.
I'm having trouble getting past configure... I know too little about autoconf. Can you help?
Did anyone finally manage to install forked-daapd on FreeBSD 8.1? If so, could you please post a little howto?
Here is what I did to install forked-daapd on my FreeBSD 8.2 box. It definitely took quite some time to gather all the dependencies and figure out how to build them. So hopefully this helps others that want to do the same.
Get port management tools
$ cd /usr/ports/ports-mgmt/portupgrade
$ make install clean
Install necessary packages. (This list is probably not complete.)
$ portinstall oss
$ portinstall libconfuse
$ portinstall ffmpeg
$ portinstall mxml
$ portinstall libevent
$ portinstall flac # for --enable-flac
$ portinstall taglib # for --enable-musepack
$ portinstall libplist # for --enable-itunes
$ portinstall dbus
$ portinstall avahi
$ portinstall avahi-app
Install Java (for antlr3). This was kinda tricky because I had to Google the tar archives and put them manually in /usr/ports/distfiles (due to licensing issues)
$ cd /usr/ports/java/jdk14
$ make install clean # you have to do this one multiple times and download the requested tar files in /usr/ports/distfiles
$ export WORKDIR=/usr/local/src/forked-daapd
$ mkdir -p $WORKDIR
$ cd $WORKDIR
$ cd $WORKDIR
$ curl -O http://www.debian.co.il/debian/pool/main/liba/libavl/libavl_0.3.5.orig.tar.gz
$ tar xzvf libavl_0.3.5.orig.tar.gz
$ cd avl-0.3.5
$ gcc -O2 -fomit-frame-pointer -pipe -w -fPIC -o avl.o -c avl.c && ar -rc libavl.a avl.o
$ cd $WORKDIR
$ mkdir antlr3 && cd antlr3
$ curl -O http://www.antlr.org/download/antlr-3.3-complete.jar
$ echo '#!/bin/sh' > antlr3
$ echo exec /usr/local/bin/java -cp $WORKDIR/antlr3/antlr-3.3-complete.jar org.antlr.Tool \"\$@\" >> antlr3
$ chmod u+x antlr3
$ export PATH="$PATH:$WORKDIR/antlr3"
$ cd $WORKDIR
$ curl -O http://www.antlr.org/download/C/libantlr3c-3.3-SNAPSHOT.tar.gz
$ tar xzvf libantlr3c-3.3-SNAPSHOT.tar.gz
$ cd libantlr3c-3.3-SNAPSHOT
$ ./configure --disable-antlrdebug --disable-abiflags --disable-dependency-tracking --enable-shared=no
$ gmake
$ cd $WORKDIR
$ git clone https://github.com/jasonmc/forked-daapd.git # or download a tarball from https://github.com/jasonmc/forked-daapd/tarball/master
$ cd forked-daapd
$ autoreconf -i -Wno-portability
$ CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib -Wall -D_LARGEFILE_SOURCE -I$WORKDIR/avl-0.3.5 -L$WORKDIR/avl-0.3.5 -I$WORKDIR/libantlr3c-3.3-SNAPSHOT/include -I$WORKDIR/libantlr3c-3.3-SNAPSHOT -L$WORKDIR/libantlr3c-3.3-SNAPSHOT/.libs" ZLIB_LIBS="-L/lib -lz" ZLIB_CFLAGS="-I/usr/include" ./configure --localstatedir=/var --enable-flac --enable-musepack --enable-itunes --with-oss4=/usr/local/lib/oss/include/sys --disable-dependency-tracking
$ gmake install
$ cp forked-daapd.conf /usr/local/etc # edit the conf file to your liking; especially 'directories' directive
$ pw groupadd daapd
$ pw useradd daapd -g daapd -s /sbin/nologin -d /path/to/your/music
$ chown daapd:daapd /var/cache/forked-daapd
$ echo 'oss_enable="YES"' >> /etc/rc.conf
$ echo 'dbus_enable="YES"' >> /etc/rc.conf
$ echo 'avahi_daemon_enable="YES"' >> /etc/rc.conf
$ echo 'forked_daapd_enable="YES"' >> /etc/rc.conf
$ cat > /usr/local/etc/rc.d/forked-daapd
#!/bin/sh
# PROVIDE: forked-daapd
# REQUIRE: avahi_daemon dbus
# Add the following lines to /etc/rc.conf to enable `forked-daapd':
#
# forked_daapd_enable="YES"
# forked_daapd_flags="<set as needed>"
. /etc/rc.subr
name="forked_daapd"
rcvar=`set_rcvar`
command="/usr/local/sbin/forked-daapd"
command_args=""
pidfile="/var/run/forked-daapd.pid"
required_files="/usr/local/etc/forked-daapd.conf"
# read configuration and set defaults
load_rc_config "$name"
: ${forked_daapd_enable="NO"}
run_rc_command "$1"
^D
$ chmod u+x /usr/local/etc/rc.d/forked-daapd
If everything worked you should now be able to start all services:
$ /usr/local/etc/rc.d/oss start
$ /usr/local/etc/rc.d/dbus start
$ /usr/local/etc/rc.d/avahi-daemon start
$ /usr/local/etc/rc.d/forked-daapd start
How did you manage to get it to find libunistring?
libunistring is in the ports tree, so it is quite simple.
configure can't find libunistring on MacOS X. I'v installed libunistring locally at ~/tmp_libs and start ./configure --with-libunistring-prefix=~/tmp_libs and the configure start ends with checking for libunistring... no, consider installing GNU libunistring checking for libunistring... no, consider installing GNU libunistring configure: error: GNU libunistring is required Setting CFLAGS manually to include the libunistring include and lib dir works fine however.
Greetings