Compiling ImageMagick with Sun CC on Solaris 10

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
mraje

Compiling ImageMagick with Sun CC on Solaris 10

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Compiling ImageMagick with Sun CC on Solaris 10

Post 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.
mraje

Re: Compiling ImageMagick with Sun CC on Solaris 10

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Compiling ImageMagick with Sun CC on Solaris 10

Post 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.
mraje

Re: Compiling ImageMagick with Sun CC on Solaris 10

Post 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.
Post Reply