#10 failed to compile version 0.8.1beta

closed
Davy Durham
None
5
2003-07-09
2003-06-27
Gerhard Zintel
No

I have got the following error message in compiling the
new version 0.8.1beta.

make[3]: Entering directory
`/home/zint/src/rezound-0.8.1beta/src/misc/CNestedDataFile'
source='cfg.tab.cc' object='cfg.tab.lo' libtool=yes \
depfile='.deps/cfg.tab.Plo' tmpdepfile='.deps/cfg.tab.TPlo'
\
depmode=gcc /bin/sh ../../../config/depcomp \
/bin/sh ../../../libtool --mode=compile g++
-DHAVE_CONFIG_H -I. -I. -I../../../config -I../../../src/misc
-I../../../src/misc/missing/generated -I../../../src/PoolFile
-g -Wall -Wno-unused -INONE/include -c -o cfg.tab.lo
`test -f 'cfg.tab.cc' || echo './'`cfg.tab.cc
g++ -DHAVE_CONFIG_H -I. -I. -I../../../config
-I../../../src/misc -I../../../src/misc/missing/generated
-I../../../src/PoolFile -g -Wall -Wno-unused
-INONE/include -c cfg.tab.cc
-Wp,-MD,.deps/cfg.tab.TPlo
/usr/share/bison/bison.simple: In function `int cfg_parse()':
/usr/share/bison/bison.simple:774: implicit declaration of
function `int stpcpy(...)'
/usr/share/bison/bison.simple:774: initialization to `char *'
from `int' lacks a cast
/usr/share/bison/bison.simple:775: assignment to `char *'
from `int' lacks a cast
/usr/share/bison/bison.simple:786: assignment to `char *'
from `int' lacks a cast
/usr/share/bison/bison.simple:787: assignment to `char *'
from `int' lacks a cast
make[3]: *** [cfg.tab.lo] Error 1
make[3]: Leaving directory
`/home/zint/src/rezound-0.8.1beta/src/misc/CNestedDataFile'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/zint/src/rezound-0.8.1beta/src/misc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/zint/src/rezound-0.8.1beta/src'
make: *** [all-recursive] Error 1

I'm using debian/woody

Version 0.7.0beta compiled with less problems

Any help available?
Gerhard

Discussion

  • Davy Durham
    Davy Durham
    2003-06-27

    Logged In: YES
    user_id=28588

    Hmm, well the error is occuring in bison.simple which isn't
    even my code. It is a file that comes with the bison
    package. What version of bison are you using? One that
    should work (which I'm using) is 1.35.

    However, after looking at bison.simple I see that it defines
    yystpcpy as stpcpy when it detects glibc (and certain other
    things) being used. However it does not '#include
    <string.h>' upon the same conditions. Well, stpcpy() is
    defined in string.h, so I think that's a mistake on their
    part. We can easily fix this though. add a line...

    #include <string.h>

    ... near the top of
    rezound.../src/misc/CNestedDataFile/cfg.y right after the
    line '#include <math.h>'

    If that fixes the problem, please let me know.

    Thanks,
    Davy

     
  • Davy Durham
    Davy Durham
    2003-06-27

    • assigned_to: nobody --> ddurham
     
  • Gerhard Zintel
    Gerhard Zintel
    2003-06-28

    Logged In: YES
    user_id=579419

    Strange, I'm working with bison version 1.35 too!

    And - I'm sorry - including line '#include <string.h>' right
    behind line '#include <math.h>' has not changed anything.

    Gerhard

     
  • Davy Durham
    Davy Durham
    2003-06-28

    Logged In: YES
    user_id=28588

    If you run 'man stpcpy' does it find anything?

    What's bad is that bison is suppose to create POSIX code (or
    something that should compile on most systems), but the man
    page says that stpcpy is not defined by any standard.

    Anyhow, can you attach your
    rezound../src/misc/CNestedDataFile/cfg.tab.cc and your
    rezound../config/config.h
    (you can attach files at the bottom of thiis page, and
    remember to check the checkbox down there or it won't attach)

    Thanks

     
  • Gerhard Zintel
    Gerhard Zintel
    2003-06-29

    Logged In: YES
    user_id=579419

    man stpcpy gives:
    NAME
    stpcpy - copy a string returning a pointer to its end

    SYNOPSIS
    #include <string.h>

    char *stpcpy(char *dest, const char *src);

    DESCRIPTION
    The stpcpy() function copies the string pointed to by src
    (including the terminating `\0' character) to the array
    pointed to by dest. The strings may not overlap, and the
    destination string dest must be large enough to receive
    the copy.
    ...
    and so on.

    And here are the files cfg.tab.cc and config.h.

    And again thank you very much for your help.
    FYI: I'm leaving tomorrow for three days. so I'm not able to
    check anything at this time.

    Gerhard

     
  • Gerhard Zintel
    Gerhard Zintel
    2003-06-29

     
    Attachments
  • Gerhard Zintel
    Gerhard Zintel
    2003-06-29

     
    Attachments
  • Davy Durham
    Davy Durham
    2003-07-03

    Logged In: YES
    user_id=28588

    hey, I've got an idea (I should have thought of this before).

    In rezound../src/misc/CNestedDataFile.cfg.y add

    #include "../../../config/common.h"
    #include <string.h>

    just before the line: #include <math.h>

    And you can either remove or leave the #include <string.h>
    line I had you add previously.

    I *think* this will help.

     
  • Gerhard Zintel
    Gerhard Zintel
    2003-07-04

    Logged In: YES
    user_id=579419

    Bingo - you've got it!

    At least concerning the above mentioned compilation error.

    But now it stops in drawPortion.cpp with the following lines:

    g++ -DHAVE_CONFIG_H -I. -I. -I../../config -I../../src/misc
    -I../../src/misc/missing/generated -I../../src/PoolFile -g -Wall
    -Wno-unused -INONE/include -c drawPortion.cpp
    -Wp,-MD,.deps/drawPortion.TPlo
    In file included from ../../src/PoolFile/TPoolFile.h:37,
    from ../backend/CSound.h:32,
    from drawPortion.cpp:30:
    ../../src/misc/CRWLock.h:121: syntax error before `;'
    ../../src/misc/CRWLock.h: In method `CRWLock::CRWLock()':
    ../../src/misc/CRWLock.h:45: `rwlock' undeclared (first use this
    function)
    ../../src/misc/CRWLock.h:45: (Each undeclared identifier is
    reported only once
    ../../src/misc/CRWLock.h:45: for each function it appears in.)
    ../../src/misc/CRWLock.h:45: implicit declaration of function `int
    pthread_rwlock_init(...)'
    ../../src/misc/CRWLock.h: In method `CRWLock::~CRWLock()':
    ../../src/misc/CRWLock.h:52: implicit declaration of function `int
    pthread_rwlock_destroy(...)'
    ../../src/misc/CRWLock.h: In method `void
    CRWLock::readLock()':
    ../../src/misc/CRWLock.h:60: implicit declaration of function `int
    pthread_rwlock_rdlock(...)'
    ../../src/misc/CRWLock.h: In method `bool
    CRWLock::tryReadLock()':
    ../../src/misc/CRWLock.h:68: implicit declaration of function `int
    pthread_rwlock_tryrdlock(...)'
    ../../src/misc/CRWLock.h: In method `void
    CRWLock::writeLock()':
    ../../src/misc/CRWLock.h:85: implicit declaration of function `int
    pthread_rwlock_wrlock(...)'
    ../../src/misc/CRWLock.h: In method `bool
    CRWLock::tryWriteLock()':
    ../../src/misc/CRWLock.h:93: implicit declaration of function `int
    pthread_rwlock_trywrlock(...)'
    ../../src/misc/CRWLock.h: In method `void CRWLock::unlock()':
    ../../src/misc/CRWLock.h:110: implicit declaration of function
    `int pthread_rwlock_unlock(...)'
    drawPortion.cpp: In function `void drawPortion(int, int,
    FXDCWindow *, CSound *, int, int, int, int, double, unsigned
    int, double, int, bool = false, bool = false)':
    drawPortion.cpp:115: implicit declaration of function `int
    nearbyint(...)'
    make[2]: *** [drawPortion.lo] Error 1
    make[2]: Leaving directory
    `/home/zint/src/rezound-0.8.1beta/src/frontend_fox'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory
    `/home/zint/src/rezound-0.8.1beta/src'
    make: *** [all-recursive] Error 1

    Any idea?

    Gerhard

     
  • Davy Durham
    Davy Durham
    2003-07-09

    • status: open --> closed