Image package

Robert Fong-tom rfongtom at gmail.com
Fri Dec 5 21:47:31 CST 2008


On Dec 5, 2008, at 4:31 PM, Thomas Treichl wrote:

> Robert Fong-tom schrieb:
>> On Dec 4, 2008, at 3:11 AM, Thomas Treichl wrote:
>>> Robert Fong-tom schrieb:
>>>> On Dec 3, 2008, at 4:23 PM, Thomas Treichl wrote:
>>>>> Søren Hauberg schrieb:
>>>>>> ons, 03 12 2008 kl. 12:57 -0500, skrev Robert Fong-tom:
>>>>>>> On Dec 3, 2008, at 2:57 AM, Søren Hauberg wrote:
>>>>>>>
>>>>>>>> tir, 02 12 2008 kl. 21:03 -0500, skrev Robert Fong-tom:
>>>>>>>>> Yes I see the headers. In MacPorts they appear to be in / 
>>>>>>>>> opt/local/
>>>>>>>>> include/ImageMagick. There are also a ton of other files in  
>>>>>>>>> the
>>>>>>>>> "include" directory which may be the includes for the  
>>>>>>>>> dependencies.
>>>>>>>> So, what does the following commands print if you run the  
>>>>>>>> from the
>>>>>>>> terminal
>>>>>>>>
>>>>>>>>   Magick++-config --cppflags
>>>>>>> I get the following:   -I/opt/local/include/ImageMagick
>>>>>>>>   Magick++-config --ldflags
>>>>>>> I get the following:   -L/opt/local/lib -L/opt/local/lib -L/ 
>>>>>>> usr/X11R6/ lib -L/opt/local/lib -lfreetype -lz -Wl,- 
>>>>>>> framework,CoreServices -Wl,- framework,ApplicationServices -L/ 
>>>>>>> opt/local/lib
>>>>>>>> ? Also try to run the from Octave using the 'system'  
>>>>>>>> command, i.e.
>>>>>>>>
>>>>>>>>   system ("Magick++-config --cppflags")
>>>>>>> I get the following:   -I/Applications/Octave.app/Contents/ 
>>>>>>> Resources/ include/ImageMagick
>>>>>>> ans = 0
>>>>>>>>   system ("Magick++-config --ldflags")
>>>>>>> I get:   -L/Applications/Octave.app/Contents/Resources/lib -L/ 
>>>>>>> usr/ X11R6/lib
>>>>>>> ans = 0
>>>>>> Okay, I'm confused. When you run 'Magick++-config --cppflags'  
>>>>>> from the
>>>>>> terminal you get the right path to the header files, but when  
>>>>>> you run
>>>>>> the command from within Octave, you get the wrong path to the  
>>>>>> header
>>>>>> files. Is that right? If so, then I guess this means you have  
>>>>>> to set
>>>>>> some environment variable before starting Octave. I don't even  
>>>>>> know how
>>>>>> to start Octave on a Mac, so I doubt I'll be able to help you.  
>>>>>> Perhaps
>>>>>> we have some Mac-experts on the list, that are able to say  
>>>>>> something
>>>>>> smart?
>>>>>> Søren
>>>>>
>>>>> There must be installed two different versions of ImageMagick  
>>>>> in two different locations. Otherwise the system command  
>>>>> shouldn't produce a different result. The first one is in /opt/ 
>>>>> local/bin that comes with MacPorts, please check from Terminal.app
>>>>>
>>>>>   ~$ which Magick++-config
>>>>  I get  : /opt/local/bin/Magick++-config
>>>>>   ~$ Magick++-config --version
>>>>  I get: 6.4.6 Q16
>>>>>
>>>>> The other one must have been installed manually because I  
>>>>> currently don't pack ImageMagick/GraphicsMagick into the stable  
>>>>> Octave.app 3.0.x versions. And the return argument of the  
>>>>> system command from above is strange. Please check in Octave.app
>>>>>
>>>>>   octave-3.0.3> system ("which Magick++-config")
>>>> I get: /Applications/Octave.app/Contents/Resources/bin/Magick++- 
>>>> config
>>>> ans = 0
>>>>>   octave-3.0.3> system ("Magick++-config --version")
>>>> I get: 6.4.6 Q16
>>>> ans = 0
>>>>>
>>>>> What I've found out some time ago is that the sources of  
>>>>> ImageMagick have been changed from 5.x.x to 6.x.x. I am not  
>>>>> able to find out which version of ImageMagick should be used to  
>>>>> correctly install the Octave-Forge package image-1.0.8.tar.gz.
>>>>>
>>>>> Regards,
>>>>>
>>>>>   Thomas
>>>> You are right about there being two version. Before using  
>>>> MacPorts to port ImageMagick, I made the mistake of installing  
>>>> it manually from the ImageMagick ftp site using the UNIX  
>>>> installation instructions. This did not work with Octave, so I  
>>>> renamed all the ImageMagick directories/files I could find (but  
>>>> did not delete them just in case). I guess there must be some  
>>>> statement in the Octave set-up that is incorrect. Do you know  
>>>> how to fix this?
>>>
>>> I think I don't know exactly what you mean here, but if you need  
>>> a fresh unmodified Octave.app without a 'Magick++-config' program in
>>>
>>>   /Applications/Octave.app/Contents/Resources/bin/Magick++-config
>>>
>>> then why not just moving Octave.app into trash and then install  
>>> it again?
>>>
>>> Regards,
>>>
>>>   Thomas
>> I blew away Octave.app and reinstalled, and now Octave seem to be  
>> getting the location of ImageMagick correctly. However I still am  
>> having problems installing the Image package. The error messages I  
>> get now are:
>> 1) /usr/bin/ld: warning can't open dynamic library: /tmp/ 
>> dependencies-i386/lib/libz.1.dylib referenced from: /Applications/ 
>> Octave.app/Contents/Resources/lib/octave-3.0.3/liboctinterp.dylib  
>> (checking for undefined symbols may be affected) (No such file or  
>> directory, errno = 2)
>> /usr/bin/ld: Undefined symbols:
>> _CloneImageInfo
>> _DestroyImageInfo
>> _GetExceptionInfo
>> _ReadImage
>
> In the file 'src/Makefile' of the package image-1.0.8.tar.gz it is  
> not enough to get back the --cppflags and --ldflags from Magick++- 
> config. At least on a Mac (but I expect this won't make any  
> difference on Linux, too) it is necessary to get back --libs,  
> otherwise the installation of image-1.0.8 fails because of the  
> linker error Bob reported before.
>
> I changed the following line in 'src/Makefile'
>
>   __magick_read__.oct: __magick_read__.cc
>         $(MKOCTFILE) $< `Magick++-config --cppflags` `Magick++- 
> config --ldflags`
>
> into
>
>   __magick_read__.oct: __magick_read__.cc
>         $(MKOCTFILE) $< `Magick++-config --cppflags --ldflags --libs`
>
> and then was able to successfully install image-1.0.8.tar.gz in  
> Octave.app, too.
>
> Bob, I send you a modified package offside any mailing-list. Please  
> try to install that one instead and report back if this works for  
> you so that we can think about making a modification in the sources.
>
> Regards,
>
>   Thomas

Hi Thomas,

The image package you sent me by separate email failed to install  
also. The full output after the "pkg install" command is as follows.

octave-3.0.3:2> pkg install /Users/robert/Desktop/image-1.0.8.tar.gz
/usr/bin/ld: warning can't open dynamic library: /tmp/dependencies- 
i386/lib/libz.1.dylib referenced from: /Applications/Octave.app/ 
Contents/Resources/lib/octave-3.0.3/liboctinterp.dylib (checking for  
undefined symbols may be affected) (No such file or directory, errno  
= 2)
/usr/bin/ld: Undefined symbols:
_gzflush referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gzgetc referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gzputc referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gzread referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gzungetc referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gzwrite referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gzclose referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gzopen referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gzseek referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gztell referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_compress referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_uncompress referenced from liboctinterp expected to be defined in / 
tmp/dependencies-i386/lib/libz.1.dylib
_gzdopen referenced from liboctinterp expected to be defined in /tmp/ 
dependencies-i386/lib/libz.1.dylib
_gzsetparams referenced from liboctinterp expected to be defined in / 
tmp/dependencies-i386/lib/libz.1.dylib
collect2: ld returned 1 exit status
make: *** [__magick_read__.oct] Error 1
error: 'make' returned the following error: mkoctfile __cordfltn__.cc
mkoctfile __bilateral__.cc
mkoctfile __custom_gaussian_smoothing__.cc
mkoctfile bwlabel.cc
mkoctfile bwfill.cc
mkoctfile rotate_scale.cc
mkoctfile hough_line.cc
mkoctfile graycomatrix.cc
mkoctfile deriche.cc
mkoctfile __bwdist.cc
mkoctfile nonmax_supress.cc
mkoctfile __magick_read__.cc `Magick++-config --cppflags --ldflags -- 
libs`
error: called from `pkg:configure_make' in file /Applications/ 
Octave.app/Contents/Resources/share/octave/3.0.3/m/pkg/pkg.m near  
line 1248, column 2

The warning at the start of the output and the error message at the  
end is the same as before but the body changed from my previous  
attempt to install the image package from sourceforge. Hope you can  
determine the problem from this printout.

Bob


More information about the Help-octave mailing list