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
This should be fixed in[r10252]. Could you please test?
Philipp
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
Debian
Arch
Thanks,
Barry