Posts mit dem Label RMagick werden angezeigt. Alle Posts anzeigen
Posts mit dem Label RMagick werden angezeigt. Alle Posts anzeigen

Donnerstag, 22. Mai 2008

Traps falls installing things, addons and packages

It turns out that using preconfigured binaries and packages are waste of time.
For example. i install ruby using:

useraccount> pfexec pkg install ruby-dev

The package was compiled on the SUN cc compiler - which is fine, but.....
the setup.rb file of the ruby system has all the environment variables set from the machine it was compiled on - and not mine. Editing that file by hand to adapt the environment to my machine is a night mare.

The RMagick gem and for that matter the source code both look at the environment in the setup.rb file and because nothing in there is relevant to my machine the install fails.

useraccount> pfexec uninstall ruby-dev
useraccount> su
superuseraccount> pfexec rm -r /ruby

So the only way to do this properly is uninstall the ruby pkg, get rid of the installation from my file system, down load the source and compile it again.

useraccount> cd /export/home/tmp
useraccount>pfexec wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p110.tar.bz2
useraccount>pfexec bunzip2 -dc ruby-1.8.6-p110.tar.bz2 | tar xf -

Dienstag, 20. Mai 2008

Installing RMagick and ImageMagick

OK this took a day to find out.
RMagick wraps around ImageMagick so you need both of them.
To install ImageMagic you need perl - which is fine but you won't be able to install (configure and make) if perl has been compiled with a c compiler from sun. It throws out -KPIC for gcc and it should send gcc a -fPIC when compiling.

So move rename perl link in the /usr/bin and the the perl root directory wherever that might be forexample /perl

get the stable perl source code from perl.com and download it
useraccount> pfexec tar xvf perl_download
useraccount> pfexec perl_download
useraccount> pfexec ./Configure
useraccount> pfexec make
useraccount> pfexec make test
useraccount> pfexec make install

perl should now be in /opt/bin/perl with a link to it from /usr/bin

Once you have done that download ImageMagick source files
useraccount> pfexec tar xvf ImageMagick
useraccount> cd ImageMagick
useraccount> pfexec ./configure --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 CC=gcc
useraccount> pfexec make
useraccount> pfexec make install

ImageMagick should now be in /usr/local/bin

Then test it with
useraccount> /usr/local/bin/convert logo: logo.gif

I did most of the above based on the info here and here