Thanks to TMC and James' help, I managed to get a working FB install (of 0.21.1).
Everything compiles okay, *except* for base64.[ch] (when I run makereload.sh). They have these mysterious "restrict" keywords before 'in' and 'out' parameters, that GCC doesn't like. (deleting the keywords fixes the compilation issues, and reloadtest then passes all it's tests ok except for Pedantic Compare W/ XML.. caveat below...) (GCC 4.5.0 20100610, FYI) Oh, and this: /usr/share/freebasic/bin/linux/ld: cannot find utf8toisolat1.o: No such file or directory That doesn't surprise me; line 5 of makereload.sh is the kind of command that I would say 'causes undefined behaviour'. <_> (you want to compile an .o file into an .o file ?!?! that's like "Tell me, Is this question true?") Indeed, removing line 5 and the reference to utf8toisolat1.o in line 8 allows xml2reload to compile okay. I've attached a patch which fixes those things (I think James gave me commit permissions when I started the git-svn mirror, but I'm not 100% sure that these are the correct changes to do. TMC should be able to apply this patch easily; it's pretty trivial to apply manually, even.) urg. the reload stuff has other issues, too -- reloadtest assumes xml2reload is in the path (rather than the current directory). Now that I think about it, that could be easily worked around by making a reloadtest.sh wrapper script that looks like: export PATH=$PATH:./ ./reloadtest
From 023698f1c0ba0a59ba52551f36a5e7adb6f06f20 Mon Sep 17 00:00:00 2001 From: David Gowers <[email protected]> Date: Fri, 3 Sep 2010 12:16:52 +0930 Subject: [PATCH] Fix makereload.sh and related files so RELOAD utils all successfully compile under Linux. --- base64.c | 8 ++++---- base64.h | 8 ++++---- makereload.sh | 5 ++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/base64.c b/base64.c index 468c4c2..b4add42 100644 --- a/base64.c +++ b/base64.c @@ -64,8 +64,8 @@ to_uchar (char ch) possible. If OUTLEN is larger than BASE64_LENGTH(INLEN), also zero terminate the output buffer. */ void -base64_encode (const char *restrict in, size_t inlen, - char *restrict out, size_t outlen) +base64_encode (const char *in, size_t inlen, + char *out, size_t outlen) { static const char b64str[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; @@ -310,8 +310,8 @@ isbase64 (char ch) that, when applicable, you must remove any line terminators that is part of the data stream before calling this function. */ bool -base64_decode (const char *restrict in, size_t inlen, - char *restrict out, size_t *outlen) +base64_decode (const char *in, size_t inlen, + char *out, size_t *outlen) { size_t outleft = *outlen; diff --git a/base64.h b/base64.h index 6bb9a97..0e1f5c5 100644 --- a/base64.h +++ b/base64.h @@ -31,13 +31,13 @@ extern bool isbase64 (char ch); -extern void base64_encode (const char *restrict in, size_t inlen, - char *restrict out, size_t outlen); +extern void base64_encode (const char *in, size_t inlen, + char *out, size_t outlen); extern size_t base64_encode_alloc (const char *in, size_t inlen, char **out); -extern bool base64_decode (const char *restrict in, size_t inlen, - char *restrict out, size_t *outlen); +extern bool base64_decode (const char *in, size_t inlen, + char *out, size_t *outlen); extern bool base64_decode_alloc (const char *in, size_t inlen, char **out, size_t *outlen); diff --git a/makereload.sh b/makereload.sh index dd19367..60f5e9a 100755 --- a/makereload.sh +++ b/makereload.sh @@ -2,11 +2,10 @@ fbc -v -c -g -lang deprecated reload.bas reloadext.bas lumpfile.bas util.bas || exit 1 gcc -c -g -O3 base64.c || exit 1 -gcc -c -g -O3 utf8toisolat1.o fbc -v -g -profile -lang deprecated reloadtest.bas reload.o reloadext.o lumpfile.o util.o base64.o -fbc -v -g -profile -lang deprecated xml2reload.bas reload.o reloadext.o lumpfile.o util.o base64.o utf8toisolat1.o -p . -l xml2 +fbc -v -g -profile -lang deprecated xml2reload.bas reload.o reloadext.o lumpfile.o util.o base64.o -p . -l xml2 fbc -v -g -profile -lang deprecated reload2xml.bas reload.o lumpfile.o util.o base64.o fbc -v -g -profile -lang deprecated reloadutil.bas reload.o reloadext.o lumpfile.o util.o base64.o -rm reload.o reloadext.o lumpfile.o util.o base64.o utf8toisolat1.o +rm reload.o reloadext.o lumpfile.o util.o base64.o -- 1.7.2
_______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
