Installation on OS X Server

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
bayesian

Installation on OS X Server

Post by bayesian »

I have been trying to install ImageMagick on a OS 10.4.9 server that I use without success. I installed it on a non server version of the os following the given instructions and it works perfectly.
I am stuck when it comes to the server install. If anyone has any advice for me, it would be appreciated.

Below is the output from the attempt to install and run the convert procedure:

Code: Select all

cauchy:/usr/local admin$ sudo gzip -dc ImageMagick-universal-apple-darwin8.9.1.tar.gz | sudo tar -xf -
cauchy:/usr/local admin$ export MAGICK_HOME="/usr/local/ImageMagick-6.3.4"
cauchy:/usr/local admin$ $MAGICK_HOME
-bash: /usr/local/ImageMagick-6.3.4: is a directory
cauchy:/usr/local admin$ export PATH; PATH="$MAGICK_HOME/bin:$PATH"
cauchy:/usr/local admin$ export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"
cauchy:/usr/local admin$ convert logo: logo.gif
dyld: Library not loaded: /usr/X11R6/lib/libXext.6.dylib
  Referenced from: /usr/local/ImageMagick-6.3.4/bin/convert
  Reason: image not found
Trace/BPT trap
cauchy:/usr/local admin$ $PATH
-bash: /usr/local/ImageMagick-6.3.4/bin:/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin: No such file or directory
cauchy:/usr/local admin$ $DYLD_LIBRARY_PATH
-bash: /usr/local/ImageMagick-6.3.4/lib: is a directory
My feeling is that this is an ownership permission problem but I didn't see a post that referenced this problem.
aberkvam

Re: Installation on OS X Server

Post by aberkvam »

I am getting an almost identical error running from an AppleScript Studio application.

Code: Select all

dyld: Library not loaded: /usr/X11R6/lib/libXext.6.dylib

Referenced from: /Applications/WillyShoot.app/Contents/Resources/ImageMagick-6.3.4/bin/convert

Reason: image not found (133)
It worked fine on my development Mac but it failed on the client Mac.

The hint is the "X11R6" in the error. It looks like ImageMagick 6.3.4 requires X11 to be installed. (My development Mac has X11 while the client Mac does not, which is why it worked on mine but not theirs.) The ImageMagick download area states, "Note, the display program requires the X11 server available on your Mac OS X installation DVD," but this appears to be incorrect since you and I are getting the error in the "convert" program.

Oddly enough, my app worked fine before I upgraded to IM 6.3.4. I downgraded my app to 6.3.2 and it worked fine. No X11 dependencies.

Does anyone know why IM 6.3.4 requires X11 now? Is it really needed?
bayesian

Re: Installation on OS X Server

Post by bayesian »

Thanks aberkvam,

It looks like the X11 libraries are now needed for the convert process.

I joined the ADC (free level) to download X11 as part of the Xcode tools and found that it still didn't work (different X11R library error: X11R6/lib/libXext.6.dylib). I compared the libraries from the client version of X11 and the Xcode verstion and found a huge difference in libraries. Using the libraries from the client version X10.4 dvd on the 10.4.9 server I was able to complete my first ImageMagick task; "convert logo: logo.gif".

Thanks again.
aberkvam

Re: Installation on OS X Server

Post by aberkvam »

I am almost positive that X11 doesn't come with XCode. The X11 SDK does though. The SDK lets you write programs that use X11 but it doesn't actually let you run those applications. To run them, you need it install X11 itself, which is what you did from the Tiger DVD. XCode and the X11 SDK shouldn't be needed.

While I'm glad it worked for you, I am still not sure why IM's convert program needs X11.
aberkvam

Re: Installation on OS X Server

Post by aberkvam »

I downloaded the latest version (ImageMagick-6.3.5) today and X11 is still a requirement for convert. Looks like I'm still stuck with using 6.3.2...
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Installation on OS X Server

Post by magick »

Try downloading/installing ImageMagick from Mac Ports at http://www.macports.org . It will automatically download and build from source in your environment ensuring it works on your Mac after it builds. The command to build is something simple like `port install ImageMagick'.
aberkvam

Re: Installation on OS X Server

Post by aberkvam »

I am using ImageMagick in an AppleScript Studio application. My Mac has X11 installed. But I need to be able to distribute the application to other Macs in our organization that don't have X11 installed. So if it would be built to my environment, that wouldn't work for me.

Potential solutions?:
  • Install MacPorts on a Mac without X11 and build a custom version of ImageMagick. Right now this is more trouble than it's worth since 6.5.2 is working for me.
  • Configure the build process somehow to ignore the presence of X11. I am not sure if this would be possible with the MacPorts build process.
  • Continue using 6.5.2 and upgrade if/when the pre-built convert binary doesn't require X11.
Thank you for the suggestion though.

Andy
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Installation on OS X Server

Post by anthony »

In such an environment you typically build in on a 'test bench' machine that is exactly the same as the other machine you will be distributing to.

Build it on one of the destination machines if you don't have a test bench machine.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
cshannon

Re: Installation on OS X Server

Post by cshannon »

I'm having a similar problem, and I've yet to find a solution. I'm not using OSX Server though. I'm using my macbook pro running 10.4.10 as the "server " for building and deploying websites.

I installed imagemagick using Macports, which installed the binaries in /opt/local/bin/

I then learned I needed X11 .... of course, after an hour of searching, I could not find my Tiger Installer DVD with 10.4 X11 on it. It's just not anywhere it's supposed to be. This ended my day badly.

Luckily, today, I was able to find a web site that has the installs.

So, I installed X11SDK, X11 (2003) and Apple's X11 Update (2006).

I go back to the terminal, and type:

Code: Select all

$convert logo: logo.gif
And here's what I get:

Code: Select all

dyld: Library not loaded: /usr/X11R6/lib/libXt.6.dylib
  Referenced from: /opt/local/bin/convert
  Reason: Incompatible library version: convert requires version 6.1.0 or later, but libXt.6.dylib provides version 6.0.0
Trace/BPT trap
I've found other forums where a user has experienced this, but never a solution for the user.

Any ideas? X11 definitely works. I have to think the issue is with ImageMagick, or at least the Macports install of IM.

Should I reinstall IM from source? If so, is there a recommended "uninstall" procedure?

Any help or useful suggestion is appreciated. Thanks.

The IM version is ImageMagick/6.3.5-9_0+darwin_8.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Installation on OS X Server

Post by anthony »

Sounds like your mac is not quite settled with its new libraries. Not sure as to fix as I don't use a mac. prehasp Fred Weinhaus can help..
http://www.fmwconcepts.com/imagemagick/
or forum user "fmw42", as he is also a heavy IM user on MacOSX, though does not use X windows I don't think.

is there a command like ldconfig than might need to be run to settle the new libraries?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
cshannon

Re: Installation on OS X Server

Post by cshannon »

Ok, I figured it out. Thanks, Anthony, for the recommendation.

It occurred to me as I was reading your response that I forgot an important item. I had installed IM _before_ I had installed X11, because I only learned I needed X11 after installing MacPorts and IM. Ugh.

So, I did this:

Code: Select all

sudo port uninstall ImageMagick
moments later, no more IM on Mac :(

just to be safe, I rebooted OS X. Then, once back up ...

Code: Select all

sudo port install ImageMagick
IM is back :D

The first time I installed IM via MacPorts, it took forever, but claimed success. This time, it only took a few moments, and the install output messages were much cleaner.

Code: Select all

convert logo: logo.gif
identify logo.gif
display logo.gif
First two commands worked with no lib errors, last one didn't:

Code: Select all

display: unable to open X server `'.
Hmmm.

Then I leanred that on OS X, one has to set the DISPLAY variable to use the proper X server.

Code: Select all

export DISPLAY=":0.0"
and then ...

Code: Select all

display logo.gif
Voila! It hella works!

So, in case anyone out there has this problem with ImageMagick on OS X, the simple answer is:

You have to install X11 first, THEN ImageMagick. Set your DISPLAY variable in the terminal window.

Ok, no I can take off the amateur laptop admin hat and go back to web development. Thanks all!
Post Reply