5
3
Fork
You've already forked libfx2
0

build issue with latest sdcc svn version #11

Closed
opened 2023年05月28日 15:25:45 +02:00 by mcuee · 13 comments
mcuee commented 2023年05月28日 15:25:45 +02:00 (Migrated from github.com)
Copy link

Somehow the build failed with latest svn version of sdcc.
Tested under Ubuntu 20.04.

mcuee@UbuntuSwift3:~/build/cyusb/libfx2$ make -C firmware
...
...
sdcc -mmcs51 --std-sdcc99 -Iinclude --model-huge -c -o build/huge/usbdfu.rel usbdfu.c
include/fx2ints.h:43: warning 283: function declarator with no prototype
include/fx2ints.h:44: warning 283: function declarator with no prototype
include/fx2ints.h:45: warning 283: function declarator with no prototype
include/fx2ints.h:46: warning 283: function declarator with no prototype
include/fx2ints.h:47: warning 283: function declarator with no prototype
include/fx2ints.h:48: warning 283: function declarator with no prototype
include/fx2ints.h:49: warning 283: function declarator with no prototype
include/fx2ints.h:50: warning 283: function declarator with no prototype
include/fx2ints.h:51: warning 283: function declarator with no prototype
include/fx2ints.h:52: warning 283: function declarator with no prototype
include/fx2ints.h:53: warning 283: function declarator with no prototype
include/fx2ints.h:54: warning 283: function declarator with no prototype
include/fx2ints.h:55: warning 283: function declarator with no prototype
include/fx2ints.h:77: warning 283: function declarator with no prototype
include/fx2ints.h:78: warning 283: function declarator with no prototype
include/fx2ints.h:79: warning 283: function declarator with no prototype
include/fx2ints.h:80: warning 283: function declarator with no prototype
include/fx2ints.h:81: warning 283: function declarator with no prototype
include/fx2ints.h:82: warning 283: function declarator with no prototype
include/fx2ints.h:83: warning 283: function declarator with no prototype
include/fx2ints.h:84: warning 283: function declarator with no prototype
include/fx2ints.h:85: warning 283: function declarator with no prototype
include/fx2ints.h:86: warning 283: function declarator with no prototype
include/fx2ints.h:87: warning 283: function declarator with no prototype
include/fx2ints.h:88: warning 283: function declarator with no prototype
include/fx2ints.h:89: warning 283: function declarator with no prototype
include/fx2ints.h:90: warning 283: function declarator with no prototype
include/fx2ints.h:91: warning 283: function declarator with no prototype
include/fx2ints.h:92: warning 283: function declarator with no prototype
include/fx2ints.h:93: warning 283: function declarator with no prototype
include/fx2ints.h:94: warning 283: function declarator with no prototype
include/fx2ints.h:95: warning 283: function declarator with no prototype
include/fx2ints.h:96: warning 283: function declarator with no prototype
include/fx2ints.h:97: warning 283: function declarator with no prototype
include/fx2ints.h:98: warning 283: function declarator with no prototype
include/fx2ints.h:99: warning 283: function declarator with no prototype
include/fx2ints.h:100: warning 283: function declarator with no prototype
include/fx2ints.h:101: warning 283: function declarator with no prototype
include/fx2ints.h:102: warning 283: function declarator with no prototype
include/fx2ints.h:103: warning 283: function declarator with no prototype
include/fx2ints.h:126: warning 283: function declarator with no prototype
include/fx2ints.h:127: warning 283: function declarator with no prototype
include/fx2ints.h:128: warning 283: function declarator with no prototype
include/fx2ints.h:129: warning 283: function declarator with no prototype
include/fx2ints.h:130: warning 283: function declarator with no prototype
include/fx2ints.h:131: warning 283: function declarator with no prototype
include/fx2ints.h:132: warning 283: function declarator with no prototype
include/fx2ints.h:133: warning 283: function declarator with no prototype
include/fx2ints.h:134: warning 283: function declarator with no prototype
include/fx2ints.h:135: warning 283: function declarator with no prototype
include/fx2ints.h:136: warning 283: function declarator with no prototype
include/fx2ints.h:137: warning 283: function declarator with no prototype
include/fx2ints.h:138: warning 283: function declarator with no prototype
include/fx2ints.h:139: warning 283: function declarator with no prototype
include/fx2usb.h:186: warning 283: function declarator with no prototype
include/fx2usbdfu.h:60: warning 283: function declarator with no prototype
sdar rc lib/huge/fx2dfu.lib build/huge/usbdfu.rel
sdcc -mmcs51 --std-sdcc99 -Iinclude --model-huge -c -o build/huge/uf2scsi.rel uf2scsi.c
sdcc -mmcs51 --std-sdcc99 -Iinclude --model-huge -c -o build/huge/uf2fat.rel uf2fat.c
sdar rc lib/huge/fx2uf2.lib build/huge/uf2scsi.rel build/huge/uf2fat.rel
make[1]: Leaving directory '/home/mcuee/build/cyusb/libfx2/firmware/library'
make[1]: Entering directory '/home/mcuee/build/cyusb/libfx2/firmware/boot-cypress'
sdcc -mmcs51 --iram-size 0x100 --code-size 0x3e00 --xram-loc 0x3e00 --xram-size 0x0200 --std-sdcc99 --model-small -I../library/include -L../library/lib/small -Wp,-MQ,build/main.rel,-MMD,build/main.d -c -o build/main.rel main.c
sdcpp: warning: '-x c' after last input file has no effect
cc1: fatal error: build/main.d: No such file or directory
compilation terminated.
at 1: warning 190: ISO C forbids an empty translation unit
subprocess error 256
make[1]: *** [../library/fx2rules.mk:39: build/main.rel] Error 1
make[1]: Leaving directory '/home/mcuee/build/cyusb/libfx2/firmware/boot-cypress'
make: *** [Makefile:4: all] Error 2
make: Leaving directory '/home/mcuee/build/cyusb/libfx2/firmware'
mcuee@UbuntuSwift3:~/build/cyusb/libfx2$ sdcc -v
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502 TD- 4.2.14 #14088 (Linux)
published under GNU General Public License (GPL)
Somehow the build failed with latest svn version of sdcc. Tested under Ubuntu 20.04. ``` mcuee@UbuntuSwift3:~/build/cyusb/libfx2$ make -C firmware ... ... sdcc -mmcs51 --std-sdcc99 -Iinclude --model-huge -c -o build/huge/usbdfu.rel usbdfu.c include/fx2ints.h:43: warning 283: function declarator with no prototype include/fx2ints.h:44: warning 283: function declarator with no prototype include/fx2ints.h:45: warning 283: function declarator with no prototype include/fx2ints.h:46: warning 283: function declarator with no prototype include/fx2ints.h:47: warning 283: function declarator with no prototype include/fx2ints.h:48: warning 283: function declarator with no prototype include/fx2ints.h:49: warning 283: function declarator with no prototype include/fx2ints.h:50: warning 283: function declarator with no prototype include/fx2ints.h:51: warning 283: function declarator with no prototype include/fx2ints.h:52: warning 283: function declarator with no prototype include/fx2ints.h:53: warning 283: function declarator with no prototype include/fx2ints.h:54: warning 283: function declarator with no prototype include/fx2ints.h:55: warning 283: function declarator with no prototype include/fx2ints.h:77: warning 283: function declarator with no prototype include/fx2ints.h:78: warning 283: function declarator with no prototype include/fx2ints.h:79: warning 283: function declarator with no prototype include/fx2ints.h:80: warning 283: function declarator with no prototype include/fx2ints.h:81: warning 283: function declarator with no prototype include/fx2ints.h:82: warning 283: function declarator with no prototype include/fx2ints.h:83: warning 283: function declarator with no prototype include/fx2ints.h:84: warning 283: function declarator with no prototype include/fx2ints.h:85: warning 283: function declarator with no prototype include/fx2ints.h:86: warning 283: function declarator with no prototype include/fx2ints.h:87: warning 283: function declarator with no prototype include/fx2ints.h:88: warning 283: function declarator with no prototype include/fx2ints.h:89: warning 283: function declarator with no prototype include/fx2ints.h:90: warning 283: function declarator with no prototype include/fx2ints.h:91: warning 283: function declarator with no prototype include/fx2ints.h:92: warning 283: function declarator with no prototype include/fx2ints.h:93: warning 283: function declarator with no prototype include/fx2ints.h:94: warning 283: function declarator with no prototype include/fx2ints.h:95: warning 283: function declarator with no prototype include/fx2ints.h:96: warning 283: function declarator with no prototype include/fx2ints.h:97: warning 283: function declarator with no prototype include/fx2ints.h:98: warning 283: function declarator with no prototype include/fx2ints.h:99: warning 283: function declarator with no prototype include/fx2ints.h:100: warning 283: function declarator with no prototype include/fx2ints.h:101: warning 283: function declarator with no prototype include/fx2ints.h:102: warning 283: function declarator with no prototype include/fx2ints.h:103: warning 283: function declarator with no prototype include/fx2ints.h:126: warning 283: function declarator with no prototype include/fx2ints.h:127: warning 283: function declarator with no prototype include/fx2ints.h:128: warning 283: function declarator with no prototype include/fx2ints.h:129: warning 283: function declarator with no prototype include/fx2ints.h:130: warning 283: function declarator with no prototype include/fx2ints.h:131: warning 283: function declarator with no prototype include/fx2ints.h:132: warning 283: function declarator with no prototype include/fx2ints.h:133: warning 283: function declarator with no prototype include/fx2ints.h:134: warning 283: function declarator with no prototype include/fx2ints.h:135: warning 283: function declarator with no prototype include/fx2ints.h:136: warning 283: function declarator with no prototype include/fx2ints.h:137: warning 283: function declarator with no prototype include/fx2ints.h:138: warning 283: function declarator with no prototype include/fx2ints.h:139: warning 283: function declarator with no prototype include/fx2usb.h:186: warning 283: function declarator with no prototype include/fx2usbdfu.h:60: warning 283: function declarator with no prototype sdar rc lib/huge/fx2dfu.lib build/huge/usbdfu.rel sdcc -mmcs51 --std-sdcc99 -Iinclude --model-huge -c -o build/huge/uf2scsi.rel uf2scsi.c sdcc -mmcs51 --std-sdcc99 -Iinclude --model-huge -c -o build/huge/uf2fat.rel uf2fat.c sdar rc lib/huge/fx2uf2.lib build/huge/uf2scsi.rel build/huge/uf2fat.rel make[1]: Leaving directory '/home/mcuee/build/cyusb/libfx2/firmware/library' make[1]: Entering directory '/home/mcuee/build/cyusb/libfx2/firmware/boot-cypress' sdcc -mmcs51 --iram-size 0x100 --code-size 0x3e00 --xram-loc 0x3e00 --xram-size 0x0200 --std-sdcc99 --model-small -I../library/include -L../library/lib/small -Wp,-MQ,build/main.rel,-MMD,build/main.d -c -o build/main.rel main.c sdcpp: warning: '-x c' after last input file has no effect cc1: fatal error: build/main.d: No such file or directory compilation terminated. at 1: warning 190: ISO C forbids an empty translation unit subprocess error 256 make[1]: *** [../library/fx2rules.mk:39: build/main.rel] Error 1 make[1]: Leaving directory '/home/mcuee/build/cyusb/libfx2/firmware/boot-cypress' make: *** [Makefile:4: all] Error 2 make: Leaving directory '/home/mcuee/build/cyusb/libfx2/firmware' mcuee@UbuntuSwift3:~/build/cyusb/libfx2$ sdcc -v SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502 TD- 4.2.14 #14088 (Linux) published under GNU General Public License (GPL) ```
mcuee commented 2023年05月28日 16:43:34 +02:00 (Migrated from github.com)
Copy link

No issues with the sdcc 3.9 release version. I wil test other release version.

No issues with the sdcc 3.9 release version. I wil test other release version.

Could you perhaps report this against sdcc? That seems like a regression then.

Could you perhaps report this against sdcc? That seems like a regression then.
mcuee commented 2023年05月28日 16:51:09 +02:00 (Migrated from github.com)
Copy link

Could you perhaps report this against sdcc? That seems like a regression then.

I will try other sdcc release version and then report to sdcc. Thanks.

> Could you perhaps report this against sdcc? That seems like a regression then. I will try other sdcc release version and then report to sdcc. Thanks.
mcuee commented 2023年05月28日 17:40:55 +02:00 (Migrated from github.com)
Copy link

I just tried sdcc 4.2.0 release and it is okay. So there seems to be a regression in svn. I will report to sdcc.

I just tried sdcc 4.2.0 release and it is okay. So there seems to be a regression in svn. I will report to sdcc.

Thanks! I'll close it here. Let me know if it's actually a libfx2 bug and I'll reopen.

Thanks! I'll close it here. Let me know if it's actually a libfx2 bug and I'll reopen.
mcuee commented 2023年05月29日 05:07:38 +02:00 (Migrated from github.com)
Copy link

Further discussion is in the mailing list. I will update further.
https://sourceforge.net/p/sdcc/mailman/message/37851015/

Further discussion is in the mailing list. I will update further. https://sourceforge.net/p/sdcc/mailman/message/37851015/
mcuee commented 2023年05月29日 09:05:52 +02:00 (Migrated from github.com)
Copy link

The fix for the sdcc svn version as per the sdcc mailing list discussion.

diff --git a/firmware/library/fx2rules.mk b/firmware/library/fx2rules.mk
index 0a8e44b..7580f5a 100644
--- a/firmware/library/fx2rules.mk
+++ b/firmware/library/fx2rules.mk
@@ -36,7 +36,7 @@ $(LIBFX2)/.stamp: $(wildcard $(LIBFX2)/*.c $(LIBFX2)/*.asm $(LIBFX2)/include/*.h
 -include build/*.d
 build/%.rel: %.c
 @mkdir -p $(dir $@)
- $(SDCC) -Wp,-MQ,$@,-MMD,build/$*.d -c -o $@ $<
+ $(SDCC) -Wp,-MQ,$@,-MMD,-MF,build/$*.d -c -o $@ $<
 build/%.rel: %.asm
 @mkdir -p $(dir $@)

Unfortunately it will break the build for the sdcc release version like latest 4.2.0 release.

The fix for the sdcc svn version as per the sdcc mailing list discussion. ``` diff --git a/firmware/library/fx2rules.mk b/firmware/library/fx2rules.mk index 0a8e44b..7580f5a 100644 --- a/firmware/library/fx2rules.mk +++ b/firmware/library/fx2rules.mk @@ -36,7 +36,7 @@ $(LIBFX2)/.stamp: $(wildcard $(LIBFX2)/*.c $(LIBFX2)/*.asm $(LIBFX2)/include/*.h -include build/*.d build/%.rel: %.c @mkdir -p $(dir $@) - $(SDCC) -Wp,-MQ,$@,-MMD,build/$*.d -c -o $@ $< + $(SDCC) -Wp,-MQ,$@,-MMD,-MF,build/$*.d -c -o $@ $< build/%.rel: %.asm @mkdir -p $(dir $@) ``` Unfortunately it will break the build for the sdcc release version like latest 4.2.0 release.
mcuee commented 2023年05月29日 14:52:09 +02:00 (Migrated from github.com)
Copy link

@whitequark

BTW, the warnings 283 can be suppressed by the following as per @spth but he does not recommend to go this route.

#pragma disable_warning 283
@whitequark BTW, the warnings 283 can be suppressed by the following as per @spth but he does not recommend to go this route. ``` #pragma disable_warning 283 ```
mcuee commented 2023年10月30日 14:21:28 +01:00 (Migrated from github.com)
Copy link

Please also refer to the fix in fx2lib here.

Please also refer to the fix in fx2lib here. * https://github.com/djmuhlestein/fx2lib/pull/36

That seems like an entirely unrelated fix.

That seems like an entirely unrelated fix.
carlossless commented 2024年01月25日 17:57:23 +01:00 (Migrated from github.com)
Copy link

@whitequark what do you think about a two-pass solution mentioned here - https://sourceforge.net/p/sdcc/mailman/message/37851121/ ?

Based on my testing, this seems to work both for sddc 4.3.0 and 4.2.0.

@whitequark what do you think about a two-pass solution mentioned here - https://sourceforge.net/p/sdcc/mailman/message/37851121/ ? Based on my testing, this seems to work both for sddc 4.3.0 and 4.2.0.
spth commented 2024年01月25日 18:12:22 +01:00 (Migrated from github.com)
Copy link

How about future SDCC 4.4.0? There already is SDCC 4.4.0 RC3.

How about future SDCC 4.4.0? There already is SDCC 4.4.0 RC3.

Fixed in #15, thanks!

Fixed in #15, thanks!
Sign in to join this conversation.
No Branch/Tag specified
main
v0.16
v0.15
v0.14
v0.13
v0.12
v0.11
v0.10
v0.9
v0.8
v0.7
v0.6
v0.5
v0.4
v0.3
v0.2
v0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
GlasgowEmbedded/libfx2#11
Reference in a new issue
GlasgowEmbedded/libfx2
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?