Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4092 ImageMagick 6.5.8.10 with better Leopard support

open
nobody
5
2012-03-03
2012-03-03
Peter Dyballa
No

Does this package have OS version restrictions? Probably not. It built on PPC 10.4 and 10.5 and on intel 10.6.
Which section does it belong in? graphics
Have you built it with -m --build-as-nobody? Yes, on all three platforms, the -nox and also the plain variant.

The main difference is the use of "CC=gcc-4.2 CXX=g++-4.2" as additional configure parameters. On Leopard, Mac OS X 10.5, this is necessary to ensure the use of OpenMP because here Fink is playing foul and prepending /sw/var/lib/fink/path-prefix-g++-4.0 to PATH so that the faulty /sw/var/lib/fink/path-prefix-g++-4.0/c++ shell script is used which resets the compiler to g++-4.0. This lets the statement

make CCLD=g++

fail because now a different and older compiler is used than during the configure step which cannot use the OpenMP interface and so the build fails, as Dominique and I reported. So this make invocation is better reset to plain 'make'.

• On Tiger this setting plays no role, the compilers are too dumb – except, maybe, one tries to use a Fink gcc4[2-6] package for compilation.

• On Lion it also plays no role, the compilers are modern and up-to-date.

• On Snow Leopard Fink also changes PATH but here the Fink wrapper scripts keep the compiler version. So when GCC 4.2 is active the OpenMP interface and libgomp are found and used. When GCC 4.0 is used then OpenMP is not found and also no libgomp. Compilation succeeds always.

Using for example

if [ `sw_vers -productVersion|cut -f2 -d.` == 5 ] ; then export CC=gcc-4.2 CXX=g++-4.2 ; fi

the OpenMP aware compilers are enabled only for Leopard.

I also substituted the old and not working ("unknown option") "--enable-libtool-verbose" with "--disable-dependency-tracking --disable-silent-rules" – the latter option makes the compilation verbose again.

Another change is that the -nox variant uses --without-openexr because the utilities (binaries) could not be built on Leopard (PPC) and Snow Leopard (intel, Sandy Bridge). Finally the fourth "DocFiles: LICENSE README.txt ChangeLog NEWS.txt" statement was commented: with HFSX and this line enabled the packages do not build.

The PATCH file just takes into account changed path names to the files.

ImageMagick 6.5.8 can be built in parallel:

177.686u 60.873s 4:24.44 90.2% 0+0k 356+1938io 0pf+0w imagemagick 1 CPU
344.772u 92.014s 2:06.66 344.8% 0+0k 391+1391io 0pf+0w imagemagick 8 CPU
141.639u 30.915s 3:07.02 92.2% 0+0k 770+1115io 0pf+0w imagemagick-nox 1 CPU
245.789u 40.249s 1:45.23 271.8% 0+0k 1422+767io 0pf+0w imagemagick-nox 8 CPU

The output from dpkg -L is not available because the package is already updated with another one, one up-to-date.

Discussion

  • Peter Dyballa
    Peter Dyballa
    2012-03-03

    imagemagick.info 6.5.8.10-3

     
    Attachments
  • To specify CC=gcc-4.2 CXX=g++-4.2 you also need a BuildDepends: xcode (>=3.1), as Xcode 3.0.x didn't have GCC-4.2

     
    • milestone: 373615 --> Awaiting_Update_from_Submitter
     
  • Peter Dyballa
    Peter Dyballa
    2012-03-05

    This could be a bad idea! Setting GCC 4.2 as compiler for ImageMagick on Leopard leeds to this line in ImageMagick.pc:

    Cflags: -I${includedir} -fopenmp

    The standard GCC 4.0 does not understand this option, so it will certainly break a build when it is being used instead of GCC 4.2.

    These packages have on Leopard do BuildDepend on ImageMagick:

    /sw/fink/dists/stable/main/finkinfo/devel/forttopas.info
    /sw/fink/dists/stable/main/finkinfo/gnome/gollage.info
    /sw/fink/dists/stable/main/finkinfo/graphics/autotrace.info
    /sw/fink/dists/stable/main/finkinfo/graphics/frontline.info
    /sw/fink/dists/stable/main/finkinfo/graphics/inkscape.info
    /sw/fink/dists/stable/main/finkinfo/graphics/pstoedit.info
    /sw/fink/dists/stable/main/finkinfo/graphics/tango-icon-theme.info
    /sw/fink/dists/stable/main/finkinfo/graphics/unweave.info
    /sw/fink/dists/stable/main/finkinfo/graphics/vips.info
    /sw/fink/dists/stable/main/finkinfo/graphics/xrmap.info
    /sw/fink/dists/stable/main/finkinfo/kde/kallery.info
    /sw/fink/dists/stable/main/finkinfo/kde/kipi-plugins.info
    /sw/fink/dists/stable/main/finkinfo/kde/koffice.info
    /sw/fink/dists/stable/main/finkinfo/libs/libxine1.info
    /sw/fink/dists/stable/main/finkinfo/libs/perlmods/perlmagick-pm.info
    /sw/fink/dists/stable/main/finkinfo/sci/dx.info
    /sw/fink/dists/stable/main/finkinfo/sci/gdl.info
    /sw/fink/dists/stable/main/finkinfo/sci/gri.info
    /sw/fink/dists/stable/main/finkinfo/sci/image-oct305.info
    /sw/fink/dists/stable/main/finkinfo/text/cuneiform.info
    /sw/fink/dists/stable/main/finkinfo/utils/libdmtx.info
    /sw/fink/dists/stable/main/finkinfo/utils/transcode.info
    /sw/fink/dists/stable/main/finkinfo/utils/zbar.info
    /sw/fink/dists/stable/main/finkinfo/web/asp2php.info
    /sw/fink/dists/unstable/main/finkinfo/graphics/converseen-mac.info
    /sw/fink/dists/unstable/main/finkinfo/graphics/converseen-x11.info
    /sw/fink/dists/unstable/main/finkinfo/graphics/opengtl.info
    /sw/fink/dists/unstable/main/finkinfo/web/virtuoso.info

    None of them sets "gcc" or "g++" as compiler, so it cannot happen that when GCC 4.2 is set as gcc and cc and g++ default on Leopard that it being reset by Fink to GCC 4.0. I'll check the situation with xrmap, pstoedit, pstoedit, and of course inkscape.

     
  • Peter Dyballa
    Peter Dyballa
    2012-03-05

    Here is an example of the failures that can happen when gcc and g++ are set to gcc-4.2 resp. g++-4.2:

    PATH: /sw/var/lib/fink/path-prefix-g++-4.0
    PATH: /sw/bin
    PATH: /sw/sbin
    PATH: /bin
    PATH: /usr/bin
    PATH: /sbin
    PATH: /usr/sbin
    PATH: /usr/X11R6/bin
    PATH: /usr/local/gwTeX/bin/powerpc-apple-darwin-current

    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##

    ...
    configure:2544: checking for gcc
    configure:2560: found /usr/bin/gcc
    configure:2571: result: gcc
    configure:2803: checking for C compiler version
    configure:2811: gcc --version >&5
    powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)
    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    configure:2815: $? = 0
    configure:2822: gcc -v >&5
    Using built-in specs.
    Target: powerpc-apple-darwin9
    Configured with: /var/tmp/gcc_42/gcc_42-5577~1/src/configure --disable-checking --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --program-prefix= --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
    Thread model: posix
    gcc version 4.2.1 (Apple Inc. build 5577)
    configure:2826: $? = 0
    configure:2833: gcc -V >&5
    gcc-4.2: argument to `-V' is missing
    configure:2837: $? = 1

    Then the check for the C++ compiler comes:

    configure:3661: checking for g++
    configure:3677: found /sw/var/lib/fink/path-prefix-g++-4.0/g++
    configure:3688: result: g++
    configure:3715: checking for C++ compiler version
    configure:3723: g++ --version >&5
    powerpc-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)
    Copyright (C) 2005 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    configure:3727: $? = 0
    configure:3734: g++ -v >&5
    Using built-in specs.
    Target: powerpc-apple-darwin9
    Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --program-prefix= --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
    Thread model: posix
    gcc version 4.0.1 (Apple Inc. build 5493)
    configure:3738: $? = 0
    configure:3745: g++ -V >&5
    g++-4.0: argument to `-V' is missing

    Because Fink puts its /sw/var/lib/fink/path-prefix-g++-4.0 in front of $PATH g++ (version 4.2) is set back to g++-4.0.