Page 1 of 1

Compiling ImageMagick with Sun CC on Solaris 10

Posted: 2007-08-03T07:17:36-07:00
by mraje
Hi All

I'm trying to compile ImageMagick 6.3.5 code on Solaris 10 using Sun Studio 12 compiler. Wasn't able to find any steps enlisting the same. The './configure' does it with gcc by default.

I tried doing -
./configure CC=/opt/SUNWspro/bin/CC

However, it failed during configure stating unable to determine size of short.

Any pointers on the exact configure options I have to give to make ImageMagick compile with Sun CC compiler ?

Many thanks,
Manish.

Re: Compiling ImageMagick with Sun CC on Solaris 10

Posted: 2007-08-03T07:56:39-07:00
by magick
Look carefully at config.log and search for where the size of short is being determined. Some sort of hint why it failed should be in the log file.

Re: Compiling ImageMagick with Sun CC on Solaris 10

Posted: 2007-08-03T20:27:24-07:00
by mraje
Hi

I got this going by running configure as -
./configure CC=/opt/SUNWspro/bin/CC CXX=/opt/SUNWspro/bin/CC

Earlier, configure was taking g++ as the C++ compiler and CC as the C compiler. Specifying explicitly solved the issue.

However, now running into a compilation problem. I get a compiler error as -
CC: Warning: Option -pthreads passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Specify a supported level of optimization when using -xopenmp, -xopenmp will not set an optimization level in a future release. Optimization level changed to 3 to support -xopenmp.
"magick/blob.c", line 3384: Error: Formal argument 1 of type char* in call to msync(char*, unsigned, int) is being passed unsigned char*.
"magick/blob.c", line 3489: Error: Formal argument 1 of type char* in call to munmap(char*, unsigned) is being passed void*.
2 Error(s) detected.
gmake: *** [magick/magick_libMagick_la-blob.lo] Error 1
bash-2.03$
Has ImageMagick been compiled with Sun CC compiler ?
Please advise, we are using ImageMagick for one of our critical projects.

Thanks,
Manish.

Re: Compiling ImageMagick with Sun CC on Solaris 10

Posted: 2007-08-03T20:41:24-07:00
by magick
Other OS's define msync() and munmap() to have void parameters. We can put a conditional define for Sun CC if you post a preprocessor symbol we can reliably use to uniquely identify the SUN CC compiler.

Re: Compiling ImageMagick with Sun CC on Solaris 10

Posted: 2007-08-06T05:25:10-07:00
by mraje
Hi

I got this working by running configure as -
./configure CC=/opt/SUNWspro/bin/cc CXX=/opt/SUNWspro/bin/CC

Used Sun C compiler as a C compiler and C++ compiler as a C++ compiler.
Earlier I was using Sun's C++ compiler to compile C files as well which caused stricter checking.

Thanks,
Manish.