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

closed-fixed
5
2012-06-02
2012-06-02
No

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:

#if !OPT_DISABLE_R2K
&r2k_port,
#endif
#if !OPT_DISABLE_R3KA
&r3ka_port,
#endif

yet in port.h we see:

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

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.

Discussion

  • Philipp Klaus Krause

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

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

    Fixed in revision #7852.

    Philipp

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks