Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Error from SDCC compiler #10

Closed
n6il opened this issue Nov 8, 2014 · 1 comment
Closed

Internal Error from SDCC compiler #10

n6il opened this issue Nov 8, 2014 · 1 comment

Comments

@n6il
Copy link
Contributor

n6il commented Nov 8, 2014

I am trying to build a kernel image for z80pack. There seems to be some error from the sdcc compiler and I'm not sure what to do about it.

$ make
rm platform
ln -sf platform-z80pack platform
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C platform-z80pack
make[1]: Nothing to be done for `all'.
sdcc -c --std-sdcc99 --no-std-crt0 -mz80 -I/Users/n6il/Development/Fusix/FUZIX/Kernel/cpu-z80 -I/Users/n6il/Development/Fusix/FUZIX/Kernel/platform-z80pack -I/Users/n6il/Development/Fusix/FUZIX/Kernel/include --max-allocs-per-node 30000 --opt-code-size --Werror --stack-auto --constseg CONST --codeseg CODE2 syscall_proc.c
Internal error: validateLink failed in SPEC_NOUN(type) @ /Users/sdcc-builder/build/sdcc-build/orig/sdcc/src/SDCCcse.c:1667: expected SPECIFIER, got DECLARATOR
make: *** [syscall_proc.rel] Error 1

I played around a bit and figured out it is line 257 of the waitpid function in syscall_pid.c

252 int16_t _waitpid(void)
253 {
254         ptptr p;
255         int retval;
256 
257         if (statloc && !valaddr((char *) statloc, sizeof(int))) {
258                 udata.u_error = EFAULT;
259                 return (-1);
260         }
261 

This is so simple I have no idea why the compiler is barfing on this.

#define statloc (int *)udata.u_argn1
if (statloc
if ((int *)udata.u_argn1

I have the 11/04 snapshot of SDCC

$ sdcc -v
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.4.1 #9093 (Nov  4 2014) (Mac OS X i386)
published under GNU General Public License (GPL)

and just pulled the latest FUZIX code.

commit 3faa2dff49c39b2a9fa59009b84a398912dd1be0
Author: Alan Cox <alan@etchedpixels.co.uk>
Date:   Fri Nov 7 20:51:12 2014 +0000

    msx1: memory mapping and other logic
@n6il
Copy link
Contributor Author

n6il commented Nov 8, 2014

Yeah, I finally realized that this was a 3.4.1 nightly snapshot... The SDCC 3.4.0 release version works as expected. I willl make the following complaints to SDCC team: The "Downloads" link is near the top as a sub-heading while "Snapshots" is a main heading, and of course the snapshots page has no warnings that you might want to try a released version or any link to those released versions.

@n6il n6il closed this as completed Nov 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant