eda

SCRC

SpecC Reference Compiler
The SpecC Language Reference Manual, citation list
http://citeseer.nj.nec.com/context/1322509/0
See INSTALL for instruction:
  1. You need pth from: http://www.gnu.org/software/pth/
    (Without this you may got following.)
    PosixThread.h:20: pthread.h: No such file or directory
    *** Error code 1
    
    With NetBSD/pkgsrc system, you may type
    pkgsrc/devel/pth
    make;make test; make install
    
  2. bison
    flex -PPRS_ -t >PRS_Scanner.cc PRS_Scanner.l
    bison -d -p PRS_ -o PRS_Parser.c PRS_Parser.y
    make: exec(bison) failed (No such file or directory)
    *** Error code 1
    
    pkgsrc/devel/bison
  3. download from: http://www.ics.uci.edu/~specc/reference/ and open it.
  4. modify Makefile.macro
  5. have specc group in /etc/group
  6. setenv LD_LIBRARY_PATH /usr/pkg/lib
    make
    
    Without LD_LIBRARY_PATH setting, you may get:
    LD_LIBRARY_PATH=/export/local-src/scrc-1.2/lib${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH} ./Alignment >Alignment.h
    Shared object "libpthread.so.14" not found
    *** Error code 1
  7. If the Makefile is not correctly modified, you may got following paragraph.
    g++ -DNETBSD -O2 -DNDEBUG -DHAVE_LLONG -DHAVE_ARYASGN -fno-implicit-templates -I/usr/pkg/include -s -c -Wall -I/export/local-src/scrc-1.2/inc Type.cc
    Type.cc:1187: #error "Unknown bitfield packing type!"
    *** Error code 1
  8. make install
  9. make test
    *** Compiling ( compat )...
    ***
    scrc: SpecC Reference Compiler V 1.2
    (c) 1997-2002 CECS, University of California, Irvine
    
    Preprocessing...
       Input:  "compat.sc"
       Output: "compat.si"
    Parsing...
       Input:  "compat.si"
       Output: <=_internal representation>
    
    ERROR #3102: Parse error in line 43
                 in file "/usr/include/powerpc/int_types.h":
                 parse error.
    
    Aborted.
    *** Error code 10
    
    This may come from the part in scrc-1.2/src/Parser/Parser.c at:
    228      case PRS_ERROR_CONSTANT_PARSING_FAILED:
    229           return(ErrorMessage.chars()
    230                 /* "String conversion to SpecC constant failed;"
    231                                                 GL_ERROR_MSG_NEWLINE
    232                 "parse error in '%s'" */ );
    
    or in scrc-1.2/src/Parser/Parser.h:
     78 #define PRS_ERROR_CONSTANT_PARSING_FAILED       (PRS_ERROR_BASE + 26)
    
    scrc-1.2/src/Compiler/Compiler.c:
    168 if (  (ErrorNumber >= PRS_ERROR_BASE)
    169     &&(ErrorNumber <= PRS_ERROR_BASE + PRS_ERROR_RANGE))
    170    { return(PRS_ErrorText(ErrorNumber));
    171     } /* fi */
    
    Or on NetBSD/i386, Release 1.6, we have:
    ERROR #3102: Parse error in line 47
                 in file "/usr/include/machine/int_types.h":
                 parse error.
    
    in file "/usr/include/powerpc/int_types.h":, the 43rd line is:
    43 typedef __signed char            __int8_t;
    
    On linux machine, the similar line appears as:
    /usr/include/bits/types.h:49:typedef signed char __int8_t;
    
    ... comment this 43rd line out, or change it to
    typedef signed char __int8_t;
    
    Or the patch to scrc-1.2 for PRS_Scanner may also remove this problem make test again
    ERROR #3105: Semantic error in line 223
                 in file "/usr/include/stdio.h":
                 Declaration of symbol '__restrict'
                 does not match former declaration:
                 type mismatch (#2039).
    
    Aborted.
    *** Error code 10
    
    223 int      fgetpos __P((FILE * __restrict, fpos_t * __restrict));
    
    In the Linux machine, the similar definition appears as:
        498 /* Get STREAM's position.  */
        499 extern int fgetpos __P ((FILE *__restrict __stream,
        500                          fpos_t *__restrict __pos));
    

Last Update

19:46:51 03/12/08
CCBot/2.0 (http://commoncrawl.org/faq/)
Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.8e DAV/2 PHP/4.4.6
Count.cgi
(since 2002/08/20)