Trying to compile on Solaris 10 x86...

Help
ajheaps
2005-11-11
2013-03-15
  • ajheaps
    ajheaps
    2005-11-11

    I'm trying to compile plplot-5.5.3 under Solaris 10 x86 as plplot is needed by GDL (GNU Data Language).   The INSTALL notes  for Solaris Sparc specify to use the --without-gnu-ld flag as native C++ wasn't available on that build system.  It is on mine as CC and GDL needs the plplot cxx libraries to link against so I missed this flag off.

    So here's what I typed:

    export f77=f95
    export CC=cc
    export CXX=CC
    ./configure --prefix=/export/home/plplot-5.5.3 --without-gnu-ld
    make
    ...........
    /bin/bash ../../libtool --tag=CXX --mode=link CC  -g -mieee-fp   -o libplplotcxxd.la -rpath /export/home/plplot-5.5.3/lib -version-info 11:0:2 -rpath /export/home/plplot-5.5.3/lib -no-undefined ../../src/libplplotd.la plstream.lo  -lm
    CC -G -zdefs -nolib -hlibplplotcxxd.so.9 -o .libs/libplplotcxxd.so.9.2.0   .libs/plstream.o  -R/export/home/andy/plplot-5.5.3/src/.libs -R/export/home/plplot-5.5.3/lib -L/export/home/andy/plplot-5.5.3/lib/csa/.libs ../../src/.libs/libplplotd.so -lm
    Undefined                       first referenced
    symbol                             in file
    std::ostream &std::operator<<(std::ostream &,const char*) .libs/plstream.o
    __xtol                              .libs/plstream.o  (symbol belongs to implicit dependency /lib/libc.so.1)
    std::cerr                      .libs/plstream.o
    [Hint: static member std::cerr must be defined in the program]

    ld: fatal: Symbol referencing errors. No output written to .libs/libplplotcxxd.so.9.2.0
    make[3]: *** [libplplotcxxd.la] Error 1
    make[3]: Leaving directory `/export/home/andy/plplot-5.5.3/bindings/c++'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/export/home/andy/plplot-5.5.3/bindings'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/export/home/andy/plplot-5.5.3'
    make: *** [all] Error 2

    Anyone have an idea why the compilation is failing?

                  Cheers
                            Andy

     
    • ajheaps
      ajheaps
      2005-11-17

      Here's the solution to my problem:

      Comment out cerr in line 101 in bindings/c++/plstream.cc
      Put a print statement in here instead to alert the user of an invalid condition.

      Add:
      export LDFLAGS=-lc
      to the list of flags.

      make
      When this fails edit the libtools file to change from SUN ld to GNU ld. Then type
      make
      make install

      In the examples directory there's 55 rather nice looking postscript files and all looks to be oaky.

      And now onto GDL...

      Cheers
           Andy