karosium / smbusb

USB SMBus Interface
GNU Lesser General Public License v2.1
142 stars 42 forks source link

Arch Linux SDCC 3.6.0-4 build fail #4

Closed sheinz closed 7 years ago

sheinz commented 7 years ago

Build is failing with Arch Linux because of the newer version of SDCC (3.6.0-4)

make
Making all in firmware
make[1]: Entering directory '/home/user/src/smbusb/firmware'
Makefile:17: warning: overriding recipe for target 'clean'
../fx2lib/lib/fx2.mk:100: warning: ignoring old recipe for target 'clean'
mkdir -p build
for a in dscr.a51; do \
 cp $a build/; \
 cd build && sdas8051 -logs `basename $a` && cd ..; done
for s in smbusb_firmware.c; do \
 THISREL=$(basename `echo "$s" | sed -e 's/\.c$/\.rel/'`); \
 sdcc -mmcs51  --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -c -I ../fx2lib/include -I "" $s -o build/$THISREL ; done
smbusb_firmware.c:851: warning 85: in function handle_get_interface unreferenced function argument : 'ifc'
smbusb_firmware.c:860: warning 85: in function handle_set_interface unreferenced function argument : 'ifc'
smbusb_firmware.c:860: warning 85: in function handle_set_interface unreferenced function argument : 'alt_ifc'
sdcc -mmcs51  --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -o build/smbusb_firmware.ihx build/smbusb_firmware.rel build/dscr.rel fx2.lib -L ../fx2lib/lib
make[1]: *** [../fx2lib/lib/fx2.mk:84: build/smbusb_firmware.ihx] Error 1
make[1]: Leaving directory '/home/user/src/smbusb/firmware'
make: *** [Makefile:385: all-recursive] Error 1

Failing command:

sdcc -mmcs51  --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -o build/smbusb_firmware.ihx build/smbusb_firmware.rel build/dscr.rel fx2.lib -L ../fx2lib/lib -V
+ /usr/bin/sdld -nf build/smbusb_firmware.lk
+ /usr/bin/sdld -nf build/smbusb_firmware.lk returned errorcode 139

If sdcc is downgraded to 3.6.0-3 smbusb builds successfully:

downgrade sdcc
sheinz commented 7 years ago

It seems like not an smbusb issue. I created issue in fx2lib https://github.com/djmuhlestein/fx2lib/issues/28

karosium commented 7 years ago

Issue could be in the arch sdcc package: https://bugs.archlinux.org/task/54814

sheinz commented 7 years ago

Thanks @karosium,

I've just built the latest sdcc from sdcc-svn aur and it builds OK after correcting getchar/putchar signatures in serial.h