#4140 Updated autotrace_0.31.1-1023

Peter Dyballa

Does this package have OS version restrictions? Yes, it's for Leopard and newer.
Which section does it belong in? graphics
Have you built it with -m --build-as-nobody? Yes!

It has been updated to use libming1 instead of very old ming package. Other updates are the use of GCC 4.2 and lcms2. Finally there is a patch for configure available to handle the new version numbers of ImageMagick:

- MAGICK_VERSION=`Magick-config --version`
+ MAGICK_VERSION=`Magick-config --version | awk '{print $1}'`

peter 119 /\ dpkg -L autotrace

peter 120 /\ dpkg -L autotrace-bin

peter 121 /\ dpkg -L autotrace-shlibs


  • Peter Dyballa
    Peter Dyballa

    autotrace_0.31.1-1023 patch + info

    • milestone: 373615 --> Awaiting_Update_from_Submitter
  • Just a couple quick notes:

    1) GCC: 4.2 doesn't actually make it use gcc-4.2. The GCC field is for keeping track of the GCC-ABI in c++ code in the package. I'm not even sure it's actually needed since I don't see any usage of c++ in the autotrace build log. Do you know if there's actually c++ code in autotrace?

    To actually have it use gcc-4.2, the most common way is to use the field SetCC: gcc-4.2 (or setCXX: g++-4.2), but that's a force, and only recommended if actually needed. Otherwise, let the package use the compiler it wants unless there's a failure.

    2) The current in stable autotrace has a note that it is not compatible with the libmin0 interface. Is the libming1 interface now compatible with autotrace?

  • Also, since the autotrace is unmaintained, would you like to become the package maintainer?

    This position generally just entails being the point person for any queries for when the package fails to build, or if someone requests an update. It's generally not very time consuming. For my dozen-plus packages, I maybe get a question just once or twice a month.

  • Peter Dyballa
    Peter Dyballa

    C++ compilers are not used, but libstdc++ is linked in. I tried to make sure that Fink uses OpenMP compatible compilers in case -fopenmp from ImageMagick finds its way into the build process.
    Up-to-date ImageMagick can make use of this API and possibly be faster on hard- and software that provides this. Starting with Leopard we should enable the use of OpenMP, which needs GCC 4.2 at least.

    Autotrace does not compile with the libming0 snapshot, but it does so with libming1.

  • Peter Dyballa
    Peter Dyballa

    OK, I can take over the job of the maintainer! I think I never used it, it was always a prerequisite for other packages so I looked for it. I don't have a Mac zoo and will take some time until I upgrade to Lion – in case Apple becomes sane again and releases the OS on DVD or BD.

  • Peter Dyballa
    Peter Dyballa

    The PATCH file again

  • 1) On 10.6, it fails to build with this error (though the failure is probably universal):

    libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libautotrace.3.dylib .libs/input-pnm.o .libs/input-bmp.o .libs/input-tga.o .libs/input-png.o .libs/input-magick.o .libs/output-eps.o .libs/output-er.o .libs/output-fig.o .libs/output-sk.o .libs/output-svg.o .libs/output-p2e.o .libs/output-emf.o .libs/output-dxf.o .libs/output-epd.o .libs/output-pdf.o .libs/output-mif.o .libs/output-cgm.o .libs/output-dr2d.o .libs/output-swf.o .libs/output-pstoedit.o .libs/fit.o .libs/bitmap.o .libs/spline.o .libs/curve.o .libs/epsilon-equal.o .libs/vector.o .libs/color.o .libs/autotrace.o .libs/output.o .libs/input.o .libs/pxl-outline.o .libs/median.o .libs/thin-image.o .libs/logreport.o .libs/filename.o .libs/xstd.o .libs/despeckle.o .libs/exception.o .libs/strgicmp.o .libs/image-proc.o -L/sw32/lib -L/sw32/lib/pango-ft219/lib -L/sw32/lib/fontconfig2/lib -L/usr/X11R6/lib /sw32/lib/libMagickCore.dylib -llcms /sw32/lib/libtiff.dylib /sw32/lib/freetype219/lib/libfreetype.dylib /sw32/lib/libjpeg.dylib /sw32/lib/fontconfig2/lib/libfontconfig.dylib -lXext -lSM -lICE -lX11 -lXt -lbz2 -lgomp -lpthread /sw32/lib/libltdl.dylib /sw32/lib/libming.dylib -lm /sw32/lib/libpstoedit.dylib /sw32/lib/libpng14.dylib -lz -lstdc++ -ldl -O2 -Wl,-multiply_defined -Wl,suppress -install_name /sw32/lib/libautotrace.3.dylib -compatibility_version 4 -current_version 4.0 -Wl,-single_module
    ld: library not found for -llcms

    lcms2 has liblcms2.dylib, which explains why the libtool doesn't find -llcms.

    2) For setting gcc-4.2, the method used in pstoedit (a 10.5 conditional inside CompileScript) will work, along with proper usage of the GCC: 4.0 field.

    3) Don't forget to add yourself as the maintainer.

    I think this should take care of the remaining issues.

  • Peter Dyballa
    Peter Dyballa


    your Fink installation might be faulty...

    To build libautotrace.3.dylib you do not need X11, neither PANGO, nor fontconfig, libtiff, libjpeg, just:

    /sw/lib/libautotrace.3.dylib (compatibility version 4.0.0, current version 4.0.0)
    /sw/lib/libMagickCore.5.dylib (compatibility version 6.0.0, current version 6.0.0)
    /sw/lib/libming.1.dylib (compatibility version 6.0.0, current version 6.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
    /sw/lib/libpstoedit.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /sw/lib/libpng14.14.dylib (compatibility version 26.0.0, current version 26.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)

    But, libMagickCore is by default using lcms instead of lcms2 (except on my Snow Leopard system). In MacPorts and my local updated ImageMagick packages on Leopard and Tiger this works well. But: ImageMagick might need a much more comprehensive revision, see here: https://trac.macports.org/ticket/34231. I need to test that as well, for me the GCC 4.2 with OpenMP compiled versions do not crash.

    This is my build of libautotrace.3.dylib on Mac OS X 10.6.8:

    libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libautotrace.3.dylib .libs/input-pnm.o .libs/input-bmp.o .libs/input-tga.o .libs/input-png.o .libs/input-magick.o .libs/output-eps.o .libs/output-er.o .libs/output-fig.o .libs/output-sk.o .libs/output-svg.o .libs/output-p2e.o .libs/output-emf.o .libs/output-dxf.o .libs/output-epd.o .libs/output-pdf.o .libs/output-mif.o .libs/output-cgm.o .libs/output-dr2d.o .libs/output-swf.o .libs/output-pstoedit.o .libs/fit.o .libs/bitmap.o .libs/spline.o .libs/curve.o .libs/epsilon-equal.o .libs/vector.o .libs/color.o .libs/autotrace.o .libs/output.o .libs/input.o .libs/pxl-outline.o .libs/median.o .libs/thin-image.o .libs/logreport.o .libs/filename.o .libs/xstd.o .libs/despeckle.o .libs/exception.o .libs/strgicmp.o .libs/image-proc.o -L/sw/lib /sw/lib/libMagickCore.dylib /sw/lib/libming.dylib -lm /sw/lib/libpstoedit.dylib /sw/lib/libpng14.dylib -lz -lstdc++ -ldl -O2 -Wl,-multiply_defined -Wl,suppress -pthread -fopenmp -install_name /sw/lib/libautotrace.3.dylib -compatibility_version 4 -current_version 4.0 -Wl,-single_module

    Notice also that you're using -lgomp and /sw32/lib/libltdl.dylib while I have -fopenmp!

  • Whatever the package does with your local imagemagick IS IRRELEVANT.

    The package must build properly against other packages which are currently in Fink.

  • Peter Dyballa
    Peter Dyballa

    For me it works.

    I'll attach my config.log file and you can attach yours.

    I built with 'fink -v -m --build-as-nobody -k rebuild autotrace'. What did you use?

  • Peter Dyballa
    Peter Dyballa

    Pete's config.log

  • Pretty much all the LIBS on my linker line are coming from Magick-config and are in fact BuildDepends from this autotrace. If the main problem is that imagemagick is exporting too many dependencies, then that needs to be fixed. However, for current IM in Fink, -llcms is the extant exported flag, and BuildDepends on lcms2-dev leads to this failure.

    This immediate error can be fixed by correcting the lcms BuildDepends.

  • These are the relevant differences between my config.log and your (yours is on top)

    @@ -487,17 +487,17 @@
    configure:11565: found /sw/bin/Magick-config
    configure:11577: result: Magick-config
    configure:11588: checking magick/api.h usability
    -configure:11588: gcc -c -g -O2 -I/sw/include/ImageMagick conftest.c >&5
    +configure:11588: gcc -c -g -O2 -I/sw/include/ImageMagick -fopenmp conftest.c >&5
    configure:11588: $? = 0
    configure:11588: result: yes
    configure:11588: checking magick/api.h presence
    -configure:11588: gcc -E -I/sw/include/ImageMagick conftest.c
    +configure:11588: gcc -E -I/sw/include/ImageMagick -fopenmp conftest.c
    configure:11588: $? = 0
    configure:11588: result: yes
    configure:11588: checking for magick/api.h
    configure:11588: result: yes
    configure:11600: checking ImageMagick - version >= 5.2.1
    -configure:11622: result: yes(6.5.8)
    +configure:11622: result: yes(6.7.5)
    configure:11703: checking for gzsetparams in -lz
    configure:11728: gcc -o conftest -g -O2 -I/sw/include -L/sw/lib conftest.c -lz >&5
    configure:11728: $? = 0
    @@ -746,15 +748,15 @@
    +MAGICK_CFLAGS='-I/sw/include/ImageMagick -fopenmp'
    -MAGICK_LDFLAGS='-L/sw/lib/pango-ft219/lib -L/sw/lib/fontconfig2/lib -L/usr/X11R6/lib -R/usr/X11R6/lib -L/sw/lib -L/sw/lib -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread -lltdl'
    +MAGICK_LDFLAGS='-L/sw/lib -lMagickCore -L/sw/lib -lMagickCore'

    You are using your updated ImageMagick from the tracker which exports very different flags. I propose a two step solution:

    1) fix autotrace so that it works with current-in-fink ImageMagick

    2) Update ImageMagick to latest upstream, making sure that all exported flags are done correctly, make sense for specific OS versions, and don't break current existing packages.

  • Peter Dyballa
    Peter Dyballa

    Yes, I am using my own INFO and PATCH file for ImageMagick. Since there can be a problem in building ImageMagick with GCC < 4.5 (see this discussion: https://trac.macports.org/ticket/34231\) we have two options:

    a) if GCC >= 4.2 is used then OpenMP use has to be disabled (with GCC 4.0 it can only be off)
    b) if we decide to use OpenMP in IM we need to install GCC 4.5, 4.6, or 4.7
    c) might LLVM 3.x work correctly? It might build on PPC hardware faster...

    Another question arises: is this bug universal or intel only? My updated IM on PPC is stable. On Snow Leopard I haven't changed so much. I'll test building autotrace here.

    An intermediate fix could be to make autotrace depend of a modern IM that is built with GCC 4.0 and lcms2. So at least the updated IM would be installed.

    The final solution with enabled OpenMP would mean on PPC hardware that GCC is compiled for days, needing more than 2 GB of disk space, and IM within an hour. So it might be recommended to offer finally IM and IM-OpenMP.

  • Peter Dyballa
    Peter Dyballa

    With the original ImageMagick I can't reproduce your failure. I have lcms installed since ImageMagick depends on it.

    Anyway, I updated the INFO file and am attaching it. It worked on intel Mac OS X 10.6.8 with original ImageMagick and also on PPC Mac OS X 10.5.8 with a modernised ImageMagick.

  • Peter Dyballa
    Peter Dyballa

    autotrace 0.31.1, Revision: 1023

  • Peter Dyballa
    Peter Dyballa

    • status: open --> open-out-of-date
    • status: open-out-of-date --> closed-out-of-date
  • Closing since this is out of date (see previous message)