2.36 make bugs Solaris

Help
2001-08-08
2001-11-28
  • Robin Burke
    Robin Burke
    2001-08-08

    The advice to switch to gcc-2.95 got me past the previous bugs, but now I'm having a linking error:

    gmake[1]: Entering directory `/usr/local/gsdl/src/phind/generate'
    c++ -c -DHAVE_CONFIG_H  -g -O2 phrase.cpp
    gcc   suffix.o phrase.o   -o suffix
    Undefined            first referenced
    symbol                  in file
    cout                                suffix.o
    istream::ios virtual table          suffix.o
    ostream::write(char const *, int)   suffix.o
    ofstream::ios virtual table         suffix.o
    ostream::seekp(long)                suffix.o
    istream::operator>>(char *)         suffix.o
    ifstream::~ifstream(void)           suffix.o
    endl(ostream &)                     suffix.o
    ostream::ios virtual table          suffix.o
    istream::operator>>(unsigned int &) suffix.o
    fstreambase::open(char const *, int, int)suffix.o
    cerr                                suffix.o
    fstream::ios virtual table          suffix.o
    istream::seekg(long)                suffix.o
    ostream::operator<<(char const *)   suffix.o
    ostream::operator<<(int)            suffix.o
    fstreambase::fstreambase(int)       suffix.o
    fstreambase::close(void)            suffix.o
    ostream::operator<<(unsigned int)   suffix.o
    ostream::operator<<(unsigned long)  suffix.o
    iostream::ios virtual table         suffix.o
    fstream::~fstream(void)             suffix.o
    istream::read(char *, int)          suffix.o
    ifstream::ios virtual table         suffix.o
    fstreambase::fstreambase(int, char const *, int, int)suffix.o
    ofstream::~ofstream(void)           suffix.o
    ios virtual table                   suffix.o
    ld: fatal: Symbol referencing errors. No output written to suffix
    collect2: ld returned 1 exit status
    gmake[1]: *** [suffix] Error 1
    gmake[1]: Leaving directory `/usr/local/gsdl/src/phind/generate'
    gmake: *** [all] Error 1

    I thought that maybe there were some artifacts left over from the gcc-3 compilations, so I did a make clean and tried again, but got the same error.

    (Second, minor bug: in packages/rtftohtml_src/Libs/OTHER/ the makefile is assumes "cc" as the compiler, so I ended up compiling "tokenscan" by hand.)

     
    • Gordon Paynter
      Gordon Paynter
      2001-08-08

      I'm the original aythor of this code, but I'm reluctant to take responsibility for this one. 
      It seems that the stream headers are not getting included correctly.  It seems that Stefan has surrounded the #includes with a conditional that I confess I do not understand.  John may be able to help?

      Otherwise, you could either (1) edit the source so that the correct includes are used, (2) not bother to make this directory (if you dont have "classify phind" in your collect.cfg then you don;t need it), or (best soln) try and figure out where and why GSDL_USE_IOS_H gets set and why it isn't working correctl in this case.

      NB: I am currently using
      gcc version 2.95.4 20010319 (Debian prerelease) and it compiles okay for me.

      Sorry I cannot be more helpful.

       
    • John McPherson
      John McPherson
      2001-08-08

      Are you sure you're using 2.36? This Makefile was fixed in version 2.36, as it should be using the C++ compiler to link, not the C compiler.
      You could get around it manually by replacing
      "gcc suffix.o phrase.o -o suffix"
      with
      "g++ suffix.o phrase.o -o suffix"

      Does the src/phind/generate/Makefile.in end with:
      suffix : $(OBJECTS)
              $(CXX) $(LDFLAGS) -o $@ $(OBJECTS)

      ???

      Thanks
      John McPherson.

       
    • Stefan Boddie
      Stefan Boddie
      2001-08-08

      You'll need to make sure that any changes you made to precompiler definitions have been reversed (you mentioned in your previous message that you'd set GSDL_USE_STL_H when attempting to compile with gcc-3).

      Definitions like GSDL_USE_STL_H and GSDL_USE_IOS_H are there mainly for compiling under Windows where there are various dodgy implementations of the STL to take into account. Using gcc-2.95 you shouldn't need them.

      The easiest way to reverse any previous changes to Makefiles is probably to run ./configure again.

      regards,
      Stefan Boddie

       
    • Robin Burke
      Robin Burke
      2001-08-08

      Yea! I'm built. The distribution was definitely 2.36. It had the ${CXX} variable as you indicated. And I did reverse my gsdlconf.h changes.

      But I had to build suffix by hand. (g++)

      And I had some weird problems with install in which it claimed that files did not exist even when they did. So I copied stuff manually. So far, so good.

      Anyway, thanks for your prompt help.

       
    • Michael Gruen
      Michael Gruen
      2001-11-28

      I experienced these problems, too.

      The install problem is in the syntax: the directory to copy the file to must be specified before the file and with a -c, -f, or -n.

      I also had problems running configure. It seems that 'test -e' is bash and does not work with sh. It worked fine once I changed it to 'test -f.'

      Otherwise, everything went well, and I'm looking forward to getting it up and running -- with luck by COB today.

      Thanks,
      Mike