Menu

#3671 disabling ports is broken

closed-fixed
None
Simulator
5
2024-10-16
2023-11-02
No

When I try to build SDCC for mcs51 only some disable options are not working properly.

./configure -q \
 --disable-z80-port      \
 --disable-z180-port     \
 --disable-r2k-port      \
 --disable-r2ka-port     \
 --disable-r3ka-port     \
 --disable-sm83-port     \
 --disable-tlcs-port     \
 --disable-tlcs90-port   \  <== Have to specify both tlcs and tlcs90
 --disable-ez80_z80-port \
 --disable-z80n-port     \
 --disable-r800-port     \  <== already added to Makefile.common.in, Makefile.in, sdccconf_in.h
 --disable-ds390-port    \
 --disable-ds400-port    \
 --disable-pic14-port    \
 --disable-pic16-port    \
 --disable-hc08-port     \
 --disable-m68hc08-port  \  <== Have to specify both hc08 and m68hc08
 --disable-s08-port      \
 --disable-stm8-port     \
 --disable-pdk-port      \  <== Have to specify both pdkNN and pdk
 --disable-pdk13-port    \
 --disable-pdk14-port    \
 --disable-pdk15-port    \
 --disable-mos6502-port  \
 --disable-xa-port       \  <== Not in help text
 --disable-rxk-port      \  <== Have to specify both rNk(a) and rxk
 --disable-f8-port       \  <== Not in help text

This allows make to complete, however running regression tests still fails.

$ make
....................................................................................................................
populated MakeList...
gce: gcc torture execute.. 158
m4: macro tests.. 1
qct: QuickC tests.. 108
tcc: tinycc tests.. 117
tpl: template tests.. 105
tst: plain tests.. 1476
at 1: error 131: cannot generate code for target 'ez80_z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'ez80_z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'ez80_z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ez80-z80/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ez80-z80/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ez80-z80/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'r3ka'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'r3ka'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'r3ka'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucr3ka/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucr3ka/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucr3ka/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-small regression tests
[...]
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucz80-resiy/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucz80-resiy/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucz80-resiy/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-large regression tests
[...]
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucz180-resiy/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucz180-resiy/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucz180-resiy/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/stm8/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/stm8/support.rel] Error 1
make[2]: *** [Makefile:433: gen/stm8/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'r2k'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'r2k'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'r2k'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucr2k/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucr2k/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucr2k/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'tlcs90'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'tlcs90'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'tlcs90'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/tlcs90/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/tlcs90/support.rel] Error 1
make[2]: *** [Makefile:433: gen/tlcs90/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'hc08'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'hc08'
Supported ports and corresponding port selection options:
at 1: error 131: cannot generate code for target 'hc08'
MCU 8051    -mmcs51
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/hc08/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/hc08/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/hc08/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/stm8-large/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/stm8-large/support.rel] Error 1
make[2]: *** [Makefile:433: gen/stm8-large/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'mos6502'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'mos6502'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'mos6502'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/uc6502/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/uc6502/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/uc6502/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'z80n'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z80n'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucz80n/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucz80n/support.rel] Error 1
at 1: error 131: cannot generate code for target 'z80n'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucz80n/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-small-stack-auto regression tests
[...]
at 1: error 131: cannot generate code for target 'r800'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'r800'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'r800'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucr800/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucr800/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucr800/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucz80-nmos/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucz80-nmos/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucz80-nmos/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-large-stack-auto regression tests
[...]
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucz180/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucz180/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucz180/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucz80-undoc/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucz80-undoc/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucz80-undoc/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/pdk15-stack-auto/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/pdk15-stack-auto/support.rel] Error 1
make[2]: *** [Makefile:433: gen/pdk15-stack-auto/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-medium regression tests
[...]
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/s08-stack-auto/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/s08-stack-auto/support.rel] Error 1
make[2]: *** [Makefile:433: gen/s08-stack-auto/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'r2ka'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'r2ka'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'r2ka'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucr2ka/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucr2ka/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucr2ka/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'sm83'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'sm83'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucgbz80/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
at 1: error 131: cannot generate code for target 'sm83'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:430: gen/ucgbz80/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucgbz80/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/pdk15/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/pdk15/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/pdk15/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'ds390'
at 1: error 131: cannot generate code for target 'ds390'
Supported ports and corresponding port selection options:
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'ds390'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:430: gen/ds390/support.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ds390/testfwk.rel] Error 1
make[2]: *** [Makefile:433: gen/ds390/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running host regression tests
[...]
at 1: error 131: cannot generate code for target 'pdk14'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'pdk14'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/pdk14/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/pdk14/support.rel] Error 1
at 1: error 131: cannot generate code for target 'pdk14'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/pdk14/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/ucz80/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucz80/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucz80/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-huge regression tests
[...]
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051    -mmcs51
make[2]: *** [Makefile:433: gen/s08/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/s08/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/s08/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
make: *** [Makefile:197: test-ports] Error 2

Related

Bugs: #3508
Commit: [7489ae]

Discussion

  • Philipp Klaus Krause

    Is this really two issues?

    The error messages you get look like the regression test infrastructure expects all ports to be enabled for your use case (plain make without any argument).

    That --disable-tlcs-port vs. --disable-tlcs90-port port, is it about uCsim? The only place in SDCC where I see --disable-tlcs-port used is in uCsim.

    AFAIK, uCsim does not support any TLCS other than the TLCS-90, so it would make sense to rename the option in uCsim. IMO, the TLCS-870 series is sufficently different from TLCS-90 that it would require a new port in uCsim anyway, and could not be handled by extending the TLCS-90 support. Even the TLCS-900, while more similar to the TLCS-90 AFAIK has a totally different instruction encoding, so it would likely needs its own port.

    On the other hand, also for some other ports, uCsim uses a differently-named disable option. E.g. --disable-hc08-port in SDCC vs. --disable-m68hc08-port.

     
  • Maarten Brock

    Maarten Brock - 2023-11-07

    Yes, it probably is.

    I definitely would prefer to need only one --disable-xxx-port to disable a target. So either these options should be renamed or the top configure script should pass the correct option to the ucsim configure script. And good catch that I overlooked hc08. The same probably goes for pdk and rxk.

    Some of the options that I found were also not mentioned for ./configure --help.

    And indeed, when sdcc is not configured for a target, I expect to see no failure for that target when running regression tests with plain make.

     
    • Daniel Drotos

      Daniel Drotos - 2024-08-29

      Enable/disable options are not passed to uCsim configure (as far as I know). In uCsim subtree, always all simulators are compiled --that needed for regtest--, regardless of selected SDCC ports. This is a safe solution and I think it's not a bug.

       
      • Steve Schnepp

        Steve Schnepp - 2024-08-29

        Hmmm... this is very counterintuitive, and I'm wondering the reasoning.

        I naively thought that for any testing (regression & otherwise), we only need to enable the simulator for the targets we intent to compile for.

        I don't get why we need to be able to emulate, for example, stm8 if stm8 compilation is disabled.

        What did I miss ?

         
        • Daniel Drotos

          Daniel Drotos - 2024-08-29

          No reason, really. It is up to you to disable compilation of stm8 simulator, if you don't need it. You don't have to enable it.

          uCsim configure (without disable/enable options) detects if it is compiled inside of SDCC tree or standalone. Simulators (and tools) compiled by default will be selected according to situation.

           
  • Maarten Brock

    Maarten Brock - 2023-11-07
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,8 +8,8 @@
      --disable-r2ka-port     \
      --disable-r3ka-port     \
      --disable-sm83-port     \
    
    - --disable-tlcs-port     \  &lt;== Have to specify both tlcs and tlcs90
    - --disable-tlcs90-port   \
    + --disable-tlcs-port     \
    + --disable-tlcs90-port   \  &lt;== Have to specify both tlcs and tlcs90
      --disable-ez80_z80-port \
      --disable-z80n-port     \
      --disable-r800-port     \  &lt;== already added to Makefile.common.in, Makefile.in, sdccconf_in.h
    @@ -18,17 +18,17 @@
      --disable-pic14-port    \
      --disable-pic16-port    \
      --disable-hc08-port     \
    - --disable-m68hc08-port  \
    + --disable-m68hc08-port  \  &lt;== Have to specify both hc08 and m68hc08
      --disable-s08-port      \
      --disable-stm8-port     \
    - --disable-pdk-port      \
    + --disable-pdk-port      \  &lt;== Have to specify both pdkNN and pdk
      --disable-pdk13-port    \
      --disable-pdk14-port    \
      --disable-pdk15-port    \
      --disable-mos6502-port  \
    - --disable-xa-port       \
    - --disable-rxk-port      \
    - --disable-f8-port       \
    + --disable-xa-port       \  &lt;== Not in help text
    + --disable-rxk-port      \  &lt;== Have to specify both rNk(a) and rxk
    + --disable-f8-port       \  &lt;== Not in help text
     ~~~
    
     This allows ```make``` to complete, however running regression tests still fails.
    
     
  • Steve Schnepp

    Steve Schnepp - 2023-12-11

    I also try to compile just stm8 & mcs51 (which are the only 2 MCU i have). It runs smoothly until the LD phase.

    ./configure --prefix=/usr/local/stow/sdcc-trunk/ --disable-non-free --disable-z80-port  --disable-z180-port --disable-r2k-port   --disable-z80-port        --disable-z180-port       --disable-r2k-port        --disable-r2ka-port       --disable-r3ka-port       --disable-sm83-port       --disable-tlcs90-port     --disable-ez80_z80-port   --disable-z80n-port       --disable-r800-port       --disable-ds390-port      --disable-ds400-port      --disable-pic14-port      --disable-pic16-port      --disable-hc08-port       --disable-s08-port        --disable-pdk13-port      --disable-pdk14-port      --disable-pdk15-port      --disable-mos6502-port
    
    [...]
    
    sdcc 4.3.6 is now configured for
    
      Build:                armv7l-unknown-linux-gnueabihf
      Host:                 armv7l-unknown-linux-gnueabihf
      Source directory:     .
      Yacc:                 bison -y
      C compiler:           gcc
      CFLAGS:               -pipe -ggdb -g -O2
      C++ compiler:         g++
      CXXFLAGS:             -pipe -ggdb -g -O2
      CPPFLAGS:
      LDFLAGS:
      MAKEDEP:              gcc -MM
      MAKEDEP_CXX:          g++ -MM
    
      ENABLED Ports:
        ds390               no
        ds400               no
        hc08                no
        s08                 no
        mcs51               yes
        pic14               no
        pic16               no
        z80                 no
        z180                no
        r2k                 no
        r2ka                no
        r3ka                no
        sm83                no
        tlcs90              no
        ez80_z80            no
        z80n                no
        r800                no
        stm8                yes
        pdk13               no
        pdk14               no
        pdk15               no
        pdk16               no
        mos6502             no
        mos65c02            no
    
      Disable non-free lib: 1
      Disable packihx:      0
      Disable ucsim:        0
      Disable device lib:   0
      Disable sdcpp:        0
      Disable sdcdb:        0
      Disable sdbinutil:    0
      Enable documentation: 0
      Enable libgc:         0
    

    And then it fails with

    g++ -pipe -ggdb -g -O2 -Wall -Wno-parentheses -pipe -ggdb -g -O2  -o sdcc NewAlloc.o dbuf.o dbuf_string.o findme.o SDCCy.o SDCChasht.o SDCCmain.o SDCCattr.o SDCCsymt.o SDCCopt.o SDCCast.o SDCCmem.o SDCCval.o SDCCicode.o SDCCbitv.o
     SDCCset.o SDCClabel.o SDCCBBlock.o SDCCloop.o SDCCcse.o SDCCcflow.o SDCCdflow.o SDCClrange.o SDCCptropt.o SDCCpeeph.o SDCCglue.o SDCCasm.o SDCCmacro.o SDCCutil.o SDCCdebug.o cdbFile.o SDCCdwarf2.o SDCCerr.o SDCCsystem.o SDCCgen.o SDCCle
    x.o SDCCbtree.o SDCCgenconstprop.o SDCClospre.o SDCCnaddr.o mcs51/port.a stm8/port.a  -lm
    /usr/bin/ld: stm8/port.a(ralloc2.o): in function `create_cfg(boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, cfg_node, boost::no_property, boost::no_property, boost::listS>&, boost::adjacency_list<boost::setS, boos
    t::vecS, boost::undirectedS, con_node, boost::no_property, boost::no_property, boost::listS>&, ebbIndex*)':
    /home/snide/src/sdcc/src/stm8/./../SDCCralloc.hpp:477: undefined reference to `btree_lowest_common_ancestor'
    /usr/bin/ld: /home/snide/src/sdcc/src/stm8/./../SDCCralloc.hpp:480: undefined reference to `btree_lowest_common_ancestor'
    /usr/bin/ld: stm8/port.a(ralloc2.o): in function `stm8_ralloc2_cc':
    /home/snide/src/sdcc/src/stm8/./../SDCCsalloc.hpp:138: undefined reference to `btree_lowest_common_ancestor'
    /usr/bin/ld: stm8/port.a(ralloc2.o): in function `set_spilt<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, cfg_node>, boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, con_node>, boost::adjacency
    _list<boost::setS, boost::vecS, boost::undirectedS, scon_node_t, scon_edge_t> >':
    /home/snide/src/sdcc/src/stm8/./../SDCCsalloc.hpp:213: undefined reference to `btree_lowest_common_ancestor'
    /usr/bin/ld: /home/snide/src/sdcc/src/stm8/./../SDCCsalloc.hpp:151: undefined reference to `btree_lowest_common_ancestor'
    /usr/bin/ld: SDCCmain.o: in function `main':
    /home/snide/src/sdcc/src/SDCCmain.c:2794: undefined reference to `yyin'
    /usr/bin/ld: SDCCy.o: in function `yyparse':
    /home/snide/src/sdcc/src/y.tab.c:2764: undefined reference to `yylex'
    /usr/bin/ld: /home/snide/src/sdcc/src/y.tab.c:2764: undefined reference to `yylex'
    /usr/bin/ld: /home/snide/src/sdcc/src/y.tab.c:6646: undefined reference to `yyerror'
    /usr/bin/ld: SDCCy.o: in function `yyparse':
    /home/snide/src/sdcc/src/SDCC.y:2615: undefined reference to `btree_add_child'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCC.y:798: undefined reference to `yytext'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCC.y:1327: undefined reference to `btree_add_child'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCC.y:2808: undefined reference to `btree_add_child'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCC.y:1592: undefined reference to `btree_add_child'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCC.y:1895: undefined reference to `btree_add_child'
    /usr/bin/ld: SDCCy.o: in function `yyparse':
    /home/snide/src/sdcc/src/y.tab.c:6757: undefined reference to `yyerror'
    /usr/bin/ld: SDCCsymt.o: in function `newSymbol':
    /home/snide/src/sdcc/src/SDCCsymt.c:349: undefined reference to `lexLineno'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCCsymt.c:349: undefined reference to `lexFilename'
    /usr/bin/ld: SDCCsymt.o: in function `mergeSpec':
    /home/snide/src/sdcc/src/SDCCsymt.c:873: undefined reference to `yytext'
    /usr/bin/ld: SDCCsymt.o: in function `mergeDeclSpec':
    /home/snide/src/sdcc/src/SDCCsymt.c:956: undefined reference to `yytext'
    /usr/bin/ld: SDCCast.o: in function `newAst_':
    /home/snide/src/sdcc/src/SDCCast.c:113: undefined reference to `lexFilename'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCCast.c:113: undefined reference to `lexLineno'
    /usr/bin/ld: SDCCast.o: in function `fixupInline':
    /home/snide/src/sdcc/src/SDCCast.c:6953: undefined reference to `btree_add_child'
    /usr/bin/ld: SDCCast.o: in function `newAst_VALUE':
    /home/snide/src/sdcc/src/SDCCast.c:121: undefined reference to `lexLineno'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCCast.c:121: undefined reference to `lexFilename'
    /usr/bin/ld: SDCCast.o: in function `newAst_OP':
    /home/snide/src/sdcc/src/SDCCast.c:129: undefined reference to `lexFilename'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCCast.c:129: undefined reference to `lexLineno'
    /usr/bin/ld: SDCCast.o: in function `newAst_LINK':
    /home/snide/src/sdcc/src/SDCCast.c:137: undefined reference to `lexLineno'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCCast.c:137: undefined reference to `lexFilename'
    /usr/bin/ld: SDCCast.o: in function `newNode':
    /home/snide/src/sdcc/src/SDCCast.c:152: undefined reference to `lexLineno'
    /usr/bin/ld: /home/snide/src/sdcc/src/SDCCast.c:152: undefined reference to `lexFilename'
    /usr/bin/ld: SDCCast.o: in function `createFunction':
    /home/snide/src/sdcc/src/SDCCast.c:7488: undefined reference to `lexLineno'
    /usr/bin/ld: SDCCmem.o: in function `redoStackOffsets':
    /home/snide/src/sdcc/src/SDCCmem.c:1126: undefined reference to `btree_add_symbol'
    
    [...]
    
     
    • Philipp Klaus Krause

      Which version of sdcc did you try to compile? On which host system?

      I've just tried current trunk

      ./configure --disable-non-free --disable-z80-port  --disable-z180-port --disable-r2k-port   --disable-z80-port        --disable-z180-port       --disable-r2k-port        --disable-r2ka-port       --disable-r3ka-port       --disable-sm83-port       --disable-tlcs90-port     --disable-ez80_z80-port   --disable-z80n-port       --disable-r800-port       --disable-ds390-port      --disable-ds400-port      --disable-pic14-port      --disable-pic16-port      --disable-hc08-port       --disable-s08-port        --disable-pdk13-port      --disable-pdk14-port      --disable-pdk15-port      --disable-mos6502-port
      

      on my Debian GNU/Linux testing on amd64 system, and it compiled fine; I did not see the linker errors you reported.

       
      • Steve Schnepp

        Steve Schnepp - 2023-12-12

        thanks.

        It is on my raspbian (armhf) box.
        gcc/g++ version 10.2.1.
        GNU ld version 2.35.2.

        I didn't try on amd64, will do.

         
        • Steve Schnepp

          Steve Schnepp - 2023-12-12

          Ok, I tried on a empty chroot

          debootstrap bullseye bullseye-armhf
          schroot -c bullseye-armhf -- apt-get install gcc g++ bison flex libboost-graph-dev make
          

          gives me a missing zilb.h

          compress.c:22:10: fatal error: zlib.h: No such file or directory
             22 | #include <zlib.h>
                |          ^~~~~~~~
          

          Which is solved with installing zlib1g-dev.

          And, then it does work correctly. False alert. Sorry!

          PS : The only thing might be to eventually add a test in the configure for zlib,

           
          • Philipp Klaus Krause

            The zlib configure issue is known (though I'm not familiar enough with build infrastructure to fix it): https://sourceforge.net/p/sdcc/bugs/3508/

             
            • Steve Schnepp

              Steve Schnepp - 2023-12-13

              oh. i'll look into it, as i'm more knowleageable in build systems than compilers.

              thanks!

               
              • Steve Schnepp

                Steve Schnepp - 2023-12-13

                It's actually very easy. It only takes a new single line

                Index: configure.ac
                ===================================================================
                --- configure.ac        (revision 14528)
                +++ configure.ac        (working copy)
                @@ -81,6 +81,7 @@
                
                 AC_CHECK_HEADERS(endian.h sys/endian.h machine/endian.h sys/isa_defs.h)
                 AC_CHECK_HEADERS(uchar.h)
                +AC_CHECK_HEADERS(zlib.h,,AC_MSG_ERROR([[zlib library not found (zlib.h).]]))
                 AC_LANG_PUSH([C++])
                 AC_CHECK_HEADERS(treedec/combinations.hpp,,AC_MSG_NOTICE([[treedec library missing, falling back to Thorup.]]))
                 AC_CHECK_HEADERS(gala/graph.h)
                
                 
                • Philipp Klaus Krause

                  Which configure.ac? support/sdbinutils/configure.ac? support/cpp/configure.ac? If yes to at least one of those: do you happen to know why upstream GNU binutils or GCC didn't put it into their configure.ac?

                   
                  • Steve Schnepp

                    Steve Schnepp - 2023-12-13

                    I did put it in the topmost one, as the diff implied (it is from a svn diff).

                    It actually doesn't do anything more than halting the configure script when zlib.h is missing, so it has minimal impact i'd say.

                    It is merely a courtesy of showing to the user that zlib.h is required, in the very same way that boost/graph/adjacency_list.hpp is. It doesn't offer any alternative, configurable or not.

                    As of why didn't GCC put it in their configure.ac, they actually did in a different way. As they have to ensure that the zlib.h is compatible, or provide their own, so their configuration is very different.

                    Which makes me think that we might have a misunderstanding here.

                    The library zlib is always present as very central to the system, so that's not the problem. The issue here is the header zlib.h is missing which comes from the dev package of zlib.

                    schroot -c bullseye-armhf -- dpkg -l | grep zlib
                    ii  zlib1g:armhf                         1:1.2.11.dfsg-2+deb11u2      armhf        compression library - runtime
                    ii  zlib1g-dev:armhf                     1:1.2.11.dfsg-2+deb11u2      armhf        compression library - development
                    

                    Notice that there's 2 packages. The 1rst one is always installed, but the 2nd is required to be able to compile SDCC.

                    Hopes it clarifies. If not, feel free to ask more.

                     
                    • Philipp Klaus Krause

                      Thanks. I made the change in [r14532].

                       

                      Related

                      Commit: [r14532]

                      • Steve Schnepp

                        Steve Schnepp - 2023-12-13

                        Awesome. thanks !

                         
  • Philipp Klaus Krause

    Since the sdcc from thr f8 branch has been merged to trunk, the --disbale-f8-port is in the help output. How much of this bug report still applies to current SDCC from trunk?

     
    • Maarten Brock

      Maarten Brock - 2024-08-14

      This is already reason for concern:

      $ ./configure --disable-z80-port --disable-z180-port \
        --disable-r2k-port --disable-r2ka-port --disable-r3ka-port \
        --disable-sm83-port --disable-tlcs90-port \
        --disable-ez80-z80-port --disable-z80n-port --disable-r800-port \
        --disable-ds390-port --disable-ds400-port --disable-pic14-port \
        --disable-pic16-port --disable-hc08-port --disable-s08-port \
        --disable-stm8-port --disable-pdk13-port --disable-pdk14-port \
        --disable-pdk15-port --disable-mos6502-port \
        --disable-mos65c02-port --disable-f8-port
      
      ...
      Compile for SDCC  yes
      Compile dlso      no
      Compile ucsim     no    <-- Huh? Why?
      Compile s51       yes
      Compile avr       no
      Compile z80       no
      Compile tlcs      yes  <-- not disabled
      Compile m68hc08   yes  <-- not disabled
      Compile s08       no
      Compile xa        yes  <-- not disabled
      Compile stm8      no
      Compile pdk       yes  <-- not disabled
      Compile st7       no
      Compile p1516     no
      Compile m6809     no
      Compile m6800     no
      Compile m68hc11   no
      Compile m68hc12   no
      Compile mos6502   no
      Compile rxk       yes  <-- not disabled
      Compile pblaze    no
      Compile i8085     no
      Compile f8        no
      Compile i8048     no
      Compile oisc      no
      Compile serio     no
      

      This look OK

      sdcc 4.4.3 is now configured for
      
        Build:                x86_64-pc-linux-gnu
        Host:                 x86_64-pc-linux-gnu
        Source directory:     .
        Yacc:                 byacc
        C compiler:           gcc
        CFLAGS:               -pipe -ggdb -g -O2
        C++ compiler:         g++
        CXXFLAGS:             -pipe -ggdb -g -O2
        CPPFLAGS:             
        LDFLAGS:              
        MAKEDEP:              gcc -MM
        MAKEDEP_CXX:          g++ -MM
      
        ENABLED Ports:
          ds390               no
          ds400               no
          hc08                no
          s08                 no
          mcs51               yes
          pic14               no
          pic16               no
          z80                 no
          z180                no
          r2k                 no
          r2ka                no
          r3ka                no
          sm83                no
          tlcs90              no
          ez80_z80            no
          z80n                no
          r800                no
          stm8                no
          pdk13               no
          pdk14               no
          pdk15               no
          pdk16               no
          mos6502             no
          mos65c02            no
          f8                  no
      
        Disable non-free lib: 0
        Disable packihx:      0
        Disable ucsim:        0
        Disable device lib:   0
        Disable sdcpp:        0
        Disable sdcdb:        0
        Disable sdbinutil:    0
        Enable documentation: 0
        Enable libgc:         0
      

      Make fails with:

      /usr/bin/ld: SDCCmain.o: warning: relocation against `f8_port' in read-only section `.text.startup'
      /usr/bin/ld: SDCCmain.o: in function `_setPort':
      /home/maartenbrock/sdcc/src/SDCCmain.c:396:(.text+0x1af): undefined reference to `f8_port'
      /usr/bin/ld: /home/maartenbrock/sdcc/src/SDCCmain.c:401:(.text+0x1c9): undefined reference to `f8_port'
      /usr/bin/ld: SDCCmain.o: in function `fprintf':
      /usr/include/x86_64-linux-gnu/bits/stdio2.h:79:(.text+0x24c): undefined reference to `f8_port'
      /usr/bin/ld: /usr/include/x86_64-linux-gnu/bits/stdio2.h:79:(.text+0x253): undefined reference to `f8_port'
      /usr/bin/ld: SDCCmain.o: in function `_setPort':
      /home/maartenbrock/sdcc/src/SDCCmain.c:396:(.text+0x2b3): undefined reference to `f8_port'
      /usr/bin/ld: SDCCmain.o:/usr/include/x86_64-linux-gnu/bits/stdio2.h:79: more undefined references to `f8_port' follow
      /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
      collect2: error: ld returned 1 exit status
      make[1]: *** [Makefile:100: sdcc] Error 1
      make: *** [Makefile:153: sdcc-cc] Error 2
      
       
      • Philipp Klaus Krause

        I fixed --disable-f8-port in [r14967], i.e. the SDCC part of this issue is fixed now. The "This is already reason for concern" part is from the configure script of uCsim.

         

        Related

        Commit: [r14967]

      • Daniel Drotos

        Daniel Drotos - 2024-08-29

        Messages from uCsim configure script are for uCsim development, do not interpret them as like SDCC messages.

         
  • Daniel Drotos

    Daniel Drotos - 2024-10-04
    • assigned_to: Daniel Drotos
    • Category: Build --> Simulator
     
  • Daniel Drotos

    Daniel Drotos - 2024-10-16
    • status: open --> closed-fixed
     
  • Daniel Drotos

    Daniel Drotos - 2024-10-16
     

    Related

    Commit: [r15046]


Log in to post a comment.

MongoDB Logo MongoDB