trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

Re: [trinity-devel] amarok on Arch - Success & Failure (yauap, mtp, riokarma, daap)

From: Darrell Anderson <humanreadable@...>
Date: Sat, 31 Mar 2012 19:46:54 -0700 (PDT)
>   Amarok is again building on Arch. However, the build
> did uncover what are
> probably several bugs in the amarok/amarok/src/mediadevice
> code. I was able to
> build amarok with the following enabled. All options turned
> OFF appear to be
> bugs in the code or in the CMake files that control the
> build for the individual
> options:
> 
>   CXXFLAGS="${CXXFLAGS} -I/usr/include/ruby-1.9.1
> -fpermissive" \
>   cmake ${srcdir}/${pkgname#*-} \
>     -DCMAKE_INSTALL_PREFIX=${TDEDIR} \
>     -DCMAKE_VERBOSE_MAKEFILE=ON \
>     -DWITH_LIBVISUAL=ON \
>     -DWITH_KONQSIDEBAR=ON \
>     -DWITH_XINE=ON \
>     -DWITH_YAUAP=OFF \
>     -DWITH_IPOD=ON \
>     -DWITH_IFP=ON \
>     -DWITH_NJB=ON \
>     -DWITH_MTP=OFF \
>     -DWITH_RIOKARMA=OFF \
>     -DWITH_DAAP=OFF \
>     -DBUILD_ALL=ON
> 
>   I don't know what limitations this imposes on Amarok,
> but 'yauap', 'mtp', 'riokarma' and 'daap' all failed with errors similar to:
> 
> /build/src/amarok/amarok/src/mediadevice/daap/mongrel/http11/http11.c
> /build/src/amarok/amarok/src/mediadevice/daap/mongrel/http11/http11.c:5:18:
> fatal error: ruby.h: No such file or directory
> 
>   That's with the -I/usr/include/ruby-1.9.1 set....
> 
>   But, it's working. Do we want a bug on the remaining
> mediadevice issues?

I don't build any of the media device options because I want a basic music player only. Curious nonetheless, I enabled the options and gave the build a whirl. I see the same failures.

Looking at the build log provides the clues. On my system the ruby headers are installed at /usr/include/ruby-1.9.1, which is where ruby.h is found.

The build log shows the cmake RUBY_INCLUDE_DIR variable is assigned to /usr/lib/ruby/1.9.1/i486-linux, which is the lib directory and not the include directory.

The problem lies in amarok/amarok/src/mediadevice/daap/ConfigureChecks.cmake, which is written for a system with ruby 1.8.x. We ran into these same problems with koffice and tdebindings. The method for using the ruby executable to return the location of the include directory is different for ruby 1.9.x. That is why the cmake provess for Amarok is failing.

Check the patch in bug report 735. The ruby test looks like this:

if test -n "$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
  # Ruby 1.9
  RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'`
  RUBY_VERSION_H=ruby/version.h
else
  # not Ruby 1.9
  RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyincludedir"@:>@)'`
  RUBY_VERSION_H=version.h
fi
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`

Notice the method for returning the location of the include directory is different.

The patch is for automake. Therefore the test will have to be converted to cmake for Amarok --- and any other cmake converted package that needs ruby support.

Otherwise, if you have other Amarok issues, there are two bug reports that you could join: 346 and 818. Or start a new report. :)

Darrell