A clean parallel build of SDCC fails with:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_asxxxx_vec -DHAVE_plugin_vec -DBINDIR=\"/mnt/share/local/sdcc420/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -g -O2 -MT asxxxx.lo -MD -MP -MF .deps/asxxxx.Tpo -c asxxxx.c -o asxxxx.o
asxxxx.c:83:10: fatal error: bfd.h: No such file or directory
83 | #include "bfd.h"
| ^~~~~~~
restarting the build will complete successfully.
The issue shows seems to be related with systems with high single thread CPU performance and disabling a few ports.
the following lines make the issue 100% reproducible on my system (i9-9900k):
make distclean
./configure --disable-pic16-port --disable-pic14-port --disable-ds390-port --disable-ds400-port --disable-mcs51-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-pdk13-port --disable-pdk14-port --disable-pdk15-port --prefix=/mnt/share/local/sdcc-exp/
make -j 16
The issue exists at least from [r13085]
I was not able to reproduce the issue without disabling any ports.
Can you check if this issue still exists in current SDCC?
In May 2022, then-current upstream GNU binutils was merged into our fork, so this issue might be gone by now.