All,
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?
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
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 just built Amarok with the following build options:
-DWITH_XINE=ON \ -DWITH_LIBVISUAL=ON \ -DWITH_KONQSIDEBAR=ON \ -DWITH_IPOD=ON \ -DWITH_YAUAP=ON \ <--- -DWITH_NJB=ON \ -DWITH_MTP=ON \ <--- -DWITH_DAAP=OFF \ -DWITH_MP4V2=OFF \ -DWITH_IFP=OFF \ -DWITH_RIOKARMA=OFF \ -DBUILD_ALL=ON || exit 1
DAAP was covered in a previous post about ruby. The MPV42 problem is covered by bug report 346. I don't have the support package installed for IFP. I am not going to try with RIOKARMA because the libkarma libs require the mono overhead.
Darrell
On 03/31/2012 10:12 PM, Darrell Anderson wrote:
I just built Amarok with the following build options:
-DWITH_XINE=ON \ -DWITH_LIBVISUAL=ON \ -DWITH_KONQSIDEBAR=ON \ -DWITH_IPOD=ON \ -DWITH_YAUAP=ON \ <--- -DWITH_NJB=ON \ -DWITH_MTP=ON \ <--- -DWITH_DAAP=OFF \ -DWITH_MP4V2=OFF \ -DWITH_IFP=OFF \ -DWITH_RIOKARMA=OFF \ -DBUILD_ALL=ON || exit 1
DAAP was covered in a previous post about ruby. The MPV42 problem is covered by bug report 346. I don't have the support package installed for IFP. I am not going to try with RIOKARMA because the libkarma libs require the mono overhead.
My curiosity was mainly in building the full package to make sure it built and confirming the code. I concur with riokarma and mono, but dead code hanging off any branch of the GIT tree serves no one. I'll update the bug reports tomorrow. I have to fix my yauap build script on my box before testing that part of the code further. It was actually a great exercise to step though the different build issues and either fix them or run them to the point where I exhausted my knowledge and allowable time.
Thanks for the follow-up and adding to the pool of knowledge I'm drinking from :)
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?
This took a while but I am able to build amarok against both ruby 1.9.x and ruby 1.8.x.
One patch updates ConfigureChecks.cmake to determine the ruby version and return the correct location of ruby.h for each version. This patch is mandatory.
The second patch updates http11.c only when the ruby version is greater than 1.8.x.
Note: I perform the same conditional patching with tdebindings. Refer to bug report 597 for the tdebindings patch.
Here is the link to the mandatory ConfigureChecks.cmake patch:
http://humanreadable.nfshost.com/trinity/patches/amarok/amarok-ruby19-cmake....
Here is the link to the conditional ruby 1.9.x patch:
http://humanreadable.nfshost.com/trinity/patches/amarok/amarok-ruby19.diff
Here is how I run the patches in my amarok build script:
cat $CWD/amarok-ruby19-cmake.diff | patch -p1 --verbose --no-backup-if-mismatch || exit 1
RUBY_VERSION="`ruby --version | awk '{print $2}'`" RUBY_VERSION_SHORT="`ruby --version | awk '{print $2}' | awk -F '.' '{print $1$2}'`" if [ "$RUBY_VERSION_SHORT" -gt "18" ]; then echo "===========================================================" echo "Ruby version=$RUBY_VERSION: Patching for ruby > 1.8.x." echo "===========================================================" echo cat $CWD/amarok-ruby19.diff | patch -p1 --verbose --no-backup-if-mismatch || exit 1 else echo "===========================================================" echo "Ruby version=$RUBY_VERSION: Not patching for ruby > 1.8.x." echo "===========================================================" echo fi
I run the same test for tdebindings, albeit with different patches.
At this point I have successfully built amarok with all options except RIOKARMA.
After somebody tests the patches, I will push the mandatory cmake patch. I can't push the conditional patch because many people still use ruby 1.8. I don't know how to merge such a conditional patch anyway.
Darrell