Menu

#2082 Error compiling

closed-fixed
5
2012-09-09
2012-09-08
No

Running Mac OS X, attempting to compile sdcc with llvm-gcc (included with the system), an error is thrown.

OS X 10.8.1 (12B19)
Small Device C Compiler 3.2.0, from http://downloads.sourceforge.net/project/sdcc/sdcc/3.2.0/sdcc-src-3.2.0.tar.bz2, SHA1 of 523455e785126c15183128884db3b855921a115
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

> curl -O http://downloads.sourceforge.net/project/sdcc/sdcc/3.2.0/sdcc-src-3.2.0.tar.bz2
> tar xvf sdcc-src-3.2.0.tar.bz2
> cd sdcc
> ./configure --enable-avr-port --enable-xa51-port
> make
...
gcc -fms-extensions -pipe -ggdb -g -O2 -Wall -Wno-parentheses -I./.. -I.. -I. -I../.. -I./../../support/util -I. -c -o gen.o gen.c
gen.c:229: error: conflicting types for ‘emitcode’
./../SDCCgen.h:95: error: previous declaration of ‘emitcode’ was here
gen.c: In function ‘emitcode’:
gen.c:235: error: expected expression before ‘va_list’
gen.c:235: error: too few arguments to function ‘format_opcode’
gen.c: In function ‘aopOp’:
gen.c:789: warning: assignment from incompatible pointer type
gen.c: At top level:
gen.c:2550: error: conflicting types for ‘ifxForOp’
./../SDCCgen.h:99: error: previous declaration of ‘ifxForOp’ was here
gen.c:2935: error: static declaration of ‘genInline’ follows non-static declaration
./../SDCCgen.h:97: error: previous declaration of ‘genInline’ was here
make[2]: *** [gen.o] Error 1
make[1]: *** [avr/port.a] Error 2
make: *** [sdcc-cc] Error 2

Email at: conrad@kramerapps.com

Discussion

  • Erik Petrich

    Erik Petrich - 2012-09-08

    Both the avr and xa51 ports are unfinished and are effectively abandoned. While we could update them so that they compile and link with the current sdcc version, they won't be able to produce much useable code since they are incomplete.

    I am using a slightly older version "gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)" than you, but the build only fails as you describe only when using the --enable-avr-port or --enable-xa51-port configuration options. Since these ports are incomplete, I suggest you build sdcc without these options.

    Fellow developers: perhaps we should remove these configuration options?

     
  • Maarten Brock

    Maarten Brock - 2012-09-09

    I have no problem with removing these configuration options.

     
  • Borut Ražem

    Borut Ražem - 2012-09-09
    • assigned_to: nobody --> borutr
    • status: open --> closed-fixed
     
  • Borut Ražem

    Borut Ražem - 2012-09-09

    AVR and XA51 configuration options removed in svn revision #8094.

    Borut

     

Log in to post a comment.