make errors - magickcore, architecture x86_64

Discussion in 'Mac Programming' started by Bern., Feb 9, 2015.

  1. Bern. macrumors newbie

    Joined:
    Jan 30, 2015
    #1
    I am trying to install an open source program on my macbook. I have successfully done 'cmake', but am now finding issues when I try to 'make'. The program I'm trying to install is called pfstools and relies on many libraries, one of which is ImageMagick. Below is my 'make', of which I have highlighted my problems (code goes off the page, please scroll right). My knowledge of programming is minimal and any help you can provide is greatly appreciated.

    Code:
    $ make
    Scanning dependencies of target pfs
    [  1%] Building CXX object src/pfs/CMakeFiles/pfs.dir/colorspace.cpp.o
    [  2%] Building CXX object src/pfs/CMakeFiles/pfs.dir/pfs.cpp.o
    [  3%] Building CXX object src/pfs/CMakeFiles/pfs.dir/pfsutils.cpp.o
    Linking CXX static library libpfs.a
    [  3%] Built target pfs
    Scanning dependencies of target pfsinexr
    [  4%] Building CXX object src/fileformat/CMakeFiles/pfsinexr.dir/pfsinexr.cpp.o
    Linking CXX executable pfsinexr
    [  4%] Built target pfsinexr
    Scanning dependencies of target pfsinimgmagick
    [  5%] Building CXX object src/fileformat/CMakeFiles/pfsinimgmagick.dir/pfsinimgmagick.cpp.o
    In file included from /usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/Magick++/Include.h:14:0,
                     from /usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/Magick++.h:10,
                     from /Users/kate/Documents/pfstools/pfstools-2.0.0/src/fileformat/pfsinimgmagick.cpp:29:
    /usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/magick-config.h:29:3: warning: [COLOR="Red"]#warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" [-Wcpp][/COLOR]
    /usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/magick-config.h:30:3: warning: [COLOR="red"]#warning "this is an obsolete behavior please fix your makefile" [-Wcpp][/COLOR]
    /usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/magick-config.h:52:3: warning: [COLOR="red"]#warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default" [-Wcpp][/COLOR]
    /usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/magick-config.h:53:3: warning: [COLOR="red"]#warning "this is an obsolete behavior please fix yours makefile" [-Wcpp][/COLOR]
    Linking CXX executable pfsinimgmagick
    [COLOR="red"]Undefined symbols for architecture x86_64:
      "Magick::Image::Image(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
          readFrames(int, char**) in pfsinimgmagick.cpp.o
    ld: symbol(s) not found for architecture x86_64
    collect2: error: ld returned 1 exit status
    make[2]: *** [src/fileformat/pfsinimgmagick] Error 1
    make[1]: *** [src/fileformat/CMakeFiles/pfsinimgmagick.dir/all] Error 2
    make: *** [all] Error 2[/COLOR]
     
  2. robvas macrumors 68020

    Joined:
    Mar 29, 2009
    Location:
    USA
  3. Bern. thread starter macrumors newbie

    Joined:
    Jan 30, 2015
    #3
    I have already installed imagemagick using homebrew.
     
  4. Madd the Sane macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #4
    It looks like the source code uses cmake. It's also pulling headers from your system, causing these build failures. Is it possible for you to set the ImageMagick used to the one installed?
     
  5. Bern., Feb 18, 2015
    Last edited: Feb 18, 2015

    Bern. thread starter macrumors newbie

    Joined:
    Jan 30, 2015
    #5
    Thanks for your reply. I'm not sure how to do what you say. Also, ImageMagick was recognised in my 'cmake' which completed fine.

    I have made slight progress though. Here is what I did:

    Code:
    pkg-config --libs --cflags ImageMagick
    -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/
    ImageMagick-6 -L/opt/local/lib -lMagickCore-6.Q16 
    And then when I did my 'make' I got the following results:

    Code:
    make
    [  3%] Built target pfs
    [  4%] Built target pfsinexr
    Linking CXX executable pfsinimgmagick
    Undefined symbols for architecture x86_64:
      "Magick::Image::Image(std::basic_string<char, std::char_traits<char>, std::
    allocator<char> > const&)", referenced from:
          readFrames(int, char**) in pfsinimgmagick.cpp.o
    ld: symbol(s) not found for architecture x86_64
    collect2: error: ld returned 1 exit status
    make[2]: *** [src/fileformat/pfsinimgmagick] Error 1
    make[1]: *** [src/fileformat/CMakeFiles/pfsinimgmagick.dir/all] Error 2
    make: *** [all] Error 2
    
    So my issues with quantum depth and HDRI enable have been fixed, but I still have issues with architecture x86_64. However, this only worked once I uninstalled ImageMagick with brew and reinstalled it using MacPorts. Can you help?
     
  6. NinjaG macrumors newbie

    Joined:
    Mar 12, 2015
    #6
    I'm having the exact same issue. I also tried using the cmake flag
    -DCMAKE_OSX_ARCHITECTURES=x86_64
    but I still get the same error.

    Linking CXX executable pfsinimgmagick
    Undefined symbols for architecture x86_64:


    Did anyone manage to figure this out??
     

Share This Page