Menu ▾ ▴

#2724 Problem building SDCC when using yacc/byacc.

closed-fixed
None
Build
5
2018-03-05
2018-02-20
No

This is the follow up bug report from my email:
https://sourceforge.net/p/sdcc/mailman/message/36230904/

I noticed this when trying to build SDCC 3.7.0-rc2, -rc1, and snapshots from the last couple of weeks.

The problem is that when configure uses yacc (OpenBSD base) or byacc (Debian), make (gmake on openbsd) produces a header file named:
sim/ucsim/cmd.src/cmdpars.h
and the build fails because the file should be named:
sim/ucsim/cmd.src/cmdpars.hh

If I do this:
mv sim/ucsim/cmd.src/cmdpars.h sim/ucsim/cmd.src/cmdpars.hh
and run make again, the build completes successfully. By that I mean:
bin/sdcc --version
works. I didn't actually try to use sdcc.

If configure uses bison then cmdpars.hh is created and make completes successfully without intervention.

In the email I stated that the yacc/byacc cmdpars.h is valid and just needs to be renamed cmdpars.hh, but I'm not so sure about that after comparing the bison generated files with the yacc/byacc generated files.

I have attached several yacc/byacc/bison generated files for your comparison.

The bison generated files are identical across OpenBSD/Debian/Arch.

The contents of the yacc generated files on OpenBSD and byacc generated files on Debian are very different from each other and even more different than the bison files.

One last bit: I was able to build SDCC 3.6.0 without issue. OpenBSD's base yacc produced a file named cmdpars.hh and I got the correct output from bin/sdcc --version

Attachments: (all created when building SDCC 3.7.0-rc2)
Generated with yacc (in base) on OpenBSD 6.2-current (2018-02-16)
cmdpars.cc.openbsd_yacc
cmdpars.h.openbsd_yacc

Generated with bison on OpenBSD 6.2-current (2018-02-16)
cmdpars.cc.openbsd
cmdpars.hh.openbsd

Generated with byacc on Debian testing/buster
cmdpars.cc.debian_byacc
cmdpars.h.debian_byacc

Generated with bison on Debian testing/buster
cmdpars.cc.debian
cmdpars.hh.debian

Generated with bison on Arch Linux (updated 2018-02-19)
cmdpars.cc.arch
cmdpars.hh.arch

10 Attachments

Discussion

  • Philipp Klaus Krause

    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

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

    This should be fixed in[r10252]. Could you please test?

    Philipp

     
    • Barry Grumbine

      Barry Grumbine - 2018-03-05

      Looks good.

      I tested the sdcc r10527 nightly. It compiles and runs without issue on OpenBSD w/ yacc, Debian w/ byacc and Arch w/ byacc.

      OpenBSD

      $ uname -a             
      OpenBSD T520.my.domain 6.3 GENERIC.MP#29 amd64
      
      $ grep yacc config.log 
      configure:4479: checking for byacc
      configure:4479: checking for yacc
      configure:4495: found /usr/bin/yacc
      configure:4506: result: yacc
        Yacc:                 yacc
      ac_cv_prog_YACC=yacc
      YACC='yacc'
      
      $ ./bin/sdcc --version
      SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.7.1 #10257 (OpenBSD)
      published under GNU General Public License (GPL)
      

      Debian

      $ uname -a
      Linux gigabyte 4.14.0-3-amd64 #1 SMP Debian 4.14.13-1 (2018-01-14) x86_64 GNU/Linux
      
      $ grep byacc config.log
      configure:4479: checking for byacc
      configure:4495: found /usr/bin/byacc
      configure:4506: result: byacc
        Yacc:                 byacc
      ac_cv_prog_YACC=byacc
      YACC='byacc'
      
      $ ./bin/sdcc --version
      SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.7.1 #10257 (Linux)
      published under GNU General Public License (GPL)
      

      Arch

      $ uname -a
      Linux m58b 4.15.6-1-ARCH #1 SMP PREEMPT Sun Feb 25 12:53:23 UTC 2018 x86_64 GNU/Linux
      
      $ grep byacc config.log
      configure:4479: checking for byacc
      configure:4495: found /usr/bin/byacc
      configure:4506: result: byacc
        Yacc:                 byacc
      ac_cv_prog_YACC=byacc
      YACC='byacc'
      
      $ ./bin/sdcc --version
      SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.7.1 #10257 (Linux)
      published under GNU General Public License (GPL)
      

      Thanks,
      Barry

       
  • Philipp Klaus Krause

    • status: pending-fixed --> closed-fixed
    • Category: other --> Build
     

Log in to post a comment.