Discussion:
JMagick installation
kloassie
2006-04-07 08:41:24 UTC
Permalink
Hi people,

I'm trying to install JMagick on a linux machine and am following the guide
given at the JM-site & -distro for doing this. It says:

run './configure'
-> no problem here

run 'make all'
-> error: 'No Makefile'

run 'make install'
-> error: 'No Makefile'

So I tried just 'make' - same result. I'm not very experienced with linux,
does anybody know what I should do different and why this would not be
documented in the 'official' guide??

Thanks in advance,

Klaas
--
View this message in context: http://www.nabble.com/JMagick-installation-t1410843.html#a3799952
Sent from the JMagick forum at Nabble.com.
kloassie
2006-04-07 09:22:45 UTC
Permalink
Problem solved - all 'makefile'-s had to be renamed to 'Makefile' now I only
have to solve the
java.lang.UnsatisfiedLinkError: no JMagick in java.library.path

anybody an idea?

Klaas


- still wondering why the configure script didnt just created 'Makefile'-s
instead of 'makefile'-s && why this solution wasn't documented in the
guide...
--
View this message in context: http://www.nabble.com/JMagick-installation-t1410843.html#a3800430
Sent from the JMagick forum at Nabble.com.
Will Scheidegger
2006-04-07 09:42:52 UTC
Permalink
This means that Java cannot find the JNI library (i.e. the compiled c
classes - libJMagick.so or something lilke that). You can either
extend the java.library.path settings to include the path to the
folder where you have the JNI library or you need to place the
library in one of the folders in java.library.path.

To figure out whats in java.library.path you can add this to your
java code:

System.out.println(System.getProperty("java.library.path"));

Cheers,
Will
Post by kloassie
Problem solved - all 'makefile'-s had to be renamed to 'Makefile' now I only
have to solve the
java.lang.UnsatisfiedLinkError: no JMagick in java.library.path
anybody an idea?
Klaas
- still wondering why the configure script didnt just created
'Makefile'-s
instead of 'makefile'-s && why this solution wasn't documented in the
guide...
--
View this message in context: http://www.nabble.com/JMagick-
installation-t1410843.html#a3800430
Sent from the JMagick forum at Nabble.com.
_______________________________________________
JMagick mailing list
http://www.yeo.id.au/mailman/listinfo/jmagick
Martin Wilson
2006-04-07 10:02:03 UTC
Permalink
You can do this by setting the LD_LIBRARY_PATH environment variable.
Make sure LD_LIBRARY_PATH is set before building ImageMagick. Usually it
should be /usr/local/lib
For example, type:
export LD_LIBRARY_PATH=/usr/local/lib

It also needs to be set when you run Java to use JMagick.

Regards,
Martin

-----Original Message-----
From: jmagick-***@yeo.id.au [mailto:jmagick-***@yeo.id.au] On
Behalf Of Will Scheidegger
Sent: 07 April 2006 10:43
To: kloassie
Cc: ***@yeo.id.au
Subject: Re: [Jmagick] JMagick installation

This means that Java cannot find the JNI library (i.e. the compiled c
classes - libJMagick.so or something lilke that). You can either
extend the java.library.path settings to include the path to the
folder where you have the JNI library or you need to place the
library in one of the folders in java.library.path.

To figure out whats in java.library.path you can add this to your
java code:

System.out.println(System.getProperty("java.library.path"));

Cheers,
Will
Post by kloassie
Problem solved - all 'makefile'-s had to be renamed to 'Makefile' now I only
have to solve the
java.lang.UnsatisfiedLinkError: no JMagick in java.library.path
anybody an idea?
Klaas
- still wondering why the configure script didnt just created
'Makefile'-s
instead of 'makefile'-s && why this solution wasn't documented in the
guide...
--
View this message in context: http://www.nabble.com/JMagick-
installation-t1410843.html#a3800430
Sent from the JMagick forum at Nabble.com.
_______________________________________________
JMagick mailing list
http://www.yeo.id.au/mailman/listinfo/jmagick
kloassie
2006-04-07 12:56:39 UTC
Permalink
Will, Martin,

thanks guys, this makes things a lot more understandable to me.

However I didn't succeed in solving the problem. I've copied all the files
containing "Magick.so" in their name all across the system in the paths that
the java.library.path gave me.

Then also I tried both exporting the DL_LIBRARY_PATH as 'usr/local/lib' and
'usr/lib' before running Java, but both times I kept getting the same
UnsatisfiedLinkException.

A library containing "JMagic" in it's name I couldn't find anywhere on my
system, so I think I probably should have one like that. However it seems
wierd to me, I maybe have to download it from somewhere? Again, I couldn't
find it anywhere on my system, so also not in the directories the configure
and the make's created...

Klaas
--
View this message in context: http://www.nabble.com/JMagick-installation-t1410843.html#a3803091
Sent from the JMagick forum at Nabble.com.
Will Scheidegger
2006-04-07 13:15:19 UTC
Permalink
Post by kloassie
Then also I tried both exporting the DL_LIBRARY_PATH as 'usr/local/
lib' and
'usr/lib' before running Java, but both times I kept getting the same
UnsatisfiedLinkException.
Hm... shouldn't that be "/usr/local/lib" instead of "usr/local/lib"?
Post by kloassie
A library containing "JMagic" in it's name I couldn't find anywhere on my
system, so I think I probably should have one like that. However it seems
wierd to me, I maybe have to download it from somewhere? Again, I couldn't
find it anywhere on my system, so also not in the directories the configure
and the make's created...
That's weird. Well, the file is not called JMagaick, but rather
libJMagick.so or something similar (depends on your system). And
after running "make" you should be able to find it in the same place
where make placed the "JMagick.jar".

hth

-Will
Martin Wilson
2006-04-07 13:21:49 UTC
Permalink
Here are the steps that we take to get ImageMagick/JMagick working on
Linux, compling both from source:

1) Make sure the graphics libraries (TIF, JPEG, etc) are installed
BEFORE building ImageMagick. It's the devel libs that are needed, e.g.
libjpeg-devel and libpng-devel.

2) Make sure LD_LIBRARY_PATH is set before building ImageMagick. Usually
it should be /usr/local/lib
For example, type:
export LD_LIBRARY_PATH=/usr/local/lib

3) Configure ImageMagick with --enable-shared option
./configure --enable-shared

4) Follow the rest of the instructions for making and installing
ImageMagick:
http://www.imagemagick.org/script/advanced-unix-installation.php

5) Make and install JMagick:
http://www.yeo.nu/jmagick/fom-serve/cache/4.html

6) Run your Java program, ensuring that JMagick is in the classpath.

We use Tomcat and to ensure JMagick is in the classpath (for all
webapps) we add it to [java]/jre/lib/ext/

Regards,
Martin

-----Original Message-----
From: jmagick-***@yeo.id.au [mailto:jmagick-***@yeo.id.au] On
Behalf Of kloassie
Sent: 07 April 2006 13:57
To: ***@yeo.id.au
Subject: [Jmagick] RE: JMagick installation


Will, Martin,

thanks guys, this makes things a lot more understandable to me.

However I didn't succeed in solving the problem. I've copied all the
files
containing "Magick.so" in their name all across the system in the paths
that
the java.library.path gave me.

Then also I tried both exporting the DL_LIBRARY_PATH as 'usr/local/lib'
and
'usr/lib' before running Java, but both times I kept getting the same
UnsatisfiedLinkException.

A library containing "JMagic" in it's name I couldn't find anywhere on
my
system, so I think I probably should have one like that. However it
seems
wierd to me, I maybe have to download it from somewhere? Again, I
couldn't
find it anywhere on my system, so also not in the directories the
configure
and the make's created...

Klaas
--
View this message in context:
http://www.nabble.com/JMagick-installation-t1410843.html#a3803091
Sent from the JMagick forum at Nabble.com.

Loading...