Compiling Imagemagick: pgCC-Error-Unknown switch

Hello, all,

When I try to compile ImageMagick-6.5.9-0 with pgi_v10. I got the following error:

wmwang@node2:~/meteo/tmp/ImageMagick-6.5.9-0> make > make.log
PGC-W-0089-Array name used in logical expression (magick/distort.c: 432)
PGC-W-0089-Array name used in logical expression (magick/distort.c: 1307)
PGC/x86-64 Linux 10.0-0: compilation completed with warnings
PGC-W-0095-Type cast required for this conversion (magick/module.c: 396)
PGC-W-0095-Type cast required for this conversion (magick/module.c: 396)
PGC/x86-64 Linux 10.0-0: compilation completed with warnings
PGC-W-0089-Array name used in logical expression (magick/morphology.c: 825)
PGC/x86-64 Linux 10.0-0: compilation completed with warnings
PGC-W-0095-Type cast required for this conversion (magick/resource.c: 970)
PGC/x86-64 Linux 10.0-0: compilation completed with warnings
PGC-W-0095-Type cast required for this conversion (magick/utility.c: 1629)
PGC-W-0095-Type cast required for this conversion (magick/utility.c: 1629)
PGC/x86-64 Linux 10.0-0: compilation completed with warnings
PGC-W-0089-Array name used in logical expression (ltdl/ltdl.c: 1268)
PGC-W-0095-Type cast required for this conversion (ltdl/ltdl.c: 1800)
PGC/x86-64 Linux 10.0-0: compilation completed with warnings
pgCC-Error-Unknown switch: --instantiation_dir
make[1]: *** [Magick++/lib/libMagick++.la] Error 1
make: *** [all] Error 2

Could anybody give me a hint on this problem?

Hi freefisher,

This is bug in libtool where it’s treating PGI version “10.0” as version “1.0”. Thye have a patch available that should work around the problem: http://www.mail-archive.com/libtool-patches@gnu.org/msg04958.html.

Hope this helps,
Mat

Hello, Mat, Thanks for your response.

I have visited the webpage that you mentioned. However, I am a bit confused on how to update libtool to solve this problem.

Yours,
Weimin

just like freesfischer, I have the sameproblem, also visited the site, and have no idea how to tackle this… where is the file that need to be modified?

I am getting alot of warning as I try to compile openmpi 1.4.1. I am running PG v10.4:
This kind of warnings while configuring:

checking size of Fortran 90 INTEGER*16... 4
configure: WARNING: *** Fortran 90 INTEGER*16 does not have expected size!
configure: WARNING: *** Expected 16, got 4
configure: WARNING: *** Disabling MPI support for Fortran INTEGER*16
checking if Fortran 90 compiler supports REAL... yes
checking size of Fortran 90 REAL... 4
checking if Fortran 77 and 90 type sizes match... yes
checking if Fortran 90 compiler supports REAL*2... yes
checking size of Fortran 90 REAL*2... 4
configure: WARNING: *** Fortran 90 REAL*2 does not have expected size!
configure: WARNING: *** Expected 2, got 4
configure: WARNING: *** Disabling MPI support for Fortran REAL*2
checking if Fortran 90 compiler supports REAL*4... yes

and this kind of warnings while compiling:

PGC-W-0155-Pointer value created from a nonlong integral type  (./hooks.c: 434)
PGC-W-0095-Type cast required for this conversion (./hooks.c: 449)
PGC-W-0155-Pointer value created from a nonlong integral type  (./hooks.c: 449)
PGC-W-0095-Type cast required for this conversion (malloc.c: 3443)
PGC-W-0155-Pointer value created from a nonlong integral type  (malloc.c: 3443)
PGC-W-0095-Type cast required for this conversion (malloc.c: 3661)
PGC-W-0155-Pointer value created from a nonlong integral type  (malloc.c: 3661)
PGC-W-0095-Type cast required for this conversion (malloc.c: 3786)
PGC-W-0155-Pointer value created from a nonlong integral type  (malloc.c: 3786)
PGC/x86-64 Linux 10.4-0: compilation completed with warnings
PGC-W-0281-Pragma ignored - string expected after #pragma ident  (../opal/util/sys_limits.h: 56)
PGC/x86-64 Linux 10.4-0: compilation completed with warnings
PGC-W-0155-No va_start() seen  (base/notifier_base_open.c: 85)
PGC/x86-64 Linux 10.4-0: compilation completed with warnings
PGC-W-0281-Pragma ignored - string expected after #pragma ident  (runtime/orte_init.c: 60)
PGC/x86-64 Linux 10.4-0: compilation completed with warnings

A Garzon

Hi A. Garzon,

Are you trying to compile Imagemagick or OpenMPI? The libtool version used in OpenMPI 1.4.1 was updated to recognize PGI version 10.0 and above so you should not get the unknown switch error.

As for the configuration warnings, the smallest supported hardware floating-point data size is 32-bits, hence REAL2 is represented in 32-bits instead of 16-bits. Also, INTEGER16 is not a supported data type. These warnings are expected.

For the compiler warnings, while I have not looked at the code, these are most likely correct (they’re most likely missing explicit casts). Warnings are issues that the compiler has detected which may or may not effect the correctness of the code. It’s up to the programmer to investigate (or ignore) these warnings. Please feel free to contact OpenMPI if you have concerns.

  • Mat

I haven’t looked at the build for ImageMagic yet, but some other codes with this build issue have rolled the libtool stuff into the “configure” script.


If you search the “configure” script for:

pgCC\ [1-5] | pgcpp\ [1-5])

(you’ll likely find this about 16,000 lines into the script) then change it to

pgCC\ [1-5]. | pgcpp\ [1-5].)

[notice the addition of the .'s]

this should solve the issue

-dave