#2033 Cannot build from source with --disable-r2k-port defined


Building from source fails with --disable-r2k-port. It fails with:

gcc -fms-extensions -pipe -ggdb -g -O2 -Wall -Wno-parentheses -I. -I.. -I./../support/util -I. -I. -c SDCCmain.c -o SDCCmain.o
SDCCmain.c:326:4: error: ‘r3ka_port’ undeclared here (not in a function)

This seems to be a typo in port.h. In SDCCmain.c we see:


yet in port.h we see:

extern PORT r2k_port; /* Rabbit 2000/3000 */
#if !OPT_DISABLE_R2K <------ wrong
extern PORT r3ka_port; /* Rabbit 3000A */

Thus if --disable-r2k-port is defined, it removes the declaration for r3k_port from the header file, but the reference in the SDCCmain.c file.

The above was taken from sdcc-src-20120531-7827.tar.bz2
Compile line was:
./configure --prefix=/build/install --disable-mcs51-port --disable-gbz80-port --disable-ds390-port --disable-ds400-port --disable-pic16-port --disable-pic14-port --disable-hc08-port --disable-ucsim --disable-sdcdb --disable-r2k-port --disable-gbz80-port
Build system is gcc 4.5.2 (Solaris 11)

Easy workaround: either specify both of --disable-r2k-port and --disable-r3ka-port or specify neither of them.


  • Philipp Klaus Krause

    • assigned_to: nobody --> spth
  • Philipp Klaus Krause

    • status: open --> closed-fixed
  • Philipp Klaus Krause

    Fixed in revision #7852.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks