Error installing on Mac

Help
Ching
2011-06-07
2013-06-03
  • Ching

    Ching - 2011-06-07

    Hi,

    I've been trying to install GDL from source and I keep getting this error.

    Building CXX object src/CMakeFiles/gdl.dir/gdleventhandler.cpp.o
    In file included from /Users/jhyc/Software/gnudatalanguage/gdl/src/graphics.hpp:50,
                     from /Users/jhyc/Software/gnudatalanguage/gdl/src/gdleventhandler.cpp:28:
    /Users/jhyc/Software/gnudatalanguage/gdl/src/gdlgstream.hpp: In constructor 'GDLGStream::GDLGStream(int, int, const char*, const char*)':
    /Users/jhyc/Software/gnudatalanguage/gdl/src/gdlgstream.hpp:53: error: no matching function for call to 'GDLGStream::string(const char )'
    /usr/local/include/plplot/plstream.h:843: note: candidates are: void plstream::string(PLINT, const PLFLT*, const PLFLT*, const char*)
    /Users/jhyc/Software/gnudatalanguage/gdl/src/gdlgstream.hpp: In static member function 'static bool GDLGStream::checkPlplotDriver(const char*)':
    /Users/jhyc/Software/gnudatalanguage/gdl/src/gdlgstream.hpp:106: error: no matching function for call to 'GDLGStream::string(const char*&)'
    /usr/local/include/plplot/plstream.h:843: note: candidates are: void plstream::string(PLINT, const PLFLT*, const PLFLT*, const char*)
    /Users/jhyc/Software/gnudatalanguage/gdl/src/gdlgstream.hpp:114: error: no matching function for call to 'GDLGStream::string(const char*&)'
    /usr/local/include/plplot/plstream.h:843: note: candidates are: void plstream::string(PLINT, const PLFLT*, const PLFLT*, const char*)
    make: ***  Error 1
    make: ***  Error 2
    make: ***  Error 2

    I've ran $cmake -DMAGICK=OFF -DHDF=OFF -DFFTW=OFF -DPYTHON=OFF ./
    and that runs fine, but when i use run $make it gives the error above. I've used gcc4.6 and g++4.6 with no success.
    Any tips?

    P.S. I've already got a pre-built binary version from HPC installed and works fine, but there's many commands/keywords that is obsolete in the HPC version, e.g. it doesn't run device,/color for ps plots

    Thanks,
    John

     
  • Sylwester Arabas

    Hi,

    Please check if changing "string(" into "std::string(" in lines 53, 106 and 114 of src/gdlgstream.hpp would help?

    Concerning the HPC version - the last time I've seen it on the hpc.sf.net website it was based on a very old GDL source version. Apparently now it is not listed on that website at all?

    For Mac there are the Fink and Macports versions available as well:
    - http://www.macports.org/ports.php?by=name&substr=gnudatalanguage (0.9 - slightly outdated)
    - http://pdb.finkproject.org/pdb/package.php/gdl (0.9.1 - the current release)

    Hope that helps,
    Sylwester

     
  • Ching

    Ching - 2011-06-08

    Hi,

    Many thanks for your help.
    Replacing string with std::string fixes that problem. However now I have another problem, at ~100%:

    Building CXX object src/CMakeFiles/gdl.dir/gdl.cpp.o
    Linking CXX executable gdl
    ld: warning: duplicate dylib /usr/lib/libm.dylib
    ld: warning: duplicate dylib /usr/local/lib/libhdf5.dylib
    ld: warning: duplicate dylib /usr/lib/libz.dylib
    ld: warning: duplicate dylib /usr/lib/libm.dylib
    ld: warning: duplicate dylib /usr/local/lib/libhdf5_hl.dylib
    Undefined symbols:
      "plstream::SetOpt(char const*, char const*)", referenced from:
          DeviceX::WOpen(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, int, int)in graphics.cpp.o
          DeviceX::WOpen(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, int, int)in graphics.cpp.o
          DeviceSVG::GetStream(bool) in graphics.cpp.o
          DevicePS::InitStream()      in graphics.cpp.o
          DevicePS::InitStream()      in graphics.cpp.o
          DevicePS::InitStream()      in graphics.cpp.o
          DevicePS::InitStream()      in graphics.cpp.o
          DeviceZ::GetStream(bool) in graphics.cpp.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: ***  Error 2
    make: ***  Error 2

    I check that each of the SetOpt(x,y) are either defined as "x" or char y and have no idea why it's failing?

    I rather install gdl via source as this lets me control updates and options.

    Thanks,
    John

     
  • Ching

    Ching - 2011-06-08

    It's all good I figured it out.

    The version of plplot that I'm using has 'SetOpt' as a depricated version…..use 'setopt' instead

    Hope this help anyone else.

     

Log in to post a comment.