stronnag / xtc68 Goto Github PK
View Code? Open in Web Editor NEWCross compiler for QDOS c68 on POSIX platforms
License: MIT License
Cross compiler for QDOS c68 on POSIX platforms
License: MIT License
Trying to compile XTC68 on a Linux ubuntu 4.15.0-36-generic #3916.04.1-Ubuntu SMP Tue Sep 25 08:59:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux with gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Keep getting these errors. Seems like some files are missing....
root@ubuntu:~/xtc68/xtc68# ./makeall
gcc -O2 -DNDEBUG -O2 -m32 -c -o analyze.o analyze.c
In file included from /usr/include/string.h:25:0,
from chdr.h:32,
from analyze.c:45:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
: recipe for target 'analyze.o' failed
make: *** [analyze.o] Error 1
gcc -c -O2 -m32 -DXTC68 -DENVVAR -DHAVE_BASENAME cc.c
In file included from /usr/include/string.h:25:0,
from cc.c:32:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
Makefile:128: recipe for target 'cc.o' failed
make: *** [cc.o] Error 1
cc -O2 -DXTC68 -DCPLUSPLUS -m32 -c -o cexp.o cexp.c
In file included from /usr/include/setjmp.h:25:0,
from cexp.c:21:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
: recipe for target 'cexp.o' failed
make: *** [cexp.o] Error 1
cc -O2 -DXTC68 -DLABELDIFF -DUSELINE -DMINIX -DHOST_LITTLE_ENDIAN -m32 -c -o cbuf.o cbuf.c
In file included from /usr/include/stdio.h:27:0,
from jas.h:13,
from cbuf.c:13:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
: recipe for target 'cbuf.o' failed
make: *** [cbuf.o] Error 1
cc -DXTC68 -O2 -m32 -c -o ld.o ldold.c
In file included from /usr/include/stdio.h:27:0,
from ldold.c:39:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
Makefile:22: recipe for target 'ld.o' failed
make: *** [ld.o] Error 1
gcc -I. -O2 -c -m32 slbmain.c
In file included from /usr/include/stdlib.h:24:0,
from slb.h:56,
from slbmain.c:28:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
Makefile:40: recipe for target 'slbmain.o' failed
make: *** [slbmain.o] Error 1
This is just to inform you that install.sh
freezes under Cygwin 32 bit under Windows 10 64-bit.
If I try to run it (without the sudo
command), it justs freezes.
Nothing is copied from support
(where I have unzipped the required files) and no folders are created in /usr/local.
It may be a non-issue, as I see the built-in Widows anti-malware process use a lot of CPU any time I run the script... Maybe it is just a Windows 10 problem... which I need to circumvent somehow.
Sorry, it this information is useless to you.
I have downloaded the lastest version of xtc68, as well as the support (disk1) files (in support directory). I am using Lubuntob64 bit with a 32 bit dev env as suggested.
install.sh fails with multiple cannot stat errors (as68/as68, ..., ld/qld no such file...)
It does manage to just copy the support files to their target directories.
slb
, has since the beginning (1992), closed libfp
twice; depending on your OS / libc the affects may range from:
slb
crashing, with no output.This is now fixed by d1d1baa, which also added qdos-ar
and qdos-ranlib
helpers.
Dilwyn Jones's homepage referenced from the README.md file has moved to
Substructures below this link have apparently been retained as from the original page.
The old link "dilwyn.me.uk" is dead as of now.
Sorry. My problem is that I need to install the cross compiler.
The README.md file suggests to use copy the support files and run "install.sh". That is what I do.
I am trying to follow the instructions but I am doing something wrong.
Could you please point me to the installation procedure to get the compiler fully installed?
By installed I mean able to run qcc on the hello world example. The README.md seems to suggest only running install.sh does everything.
Do I need to run "make", configure?
The old move.pl is somewhat useless.
This repo should not include runtime files that are available elsewhere.
I tried to compile XTC68, on Linux Mint 21.2 x64, which the compiler compiles okay, but there are errors in the tools: qls, qcp
Here is ninja output:
[4/7] Compiling C object qls.p/src_tools_qls.c.o
FAILED: qls.p/src_tools_qls.c.o
cc -Iqls.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -O2 -Wall -Werror -pedantic -MD -MQ qls.p/src_tools_qls.c.o -MF qls.p/src_tools_qls.c.o.d -o qls.p/src_tools_qls.c.o -c ../src/tools/qls.c
../src/tools/qls.c: In function ‘checkXTcc’:
../src/tools/qls.c:69:5: error: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
69 | read(fd, xtbuf, sizeof(xtbuf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/tools/qls.c: In function ‘read_ql_dir’:
../src/tools/qls.c:119:14: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
119 | (ptr-1) = ':';
| ~~~~~~~~~^~~~~
../src/tools/qls.c:116:16: note: at offset -1 into destination object of size 4096 allocated by ‘calloc’
116 | char buf = calloc(1,PATH_MAX);
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
[5/7] Compiling C object qcp.p/src_tools_qcp.c.o
FAILED: qcp.p/src_tools_qcp.c.o
cc -Iqcp.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -O2 -Wall -Werror -pedantic -MD -MQ qcp.p/src_tools_qcp.c.o -MF qcp.p/src_tools_qcp.c.o.d -o qcp.p/src_tools_qcp.c.o -c ../src/tools/qcp.c
../src/tools/qcp.c: In function ‘checkXTcc’:
../src/tools/qcp.c:55:5: error: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
55 | read(fd, xtbuf, sizeof(xtbuf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/tools/qcp.c: In function ‘set_dataspace’:
../src/tools/qcp.c:96:5: error: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
96 | read(fd, xtbuf, 4);
| ^~~~~~~~~~~~~~~~~~
../src/tools/qcp.c:99:7: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
99 | write(fd,"XTcc", 4);
| ^~~~~~~~~~~~~~~~~~~
../src/tools/qcp.c:102:5: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
102 | write(fd, &hlen, 4);
| ^~~~~~~~~~~~~~~~~~~
../src/tools/qcp.c: In function ‘copy_file’:
../src/tools/qcp.c:125:9: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
125 | write(fo, buf, n);
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
If I try to compile even a sub-set of my project
https://github.com/Fabrizio-Caruso/CROSS-CHASE
with make xtc68_test
(shown below) I get
root@brizio-VirtualBox:/media/sf_Retro/CROSS-CHASE/src# make xtc68_test
*** buffer overflow detected ***: crt.o terminated
Aborted (core dumped)
Link failed
This is the content of the Makefile target
xtc68_test:
cp $(TOOLS_PATH)/sinclair_ql/crt.o $(SOURCE_PATH)/..
$(XTC68) $(XTC68_OPTS) \
-I$(SOURCE_PATH) \
-D__GCC_BUFFERED__ \
-DFORCE_XSIZE=79 \
-DFORCE_YSIZE=22 \
-DSTDLIB \
-DNO_COLOR \
-DTINY_GAME \
-DTURN_BASED \
-DBUFFERED \
-DNO_INIT_GRAPHICS \
-DALT_PRINT \
-DALT_CLEAR_SCREEN \
-DNO_WAIT \
-DNO_SLEEP \
-DNO_RANDOM_LEVEL \
$(CROSS_LIB_PATH)/display/alt_print/memory_mapped_alt_print.c \
$(TINY_FILES)
No issue if compiled with GCC (shown below) or any other C compiler (CC65, Z88DK, CMOC, ACK, etc.)
gcc_tiny_buffered:
$(GCC) $(GCC_OPTS) \
-D__GCC_BUFFERED__ \
-DFORCE_XSIZE=79 \
-DFORCE_YSIZE=22 \
-DSTDLIB \
-DNO_COLOR \
-DTINY_GAME \
-DTURN_BASED \
-DBUFFERED \
-DNO_INIT_GRAPHICS \
-DALT_PRINT \
-DALT_CLEAR_SCREEN \
-DNO_WAIT \
-DNO_SLEEP \
-DNO_RANDOM_LEVEL \
$(CROSS_LIB_PATH)/display/alt_print/memory_mapped_alt_print.c \
$(TINY_FILES)
mv a$(COMPILEDEXT) $(BUILD_PATH)/TINY_gcc_buffered$(COMPILEDEXT)
I have managed to build under Ubuntu 64 bit and a 32 bit environment.
I have done:
make all
sudo move.pl
Nothing is found in /usr/local/bin
If I try to run qcc I get an error about qcpp not being found.
What do I need to do to install the compiler?
xtc68 issues these warnings where it probably should not.
Attached a test program, the compiled version of which works as it prints 2 3 when run so the symbols are not actually overwriting each other like the warning would indicate.
qcc -o test-c68 test.c
Double defined Symbol: _ONE
test-c68: dataspace 870 (366)
Multiply defined : 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.