anyone compiled ImageMagick (or at least convert?)

Zim

Registered
I'm trying to compile the "convert" util part of ImageMagick so
I can generate some thumbnails on the fly in a cgi-script.

Thanks for any pointers,
Mike
 

blb

`'
What kind of error message(s) are you seeing? I was able to build ImageMagick 5.3.2 with X support (once I built XFree) without any errors; didn't even need to give configure any host-specific options, it recognized OS X as 'powerpc-apple-darwin1.3' perfectly.
If you don't need X support (or don't have XFree installed) you can always build using the '--without-x' option with configure.
 

Zim

Registered
Ah, thank you kind sir, I was unaware that that compile option
might exist.

Here is a different problem (related) maybe you can help me with...
when I grab the sources, I picked the linux ones, (maybe dumb, but
I think with the Mac files, I didn't find source code).

I ended up with ^M's everywhere (in all the source files) which
was causing everything to crap out anyway in the Makefiles, etc.

Which source would you suggest grabbing?

You are correct, I do not need X support, and I have not installed
Xfree86 (I have no strong need and will prob wait for rootless). I just
need the "convert" util from IM, so I can create thumbnails on the fly
from within some perl cgi scripts.

Many thanks,
Mike
 

Zim

Registered
That's what I get for grabbing the linux version, not just the plain
unix version.

Many thanks, it compiled without a hitch.

Mike
 

Zim

Registered
Bah....

Ok, I thought it all worked fine, but to use convert on jpgs, it wants
libjpeg... ok, that's reasonable, I find jpegsrc.v6b-src.tar on
stepwise, download it, compile, make, install-lib, install-headers,
re-run configure --with-jpeg and it finds everything but

checking for jpeg_read_header in -ljpeg... no

poking thru the src in the dist, it looks like the function is there in the
code... I'm not sure how to open libjpeg.a and see if it made it there
(man on ranlib and libtool didn't give me enuf clues).

Help?

:)

Thanks,
Mike
 

blb

`'
Ran into this problem myself for jpg's, png's and tiff's...you need to add some preliminary options when you run configure:

CPPFLAGS="-I/usr/include/jpeg/include" LDFLAGS="-L/usr/include/jpeg/lib" ./configure ...

(that's all one line); just replace /usr/local/jpeg/ with the path to wherever you installed the jpeg stuff. Add more -I... and -L... options in the quotes if you install more libraries.
 

vihung

Guru
I am sure I speak for a lot of people here, but once you have got it working, I think we would all appreciate it if you could post the compiled MacOSX binaries somewhere - possibly the binaries section of the ImageMagick site

The same would go for any other Linux/Unix ported applications
 

Zim

Registered
I'm generally fairly comfortable in unix, but I am a HW guy, not a SW guy,
so my skills in the area of making/building are not so strong (and this is
where unix seems to get even more cryptic than the most cryptic
perl :) ).

The line you posted does not work for me. Its trying to execute CPPFLAGS,
not pass it as a parameter into ./configure.

So I popped open configure in "vi" and added the extra paths to
the lines by hand. (for /usr/local/lib, include)

Anyway, I still get that it finds all the jpeg header files, but fails on
finding the func jpeg_read_header in libjpeg (-ljpeg)...

I've copieg libjpeg.a to the build directory, I've editted the Makefile and
included it there

LIB_JPEG = -l/usr/local/lib/libjpeg.a

thinking that might bypass the configure process... but no dice ;-(

Mike

 

blb

`'
The other way to set CPPFLAGS and LDFLAGS are to simply place them into your environment:

export CPPFLAGS="/what/ever/include"
export LDFLAGS="/what/ever/lib"

for sh/ksh like shells, or

setenv CPPFLAGS "/what/ever/include"
setenv LDFLAGS "/what/ever/lib"

for csh/tcsh; then run configure.

However, if you still have the problem with the library, it might be because you need to run ranlib on it (ran into this as well). Not sure why, but just do 'ranlib libjpeg.a' and try the configure again
 

Zim

Registered
ranlib was the trick!

I did not compile the who app, just wanted convert. Now to tie it
in to my cgi scripts.

Many thanks,
Mike
 
Top