Saturday, April 30, 2011

Installing Rawstudio 2.0 from source on OpenSuSE 11.4

Rawstudio is an open-source program to read and manipulate RAW images from digital cameras. The latest version (2.0) is not yet available in the repositories so I decided to download the source version and follow the documented installation procedure.

This is the general documentation from the rawstudio website...

Installing from source

$ tar xfz rawstudio-x.y.tar.gz
$ cd rawstudio-x.y
$ ./configure
$ make
$ sudo make install


The code is not complete because there are some dependencies.
Before you can compile you need a gcc compiler and the rawstudio code itself also relies on other software libraries that need to be installed. Below are the steps I followed for building it.

- Download the source package from here.
- Now open a terminal and enter the following commands.

$ sudo zypper in gcc gcc-c++ make libjpeg62-devel libtiff-devel libxml2-devel libssl-devel libcurl-devel 
$ sudo zypper in dbus-devel libgphoto2-devel gconf-devel gtk2-devel gconf2-devel lensfun-devel 
$ sudo zypper in lcms-debel lcms-devel exiv2-devel libexiv2-devel liblcms-devel 
$ sudo zypper in sqlite3-devel libopenssl-devel libopenssl-devel fftw3-devel

- Some packages are not available in the default repositories, but zypper can handle this...

$ sudo zypper in http://download.opensuse.org/repositories/network:/utilities/openSUSE_11.4/x86_64/libflickcurl0-1.21-1.1.x86_64.rpm
$ sudo zypper in http://download.opensuse.org/repositories/network:/utilities/openSUSE_11.4/x86_64/libflickcurl-devel-1.21-1.1.x86_64.rpm
$ cd $HOME/Downloads
$ tar xfz rawstudio-2.0.tar.gz
$ cd rawstudio-2.0
$ ./configure
$ make
$ sudo make install
$ sudo /sbin/ldconfig

- Now you will see the application appear in the menu's

- Time to start the digital workflow... enjoy

8 comments:

  1. Thank you for sharing this KDW!

    Trying to configure this on my own got me into a dependency hell but everything went smoother trying your method :)
    I missed gcc c++ but with this in place everything worked out perfect.
    I was not able to "sudo ldconfig" but had to become root first and then run ldconfig doh..

    .:Tore

    ReplyDelete
  2. thank you for the feedback, I updated the post to correct the errors.

    ReplyDelete
  3. Based on this good explanation given above one can slightly modify the spec file which exists for version 1.2 (URL=https://build.opensuse.org/package/view_file?file=rawstudio.spec&package=rawstudio&project=openSUSE%3AFactory%3AContrib&srcmd5=19ebe21ca1f7c09bc3236fd92f8f7967)

    Then one would do

    rpmbuild -ba /usr/src/packages/SPECS/rawstudio.spec

    _______________
    Add these lines to the %files section in the spec file.

    %{_prefix}/include/%{name}
    %{_prefix}/lib64/lib%{name}*
    %{_prefix}/lib64/pkgconfig/%{name}-%{version}.pc
    %{_prefix}/share/rawspeed/cameras.xml

    and update %changelog.

    ReplyDelete
  4. Sorry for being sloppy. Naturally you need to update line

    Version: 1.2

    to

    Version: 2.0

    And the line

    %{_prefix}/include/%{name}

    should be in fact

    %{_prefix}/include/%{name}-%{version}

    ReplyDelete
  5. Very helpful and worked. I had several goes at getting version 2.0 RawStudio installed before seeing this post. Thanks for documenting this. Cheers, Joe.

    ReplyDelete
  6. My attempt to copmpile fails at this point...

    photo2_port -lm -lexif -lusb -lX11 -pthread -pthread -Wl,-soname -Wl,output_facebook.so -o .libs/output_facebook.so

    /usr/lib/libxml2.so: could not read symbols: File in wrong format

    collect2: ld returned 1 exit status

    make[3]: *** [output_facebook.la] Error 1

    ReplyDelete
  7. @Michael: Make sure you install the correct dependent packages (32-bit vs 64-bit!)

    ReplyDelete
  8. I did that -- but no luck. However, I did find a build in OpenSuse's repositories:

    http://download.opensuse.org/repositories/home:/sergeyopensuse/openSUSE_11.4/

    This installs fine (if one adds the repository temporarily, at least). But I do have problems with this crashing.

    FWIW, I also found a build of the new version of rawtherapee:

    http://download.opensuse.org/repositories/home:/olivierkes/openSUSE_11.4/

    Curiously, this also tends to crash more often than one would like. ;~{

    ReplyDelete