cpcitor / cpc-dev-tool-chain

A development toolchain to compile your modern C or assembly projects on a modern OS and run on an Amstrad CPC or emulator.
45 stars 5 forks source link

Issues building on first cygwin test: cygwin's patch broken, libtermcap unavailable, precompiled cpcxfs and hex2bin choking compilation. #1

Closed lronaldo closed 9 years ago

lronaldo commented 9 years ago

On a fresh clone of the repo, the patch applyied to addhead fails and "make dsk" is interrupted.

This is the secuence followed:

On the last command, this is de output, with the errors:

$ make dsk
BINAMSDOSS = hellosdc.binamsdos
BINS = hellosdc.bin
CDTC_ENV_FOR_2CDT = ..//tool/2cdt/build_config.inc
CDTC_ENV_FOR_CFWI = ..//cpclib/cfwi/cfwi.lib
CDTC_ENV_FOR_CPCRSLIB = ..//cpclib/cpcrslib/cpcrslib_SDCC.installtree/.installed
CDTC_ENV_FOR_CPCXFS = ..//tool/cpcxfs/build_config.inc
CDTC_ENV_FOR_CPC_PUTCHAR = ..//cpclib/cdtc_stdio/cdtc_stdio.lib ..//cpclib/cdtc_stdio/putchar_cpc.rel
CDTC_ENV_FOR_HEX2BIN = ..//tool/hex2bin/build_config.inc
CDTC_ENV_FOR_IDSK = ..//tool/idsk/build_config.inc
CDTC_ENV_FOR_PLAYTZX = ..//tool/playtzx/build_config.inc
CDTC_ENV_FOR_SDCC = ..//tool/sdcc/build_config.inc
CDTNAME = hellosdc.cdt
CODELOC = 0x4000
DSKNAME = hellosdc.dsk
GENHRDS = hello.h
HDRS = fillscreen.h hello.h cpcfirmware.h
IHXS = hellosdc.ihx
LDFLAGS =
RELS = hello.rel km_wait_key.rel fillscreen.rel
SRCS = hello.c
SRSS = km_wait_key.s fillscreen.s
TARGETS = hellosdc.dsk hellosdc.bin
VOCNAME = hellosdc.voc
( . ..//tool/hex2bin/build_config.inc ; hex2bin -e "bin" -p 00 "hellosdc.ihx" | tee "hellosdc.bin.log" ; )
/bin/bash: /home/ronaldo/cpc-dev-tool-chain/tool/hex2bin/Hex2bin-1.0.10/hex2bin: no se puede ejecutar el fichero binario
( export LC_ALL=C ; make -C "..//tool/addhead" build_config.inc ; )
PRODUCT_NAME = addhead
EXTRACT_DIR_NAME = addhead
PATCHNAME = addhead_build_patch.patch
ARCHIVE_NAME = addhead.zip
BUILD_TARGET_FILE = addhead//addhead
BUILD_DIR = addhead/
TARGETS = build_config.inc
URL_RELEASE = http://cpctech.cpc-live.com/download/addhead.zip
make[1]: Entering directory `/home/ronaldo/cpc-dev-tool-chain/tool/addhead'
wget -S http://cpctech.cpc-live.com/download/addhead.zip -O addhead.zip.tmp
converted 'http://cpctech.cpc-live.com/download/addhead.zip' (ANSI_X3.4-1968) -> 'http://cpctech.cpc-live.com/download/addhead.zip' (UTF-8)
--2015-02-23 14:34:52--  http://cpctech.cpc-live.com/download/addhead.zip
Resolving cpctech.cpc-live.com (cpctech.cpc-live.com)... 92.51.134.187
Connecting to cpctech.cpc-live.com (cpctech.cpc-live.com)|92.51.134.187|:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Mon, 23 Feb 2015 13:34:53 GMT
  Server: Apache
  Last-Modified: Sat, 08 Feb 2014 14:00:08 GMT
  ETag: "1a40423-560c-4f1e58630ea00"
  Accept-Ranges: bytes
  Content-Length: 22028
  X-Powered-By: PleskLin
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: application/zip
Length: 22028 (22K) [application/zip]
Saving to: 'addhead.zip.tmp'

addhead.zip.tmp          100%[=================================>]  21.51K  --.-KB/s   in 0.05s

2015-02-23 14:34:53 (417 KB/s) - 'addhead.zip.tmp' saved [22028/22028]

mv -vf addhead.zip.tmp addhead.zip
'addhead.zip.tmp' -> 'addhead.zip'
************************************************************************
**************** Source archive was downloaded to: addhead.zip
************************************************************************
************************************************************************
**************** Extracting source from: addhead.zip
************************************************************************
unzip addhead.zip
Archive:  addhead.zip
   creating: addhead/
  inflating: addhead/Makefile.win
  inflating: addhead/addhead.cbp
  inflating: addhead/addhead.layout
  inflating: addhead/addhead.depend
  inflating: addhead/file_id.diz
  inflating: addhead/opth.h
  inflating: addhead/copying
  inflating: addhead/addhead.c
  inflating: addhead/readme.txt
  inflating: addhead/makefile
  inflating: addhead/opth.c
  inflating: addhead/example
touch addhead/.unpacked
************************************************************************
**************** Source extracted to: addhead
************************************************************************
************************************************************************
**************** Patching source in: addhead_build_patch.patch addhead/.unpacked
************************************************************************
patch -p0 < addhead_build_patch.patch
patching file addhead/addhead.c
Hunk #1 FAILED at 129.
Hunk #2 FAILED at 209.
Hunk #3 FAILED at 374.
Hunk #4 FAILED at 386.
Hunk #5 FAILED at 410.
Hunk #6 FAILED at 442.
Hunk #7 FAILED at 696.
7 out of 7 hunks FAILED -- saving rejects to file addhead/addhead.c.rej
Makefile:63: recipe for target `addhead/.patched' failed
make[1]: *** [addhead/.patched] Error 1
make[1]: Leaving directory `/home/ronaldo/cpc-dev-tool-chain/tool/addhead'
..//sdcc-project.Makefile:146: recipe for target `..//tool/addhead/build_config.inc' failed
make: *** [..//tool/addhead/build_config.inc] Error 2
cpcitor commented 9 years ago

Hello lronaldo,

Thank you for your informative and precise report. I'm reproducing the steps you described to see if that reproduces the problem.

Regards.

cpcitor commented 9 years ago

I tried using a fresh git clone on my usual Ubuntu 14.04 and could not reproduce this problem. I would be suspecting a CR/CRLF issue because of a Windows environment, but Manjaro is Linux so it's not that credible.

Can you please go into the directory cpc-dev-tool-chain/tool/addhead and issue:

md5sum addhead/addhead.c addhead_build_patch.patch

It should output:

ef18d4f403bffa532d79c5d91015623e  addhead/addhead.c
cfc57e114bf95e02933acc4af4051db8  addhead_build_patch.patch

Then try this variant:

patch --ignore-whitespace -p0 < addhead_build_patch.patch

to see if patch applies.

If that does not work, please tell, I think I might find another solution for this particular case.

Thank you.

lronaldo commented 9 years ago

You are welcome. I am happy to help, as I've been using your framework for months (and teaching my students to use it for CPC projects)

Here you are the output:

~/cpc-dev-tool-chain/tool/addhead
$ md5sum addhead/addhead.c addhead_build_patch.patch
ef18d4f403bffa532d79c5d91015623e *addhead/addhead.c
cfc57e114bf95e02933acc4af4051db8 *addhead_build_patch.patch

$ patch --ignore-whitespace -p0 < addhead_build_patch.patch                     patching file addhead/addhead.c
Hunk #1 FAILED at 129.
Hunk #2 FAILED at 209.
Hunk #3 FAILED at 374.
Hunk #4 FAILED at 386.
Hunk #5 FAILED at 410.
Hunk #6 FAILED at 442.
Hunk #7 FAILED at 696.
7 out of 7 hunks FAILED -- saving rejects to file addhead/addhead.c.rej

Does not seem to be a CR/CRLF problem, because everything is done over cygwin, which makes it more Linux-like.

On Manjaro/Arch, there are some compilation-related problems with SDCC before this problem, but they are easy to overcome. I may show you them in another issue later if you want.

cpcitor commented 9 years ago

I'm happy to know how the framework is used, thanks for reporting.

Thanks for the md5sum command. Ok, the MD5 are as expected.

I just pushed a commit that works around the problem by just not applying this particular patch. Still I'm worried that this may happen on other programs.

Can you issue

patch --version

Building iDSK applies patches, too, as does building cpcxfs. Are those other patches applied cleanly?

From the base directory, can you run this?

( cd tool/idsk/ ; make mrproper ; make | tee make.log ; )
( cd tool/cpcxfs/ ; make mrproper ; make | tee make.log ; )

(Those programs build with many warnings on modern compilers.)

On my machine, the files ./tool/idsk/make.log and ./tool/cpcxfs/make.log contain this:

************************************************************************
**************** Patching source in: iDSK.0.13_build_patch.patch iDSK.0.13/.unpacked
************************************************************************
patch -p0 < iDSK.0.13_build_patch.patch
patching file iDSK.0.13/iDSK/src/Basic.cpp
patching file iDSK.0.13/iDSK/src/BitmapCPC.cpp
patching file iDSK.0.13/iDSK/src/Dams.cpp
patching file iDSK.0.13/iDSK/src/Desass.cpp
patching file iDSK.0.13/iDSK/src/GestDsk.cpp
patching file iDSK.0.13/iDSK/src/Outils.cpp
touch iDSK.0.13/.patched
************************************************************************
**************** Source patched in: iDSK.0.13
************************************************************************

and this:

************************************************************************
**************** Patching source in: cpcxfs_build_patch.patch cpcxfs/.unpacked
************************************************************************
patch -p0 < cpcxfs_build_patch.patch
patching file cpcxfs/src/cpcfs.c
touch cpcxfs/.patched
************************************************************************
**************** Source patched in: cpcxfs
************************************************************************
cpcitor commented 9 years ago

On Manjaro/Arch, there are some compilation-related problems with SDCC before this problem, but they are easy to overcome. I may show you them in another issue later if you want.

Please do. I like when problems are fixed once and for all rather than just fixed locally many times. :-)

lronaldo commented 9 years ago

Yes, it is used. Most of the games created for #CPCRetroDev have used your framework.

Here is the output of the commands:

1) Patch version

$ patch --version
patch 2.6.1
Copyright (C) 1988 Larry Wall
Copyright (C) 2003, 2009 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

written by Larry Wall and Paul Eggert

2) CPCXfs and iDSK

$ ( cd tool/idsk/ ; make mrproper ; make | tee make.log ; )
PRODUCT_NAME = iDSK
EXTRACT_DIR_NAME = iDSK.0.13
PATCHNAME = iDSK.0.13_build_patch.patch
ARCHIVE_NAME = iDSK.0.13-src.tgz
BUILD_TARGET_FILE = iDSK.0.13/iDSK/src/iDSK
TARGETS = build_config.inc
URL_RELEASE = http://sid.cpc.free.fr/iDSK.0.13-src.tgz
rm -f iDSK.0.13/iDSK/src/iDSK
rm -f build_config.inc
rm -rf iDSK.0.13 ._iDSK.0.13 *~

rm -f iDSK
PRODUCT_NAME = iDSK
EXTRACT_DIR_NAME = iDSK.0.13
PATCHNAME = iDSK.0.13_build_patch.patch
ARCHIVE_NAME = iDSK.0.13-src.tgz
BUILD_TARGET_FILE = iDSK.0.13/iDSK/src/iDSK
TARGETS = build_config.inc
URL_RELEASE = http://sid.cpc.free.fr/iDSK.0.13-src.tgz
************************************************************************
**************** Extracting source from: iDSK.0.13-src.tgz
************************************************************************
tar zxvf iDSK.0.13-src.tgz
./._iDSK.0.13
iDSK.0.13/
iDSK.0.13/._iDSK
iDSK.0.13/iDSK/
iDSK.0.13/iDSK/._.svn
iDSK.0.13/iDSK/.svn/
iDSK.0.13/iDSK/.svn/._all-wcprops
iDSK.0.13/iDSK/.svn/all-wcprops
iDSK.0.13/iDSK/.svn/._entries
iDSK.0.13/iDSK/.svn/entries
iDSK.0.13/iDSK/.svn/._format
iDSK.0.13/iDSK/.svn/format
iDSK.0.13/iDSK/.svn/._prop-base
iDSK.0.13/iDSK/.svn/prop-base/
iDSK.0.13/iDSK/.svn/prop-base/._config.status.svn-base
iDSK.0.13/iDSK/.svn/prop-base/config.status.svn-base
iDSK.0.13/iDSK/.svn/prop-base/._configure.svn-base
iDSK.0.13/iDSK/.svn/prop-base/configure.svn-base
iDSK.0.13/iDSK/.svn/prop-base/._depcomp.svn-base
iDSK.0.13/iDSK/.svn/prop-base/depcomp.svn-base
iDSK.0.13/iDSK/.svn/prop-base/._install-sh.svn-base
iDSK.0.13/iDSK/.svn/prop-base/install-sh.svn-base
iDSK.0.13/iDSK/.svn/prop-base/._missing.svn-base
iDSK.0.13/iDSK/.svn/prop-base/missing.svn-base
iDSK.0.13/iDSK/.svn/._props
iDSK.0.13/iDSK/.svn/props/
iDSK.0.13/iDSK/.svn/._text-base
iDSK.0.13/iDSK/.svn/text-base/
iDSK.0.13/iDSK/.svn/text-base/._aclocal.m4.svn-base
iDSK.0.13/iDSK/.svn/text-base/aclocal.m4.svn-base
iDSK.0.13/iDSK/.svn/text-base/._AUTHORS.svn-base
iDSK.0.13/iDSK/.svn/text-base/AUTHORS.svn-base
iDSK.0.13/iDSK/.svn/text-base/._ChangeLog.svn-base
iDSK.0.13/iDSK/.svn/text-base/ChangeLog.svn-base
iDSK.0.13/iDSK/.svn/text-base/._config.h.in.svn-base
iDSK.0.13/iDSK/.svn/text-base/config.h.in.svn-base
iDSK.0.13/iDSK/.svn/text-base/._config.h.in~.svn-base
iDSK.0.13/iDSK/.svn/text-base/config.h.in~.svn-base
iDSK.0.13/iDSK/.svn/text-base/._config.h.svn-base
iDSK.0.13/iDSK/.svn/text-base/config.h.svn-base
iDSK.0.13/iDSK/.svn/text-base/._config.log.svn-base
iDSK.0.13/iDSK/.svn/text-base/config.log.svn-base
iDSK.0.13/iDSK/.svn/text-base/._config.status.svn-base
iDSK.0.13/iDSK/.svn/text-base/config.status.svn-base
iDSK.0.13/iDSK/.svn/text-base/._configure.in.svn-base
iDSK.0.13/iDSK/.svn/text-base/configure.in.svn-base
iDSK.0.13/iDSK/.svn/text-base/._configure.svn-base
iDSK.0.13/iDSK/.svn/text-base/configure.svn-base
iDSK.0.13/iDSK/.svn/text-base/._COPYING.svn-base
iDSK.0.13/iDSK/.svn/text-base/COPYING.svn-base
iDSK.0.13/iDSK/.svn/text-base/._depcomp.svn-base
iDSK.0.13/iDSK/.svn/text-base/depcomp.svn-base
iDSK.0.13/iDSK/.svn/text-base/._install-sh.svn-base
iDSK.0.13/iDSK/.svn/text-base/install-sh.svn-base
iDSK.0.13/iDSK/.svn/text-base/._INSTALL.svn-base
iDSK.0.13/iDSK/.svn/text-base/INSTALL.svn-base
iDSK.0.13/iDSK/.svn/text-base/._Makefile.am.svn-base
iDSK.0.13/iDSK/.svn/text-base/Makefile.am.svn-base
iDSK.0.13/iDSK/.svn/text-base/._Makefile.in.svn-base
iDSK.0.13/iDSK/.svn/text-base/Makefile.in.svn-base
iDSK.0.13/iDSK/.svn/text-base/._Makefile.svn-base
iDSK.0.13/iDSK/.svn/text-base/Makefile.svn-base
iDSK.0.13/iDSK/.svn/text-base/._missing.svn-base
iDSK.0.13/iDSK/.svn/text-base/missing.svn-base
iDSK.0.13/iDSK/.svn/text-base/._NEWS.svn-base
iDSK.0.13/iDSK/.svn/text-base/NEWS.svn-base
iDSK.0.13/iDSK/.svn/text-base/._README.svn-base
iDSK.0.13/iDSK/.svn/text-base/README.svn-base
iDSK.0.13/iDSK/.svn/text-base/._stamp-h1.svn-base
iDSK.0.13/iDSK/.svn/text-base/stamp-h1.svn-base
iDSK.0.13/iDSK/.svn/._tmp
iDSK.0.13/iDSK/.svn/tmp/
iDSK.0.13/iDSK/.svn/tmp/._prop-base
iDSK.0.13/iDSK/.svn/tmp/prop-base/
iDSK.0.13/iDSK/.svn/tmp/._props
iDSK.0.13/iDSK/.svn/tmp/props/
iDSK.0.13/iDSK/.svn/tmp/._text-base
iDSK.0.13/iDSK/.svn/tmp/text-base/
iDSK.0.13/iDSK/._aclocal.m4
iDSK.0.13/iDSK/aclocal.m4
iDSK.0.13/iDSK/._AUTHORS
iDSK.0.13/iDSK/AUTHORS
iDSK.0.13/iDSK/._autom4te.cache
iDSK.0.13/iDSK/autom4te.cache/
iDSK.0.13/iDSK/autom4te.cache/._.svn
iDSK.0.13/iDSK/autom4te.cache/.svn/
iDSK.0.13/iDSK/autom4te.cache/.svn/._all-wcprops
iDSK.0.13/iDSK/autom4te.cache/.svn/all-wcprops
iDSK.0.13/iDSK/autom4te.cache/.svn/._entries
iDSK.0.13/iDSK/autom4te.cache/.svn/entries
iDSK.0.13/iDSK/autom4te.cache/.svn/._format
iDSK.0.13/iDSK/autom4te.cache/.svn/format
iDSK.0.13/iDSK/autom4te.cache/.svn/._prop-base
iDSK.0.13/iDSK/autom4te.cache/.svn/prop-base/
iDSK.0.13/iDSK/autom4te.cache/.svn/._props
iDSK.0.13/iDSK/autom4te.cache/.svn/props/
iDSK.0.13/iDSK/autom4te.cache/.svn/._text-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/._output.0.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/output.0.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/._output.1.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/output.1.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/._output.2.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/output.2.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/._requests.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/requests.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/._traces.0.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/traces.0.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/._traces.1.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/traces.1.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/._traces.2.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/text-base/traces.2.svn-base
iDSK.0.13/iDSK/autom4te.cache/.svn/._tmp
iDSK.0.13/iDSK/autom4te.cache/.svn/tmp/
iDSK.0.13/iDSK/autom4te.cache/.svn/tmp/._prop-base
iDSK.0.13/iDSK/autom4te.cache/.svn/tmp/prop-base/
iDSK.0.13/iDSK/autom4te.cache/.svn/tmp/._props
iDSK.0.13/iDSK/autom4te.cache/.svn/tmp/props/
iDSK.0.13/iDSK/autom4te.cache/.svn/tmp/._text-base
iDSK.0.13/iDSK/autom4te.cache/.svn/tmp/text-base/
iDSK.0.13/iDSK/autom4te.cache/._output.0
iDSK.0.13/iDSK/autom4te.cache/output.0
iDSK.0.13/iDSK/autom4te.cache/._output.1
iDSK.0.13/iDSK/autom4te.cache/output.1
iDSK.0.13/iDSK/autom4te.cache/._output.2
iDSK.0.13/iDSK/autom4te.cache/output.2
iDSK.0.13/iDSK/autom4te.cache/._requests
iDSK.0.13/iDSK/autom4te.cache/requests
iDSK.0.13/iDSK/autom4te.cache/._traces.0
iDSK.0.13/iDSK/autom4te.cache/traces.0
iDSK.0.13/iDSK/autom4te.cache/._traces.1
iDSK.0.13/iDSK/autom4te.cache/traces.1
iDSK.0.13/iDSK/autom4te.cache/._traces.2
iDSK.0.13/iDSK/autom4te.cache/traces.2
iDSK.0.13/iDSK/._ChangeLog
iDSK.0.13/iDSK/ChangeLog
iDSK.0.13/iDSK/._config.h
iDSK.0.13/iDSK/config.h
iDSK.0.13/iDSK/._config.h.in
iDSK.0.13/iDSK/config.h.in
iDSK.0.13/iDSK/._config.h.in~
iDSK.0.13/iDSK/config.h.in~
iDSK.0.13/iDSK/._config.log
iDSK.0.13/iDSK/config.log
iDSK.0.13/iDSK/._config.status
iDSK.0.13/iDSK/config.status
iDSK.0.13/iDSK/._configure
iDSK.0.13/iDSK/configure
iDSK.0.13/iDSK/._configure.in
iDSK.0.13/iDSK/configure.in
iDSK.0.13/iDSK/._COPYING
iDSK.0.13/iDSK/COPYING
iDSK.0.13/iDSK/._depcomp
iDSK.0.13/iDSK/depcomp
iDSK.0.13/iDSK/._INSTALL
iDSK.0.13/iDSK/INSTALL
iDSK.0.13/iDSK/._install-sh
iDSK.0.13/iDSK/install-sh
iDSK.0.13/iDSK/Makefile
iDSK.0.13/iDSK/._Makefile.am
iDSK.0.13/iDSK/Makefile.am
iDSK.0.13/iDSK/._Makefile.in
iDSK.0.13/iDSK/Makefile.in
iDSK.0.13/iDSK/._missing
iDSK.0.13/iDSK/missing
iDSK.0.13/iDSK/._NEWS
iDSK.0.13/iDSK/NEWS
iDSK.0.13/iDSK/._README
iDSK.0.13/iDSK/README
iDSK.0.13/iDSK/._src
iDSK.0.13/iDSK/src/
iDSK.0.13/iDSK/src/._.deps
iDSK.0.13/iDSK/src/.deps/
iDSK.0.13/iDSK/src/.deps/._.svn
iDSK.0.13/iDSK/src/.deps/.svn/
iDSK.0.13/iDSK/src/.deps/.svn/._all-wcprops
iDSK.0.13/iDSK/src/.deps/.svn/all-wcprops
iDSK.0.13/iDSK/src/.deps/.svn/._entries
iDSK.0.13/iDSK/src/.deps/.svn/entries
iDSK.0.13/iDSK/src/.deps/.svn/._format
iDSK.0.13/iDSK/src/.deps/.svn/format
iDSK.0.13/iDSK/src/.deps/.svn/._prop-base
iDSK.0.13/iDSK/src/.deps/.svn/prop-base/
iDSK.0.13/iDSK/src/.deps/.svn/._props
iDSK.0.13/iDSK/src/.deps/.svn/props/
iDSK.0.13/iDSK/src/.deps/.svn/._text-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._Basic.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/Basic.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._BitmapCPC.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/BitmapCPC.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._Dams.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/Dams.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._Desass.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/Desass.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._endianPPC.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/endianPPC.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._GestDsk.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/GestDsk.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._Itoa.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/Itoa.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._Main.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/Main.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._Outils.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/Outils.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/._ViewFile.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/text-base/ViewFile.Po.svn-base
iDSK.0.13/iDSK/src/.deps/.svn/._tmp
iDSK.0.13/iDSK/src/.deps/.svn/tmp/
iDSK.0.13/iDSK/src/.deps/.svn/tmp/._prop-base
iDSK.0.13/iDSK/src/.deps/.svn/tmp/prop-base/
iDSK.0.13/iDSK/src/.deps/.svn/tmp/._props
iDSK.0.13/iDSK/src/.deps/.svn/tmp/props/
iDSK.0.13/iDSK/src/.deps/.svn/tmp/._text-base
iDSK.0.13/iDSK/src/.deps/.svn/tmp/text-base/
iDSK.0.13/iDSK/src/.deps/Basic.Po
iDSK.0.13/iDSK/src/.deps/BitmapCPC.Po
iDSK.0.13/iDSK/src/.deps/Dams.Po
iDSK.0.13/iDSK/src/.deps/Desass.Po
iDSK.0.13/iDSK/src/.deps/endianPPC.Po
iDSK.0.13/iDSK/src/.deps/GestDsk.Po
iDSK.0.13/iDSK/src/.deps/getopt_pp.Po
iDSK.0.13/iDSK/src/.deps/Itoa.Po
iDSK.0.13/iDSK/src/.deps/Main.Po
iDSK.0.13/iDSK/src/.deps/Outils.Po
iDSK.0.13/iDSK/src/.deps/ViewFile.Po
iDSK.0.13/iDSK/src/._.svn
iDSK.0.13/iDSK/src/.svn/
iDSK.0.13/iDSK/src/.svn/._all-wcprops
iDSK.0.13/iDSK/src/.svn/all-wcprops
iDSK.0.13/iDSK/src/.svn/._entries
iDSK.0.13/iDSK/src/.svn/entries
iDSK.0.13/iDSK/src/.svn/._format
iDSK.0.13/iDSK/src/.svn/format
iDSK.0.13/iDSK/src/.svn/._prop-base
iDSK.0.13/iDSK/src/.svn/prop-base/
iDSK.0.13/iDSK/src/.svn/._props
iDSK.0.13/iDSK/src/.svn/props/
iDSK.0.13/iDSK/src/.svn/props/._Basic.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/Basic.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._BitmapCPC.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/BitmapCPC.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._Dams.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/Dams.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._Desass.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/Desass.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._endianPPC.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/endianPPC.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._GestDsk.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/GestDsk.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._getopt_pp.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/getopt_pp.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._iDSK.svn-work
iDSK.0.13/iDSK/src/.svn/props/iDSK.svn-work
iDSK.0.13/iDSK/src/.svn/props/._Itoa.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/Itoa.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._Main.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/Main.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._Outils.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/Outils.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/._ViewFile.o.svn-work
iDSK.0.13/iDSK/src/.svn/props/ViewFile.o.svn-work
iDSK.0.13/iDSK/src/.svn/._text-base
iDSK.0.13/iDSK/src/.svn/text-base/
iDSK.0.13/iDSK/src/.svn/text-base/._Basic.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Basic.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Basic.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Basic.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._BitmapCPC.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/BitmapCPC.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._BitmapCPC.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/BitmapCPC.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Dams.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Dams.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Dams.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Dams.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Desass.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Desass.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Desass.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Desass.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._endianPPC.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/endianPPC.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._endianPPC.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/endianPPC.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._GestDsk.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/GestDsk.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._GestDsk.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/GestDsk.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._getopt_pp.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/getopt_pp.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._getopt_pp.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/getopt_pp.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Itoa.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Itoa.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Itoa.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Itoa.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Main.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Main.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Main.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Main.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Makefile.am.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Makefile.am.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Makefile.in.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Makefile.in.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Makefile.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Makefile.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._MyType.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/MyType.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Outils.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Outils.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._Outils.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/Outils.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._ViewFile.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/ViewFile.cpp.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/._ViewFile.h.svn-base
iDSK.0.13/iDSK/src/.svn/text-base/ViewFile.h.svn-base
iDSK.0.13/iDSK/src/.svn/._tmp
iDSK.0.13/iDSK/src/.svn/tmp/
iDSK.0.13/iDSK/src/.svn/tmp/._prop-base
iDSK.0.13/iDSK/src/.svn/tmp/prop-base/
iDSK.0.13/iDSK/src/.svn/tmp/._props
iDSK.0.13/iDSK/src/.svn/tmp/props/
iDSK.0.13/iDSK/src/.svn/tmp/._text-base
iDSK.0.13/iDSK/src/.svn/tmp/text-base/
iDSK.0.13/iDSK/src/._Basic.cpp
iDSK.0.13/iDSK/src/Basic.cpp
iDSK.0.13/iDSK/src/._Basic.h
iDSK.0.13/iDSK/src/Basic.h
iDSK.0.13/iDSK/src/Basic.o
iDSK.0.13/iDSK/src/._BitmapCPC.cpp
iDSK.0.13/iDSK/src/BitmapCPC.cpp
iDSK.0.13/iDSK/src/._BitmapCPC.h
iDSK.0.13/iDSK/src/BitmapCPC.h
iDSK.0.13/iDSK/src/BitmapCPC.o
iDSK.0.13/iDSK/src/._Dams.cpp
iDSK.0.13/iDSK/src/Dams.cpp
iDSK.0.13/iDSK/src/._Dams.h
iDSK.0.13/iDSK/src/Dams.h
iDSK.0.13/iDSK/src/Dams.o
iDSK.0.13/iDSK/src/._Desass.cpp
iDSK.0.13/iDSK/src/Desass.cpp
iDSK.0.13/iDSK/src/._Desass.h
iDSK.0.13/iDSK/src/Desass.h
iDSK.0.13/iDSK/src/Desass.o
iDSK.0.13/iDSK/src/._endianPPC.cpp
iDSK.0.13/iDSK/src/endianPPC.cpp
iDSK.0.13/iDSK/src/._endianPPC.h
iDSK.0.13/iDSK/src/endianPPC.h
iDSK.0.13/iDSK/src/endianPPC.o
iDSK.0.13/iDSK/src/._GestDsk.cpp
iDSK.0.13/iDSK/src/GestDsk.cpp
iDSK.0.13/iDSK/src/._GestDsk.h
iDSK.0.13/iDSK/src/GestDsk.h
iDSK.0.13/iDSK/src/GestDsk.o
iDSK.0.13/iDSK/src/._getopt_pp.cpp
iDSK.0.13/iDSK/src/getopt_pp.cpp
iDSK.0.13/iDSK/src/._getopt_pp.h
iDSK.0.13/iDSK/src/getopt_pp.h
iDSK.0.13/iDSK/src/getopt_pp.o
iDSK.0.13/iDSK/src/iDSK
iDSK.0.13/iDSK/src/._Itoa.cpp
iDSK.0.13/iDSK/src/Itoa.cpp
iDSK.0.13/iDSK/src/._Itoa.h
iDSK.0.13/iDSK/src/Itoa.h
iDSK.0.13/iDSK/src/Itoa.o
iDSK.0.13/iDSK/src/._Main.cpp
iDSK.0.13/iDSK/src/Main.cpp
iDSK.0.13/iDSK/src/._Main.h
iDSK.0.13/iDSK/src/Main.h
iDSK.0.13/iDSK/src/Main.o
iDSK.0.13/iDSK/src/Makefile
iDSK.0.13/iDSK/src/._Makefile.am
iDSK.0.13/iDSK/src/Makefile.am
iDSK.0.13/iDSK/src/._Makefile.in
iDSK.0.13/iDSK/src/Makefile.in
iDSK.0.13/iDSK/src/._MyType.h
iDSK.0.13/iDSK/src/MyType.h
iDSK.0.13/iDSK/src/._Outils.cpp
iDSK.0.13/iDSK/src/Outils.cpp
iDSK.0.13/iDSK/src/._Outils.h
iDSK.0.13/iDSK/src/Outils.h
iDSK.0.13/iDSK/src/Outils.o
iDSK.0.13/iDSK/src/._ViewFile.cpp
iDSK.0.13/iDSK/src/ViewFile.cpp
iDSK.0.13/iDSK/src/._ViewFile.h
iDSK.0.13/iDSK/src/ViewFile.h
iDSK.0.13/iDSK/src/ViewFile.o
iDSK.0.13/iDSK/._stamp-h1
iDSK.0.13/iDSK/stamp-h1
touch iDSK.0.13/.unpacked
************************************************************************
**************** Source extracted to: iDSK.0.13
************************************************************************
************************************************************************
**************** Patching source in: iDSK.0.13_build_patch.patch iDSK.0.13/.unpacked
************************************************************************
patch -p0 < iDSK.0.13_build_patch.patch
patching file iDSK.0.13/iDSK/src/Basic.cpp
patching file iDSK.0.13/iDSK/src/BitmapCPC.cpp
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file iDSK.0.13/iDSK/src/BitmapCPC.cpp.rej
patching file iDSK.0.13/iDSK/src/Dams.cpp
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file iDSK.0.13/iDSK/src/Dams.cpp.rej
patching file iDSK.0.13/iDSK/src/Desass.cpp
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file iDSK.0.13/iDSK/src/Desass.cpp.rej
patching file iDSK.0.13/iDSK/src/GestDsk.cpp
patching file iDSK.0.13/iDSK/src/Outils.cpp
Makefile:62: recipe for target `iDSK.0.13/.patched' failed
make: *** [iDSK.0.13/.patched] Error 1

ronaldo@fgallegoua-win ~/cpc-dev-tool-chain
$ ( cd tool/cpcxfs/ ; make mrproper ; make | tee make.log ; )
PRODUCT_NAME = cpcxfs
EXTRACT_DIR_NAME = cpcxfs
PATCHNAME = cpcxfs_build_patch.patch
ARCHIVE_NAME = cpcxfs.zip
BUILD_TARGET_FILE = cpcxfs/src/cpcxfs
BUILD_DIR = cpcxfs/src
TARGETS = build_config.inc
URL_RELEASE = http://cpctech.cpc-live.com/download/cpcxfs.zip
rm -f cpcxfs/src/cpcxfs
rm -f build_config.inc
rm -rf cpcxfs ._cpcxfs *~
rm -f cpcxfs
PRODUCT_NAME = cpcxfs
EXTRACT_DIR_NAME = cpcxfs
PATCHNAME = cpcxfs_build_patch.patch
ARCHIVE_NAME = cpcxfs.zip
BUILD_TARGET_FILE = cpcxfs/src/cpcxfs
BUILD_DIR = cpcxfs/src
TARGETS = build_config.inc
URL_RELEASE = http://cpctech.cpc-live.com/download/cpcxfs.zip
wget -S http://cpctech.cpc-live.com/download/cpcxfs.zip -O cpcxfs.zip.tmp
--2015-02-24 09:53:55--  http://cpctech.cpc-live.com/download/cpcxfs.zip
Resolviendo cpctech.cpc-live.com (cpctech.cpc-live.com)... 92.51.134.187
Conectando con cpctech.cpc-live.com (cpctech.cpc-live.com)[92.51.134.187]:80... conectado.
Petición HTTP enviada, esperando respuesta...
  HTTP/1.1 200 OK
  Date: Tue, 24 Feb 2015 08:53:56 GMT
  Server: Apache
  Last-Modified: Mon, 30 Dec 2013 11:26:20 GMT
  ETag: "1a40443-3f893-4eebeb681cf00"
  Accept-Ranges: bytes
  Content-Length: 260243
  X-Powered-By: PleskLin
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: application/zip
Longitud: 260243 (254K) [application/zip]
Grabando a: “cpcxfs.zip.tmp”

cpcxfs.zip.tmp      100%[=====================>] 254,14K  1,05MB/s   en 0,2s

2015-02-24 09:53:55 (1,05 MB/s) - “cpcxfs.zip.tmp” guardado [260243/260243]

mv -vf cpcxfs.zip.tmp cpcxfs.zip
«cpcxfs.zip.tmp» -> «cpcxfs.zip»
************************************************************************
**************** Source archive was downloaded to: cpcxfs.zip
************************************************************************
************************************************************************
**************** Extracting source from: cpcxfs.zip
************************************************************************
unzip cpcxfs.zip
Archive:  cpcxfs.zip
   creating: cpcxfs/
  inflating: cpcxfs/descript.ion
  inflating: cpcxfs/ZX0.LBL
  inflating: cpcxfs/ZX3.LBL
  inflating: cpcxfs/PCW3.LBL
  inflating: cpcxfs/cpcxfs.exe
  inflating: cpcxfs/makedoc.exe
  inflating: cpcxfs/fred.lst
  inflating: cpcxfs/cpmdisks.def
  inflating: cpcxfs/readme
  inflating: cpcxfs/cpcfs.cfg
  inflating: cpcxfs/file_id.diz
  inflating: cpcxfs/readme.txt
   creating: cpcxfs/src/
  inflating: cpcxfs/src/descript.ion
  inflating: cpcxfs/src/Makefile.win
  inflating: cpcxfs/src/keywords.h
  inflating: cpcxfs/src/cpcxfs.cbp
  inflating: cpcxfs/src/cpcxfs.layout
  inflating: cpcxfs/src/unix.h
  inflating: cpcxfs/src/makefile.dos
  inflating: cpcxfs/src/makefile.lnx
  inflating: cpcxfs/src/cpcxfs
  inflating: cpcxfs/src/cpcfs.c
  inflating: cpcxfs/src/dos.h
  inflating: cpcxfs/src/tools.c
  inflating: cpcxfs/src/makedoc
  inflating: cpcxfs/src/dos.c
   creating: cpcxfs/src/test/
 extracting: cpcxfs/src/test/smalldoc2.txt
  inflating: cpcxfs/src/test/smallfile.txt
  inflating: cpcxfs/src/test/test.sh
  inflating: cpcxfs/src/test/test3.dsk
  inflating: cpcxfs/src/test/small.txt
 extracting: cpcxfs/src/test/instruct.txt
  inflating: cpcxfs/src/test/test.dsk
  inflating: cpcxfs/src/test/test2.dsk
  inflating: cpcxfs/src/test/smalldoc.txt
  inflating: cpcxfs/src/test/small
  inflating: cpcxfs/src/fs.c
  inflating: cpcxfs/src/cpcfs.h
  inflating: cpcxfs/src/unix.c
  inflating: cpcxfs/src/match.h
  inflating: cpcxfs/src/ui.c
  inflating: cpcxfs/src/cpcfs.prj
  inflating: cpcxfs/src/makedoc.c
  inflating: cpcxfs/src/readdef.c
  inflating: cpcxfs/src/match.c
  inflating: cpcxfs/src/cpcxfs.dev
  inflating: cpcxfs/cpcfs.hlp
  inflating: cpcxfs/drop_tag.bat
  inflating: cpcxfs/template.doc
  inflating: cpcxfs/cpcfs.doc
  inflating: cpcxfs/getcpm.bas
touch cpcxfs/.unpacked
************************************************************************
**************** Source extracted to: cpcxfs
************************************************************************
************************************************************************
**************** Patching source in: cpcxfs_build_patch.patch cpcxfs/.unpacked
************************************************************************
patch -p0 < cpcxfs_build_patch.patch
patching file cpcxfs/src/cpcfs.c
Hunk #1 FAILED at 12.
Hunk #2 FAILED at 60.
Hunk #3 FAILED at 542.
3 out of 3 hunks FAILED -- saving rejects to file cpcxfs/src/cpcfs.c.rej
make: *** [Makefile:63: recipe for target `cpcxfs/.patched' failed
cpcxfs/.patched] Error 1

After having a look at this, I thought that this might indeed be a version issue, and I decided to run cygwin-setup again and chose a different mirror. With a different mirror, plenty of files have been updated to newer version. I was using a non-updated mirror.

Now patches are correctly applied, so it seems it was a version issue. This is the output after updating cygwin from an up-to-date mirror:

$ make dsk
BINAMSDOSS = hellosdc.binamsdos
BINS = hellosdc.bin
CDTC_ENV_FOR_2CDT = ..//tool/2cdt/build_config.inc
CDTC_ENV_FOR_CFWI = ..//cpclib/cfwi/cfwi.lib
CDTC_ENV_FOR_CPCRSLIB = ..//cpclib/cpcrslib/cpcrslib_SDCC.installtree/.installed
CDTC_ENV_FOR_CPCXFS = ..//tool/cpcxfs/build_config.inc
CDTC_ENV_FOR_CPC_PUTCHAR = ..//cpclib/cdtc_stdio/cdtc_stdio.lib ..//cpclib/cdtc_stdio/putchar_cpc.rel
CDTC_ENV_FOR_HEX2BIN = ..//tool/hex2bin/build_config.inc
CDTC_ENV_FOR_IDSK = ..//tool/idsk/build_config.inc
CDTC_ENV_FOR_PLAYTZX = ..//tool/playtzx/build_config.inc
CDTC_ENV_FOR_SDCC = ..//tool/sdcc/build_config.inc
CDTNAME = hellosdc.cdt
CODELOC = 0x4000
DSKNAME = hellosdc.dsk
GENHRDS = hello.h
HDRS = fillscreen.h hello.h cpcfirmware.h
IHXS = hellosdc.ihx
LDFLAGS =
RELS = hello.rel km_wait_key.rel fillscreen.rel
SRCS = hello.c
SRSS = km_wait_key.s fillscreen.s
TARGETS = hellosdc.dsk hellosdc.bin
VOCNAME = hellosdc.voc
( . ..//tool/hex2bin/build_config.inc ; hex2bin -e "bin" -p 00 "hellosdc.ihx" | tee "hellosdc.bin.log" ; )
/bin/bash: /home/ronaldo/cpc-dev-tool-chain/tool/hex2bin/Hex2bin-1.0.10/hex2bin: cannot execute binary file: Exec format error
( export LC_ALL=C ; make -C "..//tool/addhead" build_config.inc ; )
make[1]: Entering directory '/home/ronaldo/cpc-dev-tool-chain/tool/addhead'
PRODUCT_NAME = addhead
EXTRACT_DIR_NAME = addhead
PATCHNAME = addhead_build_patch.patch
ARCHIVE_NAME = addhead.zip
BUILD_TARGET_FILE = addhead//addhead
BUILD_DIR = addhead/
TARGETS = build_config.inc
URL_RELEASE = http://cpctech.cpc-live.com/download/addhead.zip
************************************************************************
**************** Patching source in: addhead_build_patch.patch addhead/.unpacked
************************************************************************
patch -p0 < addhead_build_patch.patch
patching file addhead/addhead.c
touch addhead/.patched
************************************************************************
**************** Source patched in: addhead
************************************************************************
************************************************************************
**************** Configuring and build in: addhead/.patched
************************************************************************
( set -e ; cd addhead/ ;_ALL=C make --print-directory ; )
make[2]: Entering directory '/home/ronaldo/cpc-dev-tool-chain/tool/addhead/addhead'
gcc -O2 -O3 -DUNIX   -c -o addhead.o addhead.c
addhead.c: In function 'main':
addhead.c:464:33: warning: passing argument 2 of 'ArgumentList_Execute' from incompatible pointer type
  if (ArgumentList_Execute(argc, argv, OptionTable, printf, NonOptionHandler)==OPTION_OK)
                                 ^
In file included from addhead.c:26:0:
opth.h:60:5: note: expected 'const char **' but argument is of type 'char **'
 int ArgumentList_Execute(const int argc, const char **argv,OPTION *pOptionTable, ERROR_FUNCTION pOutputError, int (*pNonOptionHandler)(const char *pArgument));
     ^
addhead.c:464:52: warning: passing argument 4 of 'ArgumentList_Execute' from incompatible pointer type
  if (ArgumentList_Execute(argc, argv, OptionTable, printf, NonOptionHandler)==OPTION_OK)
                                                    ^
In file included from addhead.c:26:0:
opth.h:60:5: note: expected 'ERROR_FUNCTION' but argument is of type 'int (__attribute__((__cdecl__)) *)(const char *)'
 int ArgumentList_Execute(const int argc, const char **argv,OPTION *pOptionTable, ERROR_FUNCTION pOutputError, int (*pNonOptionHandler)(const char *pArgument));
     ^
gcc -O2 -O3 -DUNIX   -c -o opth.o opth.c
gcc  addhead.o opth.o -o addhead  -s
make[2]: Leaving directory '/home/ronaldo/cpc-dev-tool-chain/tool/addhead/addhead'
************************************************************************
**************** Configured and built in: addhead/
************************************************************************
(set -eu ; \
{ \
echo "# with bash do \"source\" this file." ; \
cd "addhead/" ; \
echo "export PATH=\"\${PATH}:$PWD\"" ; \
} >build_config.inc ; )
make[1]: Leaving directory '/home/ronaldo/cpc-dev-tool-chain/tool/addhead'
( set -exv ; \
LOADADDR=$( sed -n 's/^Lowest address  = 0000\([0-9]*\).*$/\1/p' <hellosdc.bin.log ) ; \
RUNADDR=$( sed -n 's/^ *0000\([0-9A-F]*\) *cpc_run_address  *.*$/\1/p' <hellosdc.map ) ; \
if [[ -z "$RUNADDR" ]] ; then \
RUNADDR=$( sed -n 's/^ *0000\([0-9A-F]*\) *init  *.*$/\1/p' <hellosdc.map ) ; \
fi ; \
if [[ -z "$RUNADDR" ]] ; then \
RUNADDR=$( sed -n 's/^ *0000\([0-9A-F]*\) *_main  *.*$/\1/p' <hellosdc.map ) ; \
fi ; \
if [[ -z "$RUNADDR" ]] ; then \
echo "Cannot figure out run address. Aborting." ; exit 1 ; \
fi ; \
. ..//tool/addhead/build_config.inc ; \
addhead -a -t "binary" "hellosdc.bin" "hellosdc.binamsdos" -x '&'${RUNADDR} -s '&'${LOADADDR} | tee "hellosdc.binamsdos.log" ; \
)
 sed -n 's/^Lowest address  = 0000\([0-9]*\).*$/\1/p' <hellosdc.bin.log
++ sed -n 's/^Lowest address  = 0000\([0-9]*\).*$/\1/p'
+ LOADADDR=
 sed -n 's/^ *0000\([0-9A-F]*\) *cpc_run_address  *.*$/\1/p' <hellosdc.map
++ sed -n 's/^ *0000\([0-9A-F]*\) *cpc_run_address  *.*$/\1/p'
+ RUNADDR=
+ [[ -z '' ]]
 sed -n 's/^ *0000\([0-9A-F]*\) *init  *.*$/\1/p' <hellosdc.map
++ sed -n 's/^ *0000\([0-9A-F]*\) *init  *.*$/\1/p'
+ RUNADDR=
+ [[ -z '' ]]
 sed -n 's/^ *0000\([0-9A-F]*\) *_main  *.*$/\1/p' <hellosdc.map
++ sed -n 's/^ *0000\([0-9A-F]*\) *_main  *.*$/\1/p'
+ RUNADDR=4000
+ [[ -z 4000 ]]
+ . ..//tool/addhead/build_config.inc
# with bash do "source" this file.
export PATH="${PATH}:/home/ronaldo/cpc-dev-tool-chain/tool/addhead/addhead"
++ export PATH=/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/home/ronaldo/cpc-dev-tool-chain/tool/addhead/addhead
++ PATH=/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/home/ronaldo/cpc-dev-tool-chain/tool/addhead/addhead
+ addhead -a -t binary hellosdc.bin hellosdc.binamsdos -x '&4000' -s '&'
+ tee hellosdc.binamsdos.log
User defined type as "binary"
User defined execution address as 16384 (&4000)
User defined start address as 0 (&0000)
Failed to open input file
( export LC_ALL=C ; make -C "..//tool/cpcxfs" ; )
make[1]: Entering directory '/home/ronaldo/cpc-dev-tool-chain/tool/cpcxfs'
PRODUCT_NAME = cpcxfs
EXTRACT_DIR_NAME = cpcxfs
PATCHNAME = cpcxfs_build_patch.patch
ARCHIVE_NAME = cpcxfs.zip
BUILD_TARGET_FILE = cpcxfs/src/cpcxfs
BUILD_DIR = cpcxfs/src
TARGETS = build_config.inc
URL_RELEASE = http://cpctech.cpc-live.com/download/cpcxfs.zip
************************************************************************
**************** Patching source in: cpcxfs_build_patch.patch cpcxfs/.unpacked
************************************************************************
patch -p0 < cpcxfs_build_patch.patch
patching file cpcxfs/src/cpcfs.c
touch cpcxfs/.patched
************************************************************************
**************** Source patched in: cpcxfs
************************************************************************
************************************************************************
**************** Configuring and build in: cpcxfs/.patched
************************************************************************
( set -e ; cd cpcxfs/src ;_ALL=C make --print-directory -f makefile.lnx ; )
make[2]: Entering directory '/home/ronaldo/cpc-dev-tool-chain/tool/cpcxfs/cpcxfs/src'
gcc -Wall -O3 -DLINUX=1 -DDOS=0   -c -o match.o match.c
match.c: In function 'matche_after_star':
match.c:406:16: warning: type defaults to 'int' in declaration of 'nextp' [-Wimplicit-int]
       register nextp;
                ^
gcc -Wall -O3 -DLINUX=1 -DDOS=0   -c -o tools.o tools.c
In file included from cpcfs.h:73:0,
                 from tools.c:21:
unix.h:34:0: warning: "O_BINARY" redefined
 #define O_BINARY 0  /* dummy to make DOS happy */
 ^
In file included from /usr/include/sys/fcntl.h:3:0,
                 from /usr/include/fcntl.h:15,
                 from /usr/include/sys/file.h:26,
                 from unix.h:13,
                 from cpcfs.h:73,
                 from tools.c:21:
/usr/include/sys/_default_fcntl.h:56:0: note: this is the location of the previous definition
 #define O_BINARY _FBINARY
 ^
tools.c: In function 'lower':
tools.c:71:3: warning: array subscript has type 'char' [-Wchar-subscripts]
   *s=tolower(*s);
   ^
tools.c: In function 'upper':
tools.c:83:3: warning: array subscript has type 'char' [-Wchar-subscripts]
   *s = toupper(*s);
   ^
tools.c: In function 'append_suffix':
tools.c:106:3: warning: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
   strcat(name,".");
   ^
tools.c:106:3: warning: incompatible implicit declaration of built-in function 'strcat'
tools.c: In function 'parse_attr':
tools.c:221:2: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
  strcpy(s,str);
  ^
tools.c:221:2: warning: incompatible implicit declaration of built-in function 'strcpy'
tools.c:225:4: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    if (strcmp(s,attr_name[i][j])==0) {
    ^
tools.c: In function 'newpage':
tools.c:272:2: warning: incompatible implicit declaration of built-in function 'strcpy'
  strcpy(valid_keys,keys);
  ^
tools.c: In function 'nextline':
tools.c:292:4: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    for (i=0; i<(int)strlen(valid_keys);i++) {
    ^
tools.c:292:21: warning: incompatible implicit declaration of built-in function 'strlen'
    for (i=0; i<(int)strlen(valid_keys);i++) {
                     ^
tools.c:303:4: warning: array subscript has type 'char' [-Wchar-subscripts]
    answer = tolower(wait_for_key(0,TRUE));
    ^
tools.c:306:4: warning: implicit declaration of function 'strchr' [-Wimplicit-function-declaration]
    if (answer=='c' && strchr(valid_keys,'c')!=NULL) {
    ^
tools.c:306:23: warning: incompatible implicit declaration of built-in function 'strchr'
    if (answer=='c' && strchr(valid_keys,'c')!=NULL) {
                       ^
tools.c: In function 'show_format':
tools.c:344:4: warning: incompatible implicit declaration of built-in function 'strcat'
    strcat(format, entry->ident);
    ^
tools.c:347:3: warning: incompatible implicit declaration of built-in function 'strcat'
   strcat(format, " (");
   ^
tools.c: In function 'show_mode':
tools.c:365:15: warning: incompatible implicit declaration of built-in function 'strcpy'
  case M_BIN:  strcpy(result,"Binary"); break;
               ^
tools.c: In function 'expand_percent':
tools.c:495:2: warning: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration]
  strncpy(to,t0,max-1);
  ^
tools.c:495:2: warning: incompatible implicit declaration of built-in function 'strncpy'
tools.c: In function 'confirmed':
tools.c:523:3: warning: array subscript has type 'char' [-Wchar-subscripts]
   return (tolower(answer) == 'y');
   ^
tools.c: In function 'parse_cpm_filename':
tools.c:546:6: warning: incompatible implicit declaration of built-in function 'strchr'
  p = strchr(name,':');
      ^
tools.c:573:10: warning: incompatible implicit declaration of built-in function 'strcpy'
  if (*p) strcpy(ext,p+1);
          ^
tools.c: In function 'parse_filename':
tools.c:615:2: warning: implicit declaration of function 'strrchr' [-Wimplicit-function-declaration]
  p = strrchr(name,DIRSEPARATOR);
  ^
tools.c:615:6: warning: incompatible implicit declaration of built-in function 'strrchr'
  p = strrchr(name,DIRSEPARATOR);
      ^
tools.c:617:3: warning: incompatible implicit declaration of built-in function 'strncpy'
   strncpy(path,name,p-name+2);
   ^
tools.c:625:2: warning: incompatible implicit declaration of built-in function 'strcpy'
  strcpy(root,name);
  ^
tools.c: In function 'pager':
tools.c:695:3: warning: incompatible implicit declaration of built-in function 'strcpy'
   strcpy(buf,pag);
   ^
tools.c:697:2: warning: incompatible implicit declaration of built-in function 'strcat'
  strcat(buf," ");
  ^
tools.c: In function 'str2mem':
tools.c:714:2: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
  memset(mem,' ',spc);
  ^
tools.c:714:2: warning: incompatible implicit declaration of built-in function 'memset'
tools.c: In function 'build_cpm_name':
tools.c:734:16: warning: incompatible implicit declaration of built-in function 'strcpy'
  if (user==-2) strcpy(buf,"*:");
                ^
tools.c:737:2: warning: incompatible implicit declaration of built-in function 'strcat'
  strcat(buf,root);
  ^
tools.c: In function 'build_cpm_name_32':
tools.c:753:17: warning: incompatible implicit declaration of built-in function 'strcpy'
  if (user==-2) {strcpy(buf,"*:"); buf +=2;}
                 ^
tools.c:756:2: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
  memcpy(buf,root,8);
  ^
tools.c:756:2: warning: incompatible implicit declaration of built-in function 'memcpy'
tools.c:759:2: warning: implicit declaration of function 'strncmp' [-Wimplicit-function-declaration]
  if (strncmp(ext,"   ",3)!=0) {
  ^
tools.c: In function 'has_wildcards':
tools.c:774:19: warning: incompatible implicit declaration of built-in function 'strcpy'
  if (os_tag=='c') strcpy(wild,"*?[]"); /* !^- ??? */
                   ^
tools.c:779:7: warning: incompatible implicit declaration of built-in function 'strchr'
   if (strchr(wild,*name) != NULL) return TRUE;
       ^
gcc -Wall -O3 -DLINUX=1 -DDOS=0   -c -o fs.o fs.c
In file included from cpcfs.h:73:0,
                 from fs.c:19:
unix.h:34:0: warning: "O_BINARY" redefined
 #define O_BINARY 0  /* dummy to make DOS happy */
 ^
In file included from /usr/include/sys/fcntl.h:3:0,
                 from /usr/include/fcntl.h:15,
                 from /usr/include/sys/file.h:26,
                 from unix.h:13,
                 from cpcfs.h:73,
                 from fs.c:19:
/usr/include/sys/_default_fcntl.h:56:0: note: this is the location of the previous definition
 #define O_BINARY _FBINARY
 ^
fs.c: In function 'tag_ok':
fs.c:43:2: warning: implicit declaration of function 'strncmp' [-Wimplicit-function-declaration]
  if (strncmp("EXTENDED", (signed char *)disk_header.tag,8)==0)
  ^
fs.c: In function 'read_block':
fs.c:912:11: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
           memset(block_buffer+filled, 0, dpb->BPS);
           ^
fs.c:912:11: warning: incompatible implicit declaration of built-in function 'memset'
fs.c:918:7: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
       memcpy(block_buffer+filled, sector_ptr, dpb->BPS);
       ^
fs.c:918:7: warning: incompatible implicit declaration of built-in function 'memcpy'
fs.c: In function 'write_block':
fs.c:983:3: warning: incompatible implicit declaration of built-in function 'memcpy'
   memcpy(sector_ptr, buf+filled, dpb->BPS);
   ^
fs.c: In function 'nuke_block':
fs.c:1002:2: warning: incompatible implicit declaration of built-in function 'memset'
  memset(block_buffer, 0x0e5, dpb->BLS);
  ^
fs.c: In function 'glob_cpm_next':
fs.c:1033:21: warning: pointer targets in passing argument 1 of 'build_cpm_name_32' differ in signedness [-Wpointer-sign]
   build_cpm_name_32((signed char*)name, directory[i].user,
                     ^
In file included from fs.c:19:0:
cpcfs.h:426:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name_32(char *buf, int user, char *root, char *ext);
      ^
fs.c:1034:7: warning: pointer targets in passing argument 3 of 'build_cpm_name_32' differ in signedness [-Wpointer-sign]
       (signed char*)directory[i].root,
       ^
In file included from fs.c:19:0:
cpcfs.h:426:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name_32(char *buf, int user, char *root, char *ext);
      ^
fs.c:1035:7: warning: pointer targets in passing argument 4 of 'build_cpm_name_32' differ in signedness [-Wpointer-sign]
       (signed char*)directory[i].ext);
       ^
In file included from fs.c:19:0:
cpcfs.h:426:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name_32(char *buf, int user, char *root, char *ext);
      ^
fs.c:1036:13: warning: pointer targets in passing argument 1 of 'match' differ in signedness [-Wpointer-sign]
   if (match((signed char*)pattern[glob_env],(signed char*)name)) {
             ^
In file included from cpcfs.h:23:0,
                 from fs.c:19:
match.h:84:9: note: expected 'char *' but argument is of type 'signed char *'
 BOOLEAN match (char *pattern, char *text);
         ^
fs.c:1036:45: warning: pointer targets in passing argument 2 of 'match' differ in signedness [-Wpointer-sign]
   if (match((signed char*)pattern[glob_env],(signed char*)name)) {
                                             ^
In file included from cpcfs.h:23:0,
                 from fs.c:19:
match.h:84:9: note: expected 'char *' but argument is of type 'signed char *'
 BOOLEAN match (char *pattern, char *text);
         ^
fs.c: In function 'glob_cpm_file':
fs.c:1057:35: warning: pointer targets in passing argument 3 of 'parse_cpm_filename' differ in signedness [-Wpointer-sign]
  if (parse_cpm_filename(pat,&user,root,ext))
                                   ^
In file included from fs.c:19:0:
cpcfs.h:421:6: note: expected 'char *' but argument is of type 'uchar *'
 int  parse_cpm_filename(char *name, int *user, char *root, char *ext);
      ^
fs.c:1057:40: warning: pointer targets in passing argument 4 of 'parse_cpm_filename' differ in signedness [-Wpointer-sign]
  if (parse_cpm_filename(pat,&user,root,ext))
                                        ^
In file included from fs.c:19:0:
cpcfs.h:421:6: note: expected 'char *' but argument is of type 'uchar *'
 int  parse_cpm_filename(char *name, int *user, char *root, char *ext);
      ^
fs.c:1059:8: warning: pointer targets in passing argument 1 of 'upper' differ in signedness [-Wpointer-sign]
  upper(root);
        ^
In file included from fs.c:19:0:
cpcfs.h:397:7: note: expected 'char *' but argument is of type 'uchar *'
 char *upper(char*);
       ^
fs.c:1060:8: warning: pointer targets in passing argument 1 of 'upper' differ in signedness [-Wpointer-sign]
  upper(ext);
        ^
In file included from fs.c:19:0:
cpcfs.h:397:7: note: expected 'char *' but argument is of type 'uchar *'
 char *upper(char*);
       ^
fs.c:1063:4: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
    strcpy(root,"*");
    ^
fs.c:1063:4: warning: incompatible implicit declaration of built-in function 'strcpy'
fs.c:1063:11: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
    strcpy(root,"*");
           ^
fs.c:1063:11: note: expected 'char *' but argument is of type 'uchar *'
fs.c:1064:11: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
    strcpy(ext,"*");
           ^
fs.c:1064:11: note: expected 'char *' but argument is of type 'uchar *'
fs.c:1071:17: warning: pointer targets in passing argument 1 of 'build_cpm_name' differ in signedness [-Wpointer-sign]
  build_cpm_name((signed char*)pattern[glob_env], user,
                 ^
In file included from fs.c:19:0:
cpcfs.h:425:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name   (char *buf, int user, char *root, char *ext);
      ^
fs.c:1072:3: warning: pointer targets in passing argument 3 of 'build_cpm_name' differ in signedness [-Wpointer-sign]
   (signed char*)root, (signed char*)ext);
   ^
In file included from fs.c:19:0:
cpcfs.h:425:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name   (char *buf, int user, char *root, char *ext);
      ^
fs.c:1072:23: warning: pointer targets in passing argument 4 of 'build_cpm_name' differ in signedness [-Wpointer-sign]
   (signed char*)root, (signed char*)ext);
                       ^
In file included from fs.c:19:0:
cpcfs.h:425:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name   (char *buf, int user, char *root, char *ext);
      ^
fs.c: In function 'update_directory':
fs.c:1114:21: warning: pointer targets in passing argument 1 of 'build_cpm_name_32' differ in signedness [-Wpointer-sign]
   build_cpm_name_32((signed char*)directory[i].name, -1,
                     ^
In file included from fs.c:19:0:
cpcfs.h:426:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name_32(char *buf, int user, char *root, char *ext);
      ^
fs.c:1115:7: warning: pointer targets in passing argument 3 of 'build_cpm_name_32' differ in signedness [-Wpointer-sign]
       (signed char*)directory[i].root,
       ^
In file included from fs.c:19:0:
cpcfs.h:426:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name_32(char *buf, int user, char *root, char *ext);
      ^
fs.c:1116:7: warning: pointer targets in passing argument 4 of 'build_cpm_name_32' differ in signedness [-Wpointer-sign]
       (signed char*)directory[i].ext);
       ^
In file included from fs.c:19:0:
cpcfs.h:426:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name_32(char *buf, int user, char *root, char *ext);
      ^
fs.c:1146:8: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
        (strcmp((signed char*)directory[i].name,
        ^
fs.c: In function 'open_image':
fs.c:1701:3: warning: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration]
   strncpy(full_imagename,p,FULL_IMAGENAME_LENGTH);
   ^
fs.c:1701:3: warning: incompatible implicit declaration of built-in function 'strncpy'
fs.c:1707:2: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
  if (full_imagename[strlen(full_imagename)-1]==DIRSEPARATOR)
  ^
fs.c:1707:21: warning: incompatible implicit declaration of built-in function 'strlen'
  if (full_imagename[strlen(full_imagename)-1]==DIRSEPARATOR)
                     ^
fs.c:1718:4: warning: implicit declaration of function 'strncat' [-Wimplicit-function-declaration]
    strncat(full_imagename,dirsep, BytesRemaining);
    ^
fs.c:1718:4: warning: incompatible implicit declaration of built-in function 'strncat'
fs.c:1726:4: warning: incompatible implicit declaration of built-in function 'strncat'
    strncat(full_imagename,name, BytesRemaining);
    ^
fs.c:1734:2: warning: implicit declaration of function 'strrchr' [-Wimplicit-function-declaration]
  if((imagename=strrchr(full_imagename,DIRSEPARATOR)))
  ^
fs.c:1734:16: warning: incompatible implicit declaration of built-in function 'strrchr'
  if((imagename=strrchr(full_imagename,DIRSEPARATOR)))
                ^
fs.c: In function 'comment_image':
fs.c:1826:2: warning: incompatible implicit declaration of built-in function 'memset'
  memset(disk_header.tag+8,0,40);
  ^
fs.c: In function 'dir':
fs.c:1989:2: warning: incompatible implicit declaration of built-in function 'strncpy'
  strncpy(upbuffer, imagename, INPUTLEN);
  ^
fs.c:2142:5: warning: pointer targets in passing argument 2 of 'strncpy' differ in signedness [-Wpointer-sign]
     (signed char*)directory[array[i]].name, INPUTLEN);
     ^
fs.c:2142:5: note: expected 'const char *' but argument is of type 'signed char *'
fs.c:2159:23: warning: pointer targets in passing argument 1 of 'detectmode' differ in signedness [-Wpointer-sign]
     mode = detectmode(buf,dpb->BLS);
                       ^
In file included from fs.c:19:0:
cpcfs.h:488:6: note: expected 'char *' but argument is of type 'uchar *'
 int  detectmode (char *buf, int size) ;
      ^
fs.c: In function 'nuke_dir_entry':
fs.c:2209:2: warning: incompatible implicit declaration of built-in function 'memset'
  memset(&dir_entry->root,0x0e5, 8);
  ^
fs.c: In function 'clean':
fs.c:2252:2: warning: incompatible implicit declaration of built-in function 'memset'
  memset(block_allocation, 0, sizeof(ushort)*(dpb->DSM+1));
  ^
fs.c: In function 'LoadLabelFile':
fs.c:2580:6: warning: incompatible implicit declaration of built-in function 'memcpy'
      memcpy(LabelData, LoadedLabelData+offset, Length-offset);
      ^
fs.c:2582:14: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
      *ppData = LabelData;
              ^
fs.c:2583:16: warning: assignment makes pointer from integer without a cast
      *ppLength = Length-offset;
                ^
fs.c: In function 'write_label':
fs.c:2646:5: warning: incompatible implicit declaration of built-in function 'memcpy'
     memcpy(sector_ptr, label_data + Offset, LengthRemaining);
     ^
fs.c:2647:5: warning: incompatible implicit declaration of built-in function 'memset'
     memset(sector_ptr+LengthRemaining, label_data[Offset + LengthRemaining-1], dpb->BPS-LengthRemaining);
     ^
fs.c:2652:5: warning: incompatible implicit declaration of built-in function 'memcpy'
     memcpy(sector_ptr, label_data + Offset, dpb->BPS);
     ^
fs.c: In function 'format':
fs.c:2699:3: warning: incompatible implicit declaration of built-in function 'strcpy'
   strcpy ((signed char*)disk_header.tag,"EXTENDED    / ");
   ^
fs.c:2699:11: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
   strcpy ((signed char*)disk_header.tag,"EXTENDED    / ");
           ^
fs.c:2699:11: note: expected 'char *' but argument is of type 'signed char *'
fs.c:2703:3: warning: incompatible implicit declaration of built-in function 'strcpy'
   strcpy ((signed char*)disk_header.tag,"MV - CPCEMU / ");
   ^
fs.c:2703:11: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
   strcpy ((signed char*)disk_header.tag,"MV - CPCEMU / ");
           ^
fs.c:2703:11: note: expected 'char *' but argument is of type 'signed char *'
fs.c:2705:2: warning: incompatible implicit declaration of built-in function 'memset'
  memset((disk_header.tag)+14,' ',20);
  ^
fs.c:2707:11: warning: pointer targets in passing argument 1 of 'strftime' differ in signedness [-Wpointer-sign]
  strftime(((signed char*)disk_header.tag)+14,20,"%d %b %y %H:%M",
           ^
In file included from /usr/include/sys/stat.h:8:0,
                 from fs.c:12:
/usr/include/time.h:60:11: note: expected 'char * __restrict__' but argument is of type 'signed char *'
 size_t    _EXFUN(strftime, (char *__restrict _s,
           ^
fs.c:2755:3: warning: incompatible implicit declaration of built-in function 'strncpy'
   strncpy((signed char*)trhd->tag,"Track-Info\r\n",0x10);
   ^
fs.c:2755:11: warning: pointer targets in passing argument 1 of 'strncpy' differ in signedness [-Wpointer-sign]
   strncpy((signed char*)trhd->tag,"Track-Info\r\n",0x10);
           ^
fs.c:2755:11: note: expected 'char *' but argument is of type 'signed char *'
fs.c: In function 'ren_file':
fs.c:2864:17: warning: pointer targets in passing argument 1 of 'build_cpm_name' differ in signedness [-Wpointer-sign]
  build_cpm_name((signed char*)from_full, from_user,
                 ^
In file included from fs.c:19:0:
cpcfs.h:425:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name   (char *buf, int user, char *root, char *ext);
      ^
fs.c:2865:3: warning: pointer targets in passing argument 3 of 'build_cpm_name' differ in signedness [-Wpointer-sign]
   (signed char*)from_root, (signed char*)from_ext);
   ^
In file included from fs.c:19:0:
cpcfs.h:425:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name   (char *buf, int user, char *root, char *ext);
      ^
fs.c:2865:28: warning: pointer targets in passing argument 4 of 'build_cpm_name' differ in signedness [-Wpointer-sign]
   (signed char*)from_root, (signed char*)from_ext);
                            ^
In file included from fs.c:19:0:
cpcfs.h:425:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name   (char *buf, int user, char *root, char *ext);
      ^
fs.c:2870:3: warning: incompatible implicit declaration of built-in function 'strcpy'
   strcpy(to_root,from_root);
   ^
fs.c:2873:17: warning: pointer targets in passing argument 1 of 'build_cpm_name' differ in signedness [-Wpointer-sign]
  build_cpm_name((signed char*)to_full, to_user,
                 ^
In file included from fs.c:19:0:
cpcfs.h:425:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name   (char *buf, int user, char *root, char *ext);
      ^
fs.c:2874:3: warning: pointer targets in passing argument 3 of 'build_cpm_name' differ in signedness [-Wpointer-sign]
   (signed char*)to_root, (signed char*)to_ext);
   ^
In file included from fs.c:19:0:
cpcfs.h:425:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name   (char *buf, int user, char *root, char *ext);
      ^
fs.c:2874:26: warning: pointer targets in passing argument 4 of 'build_cpm_name' differ in signedness [-Wpointer-sign]
   (signed char*)to_root, (signed char*)to_ext);
                          ^
In file included from fs.c:19:0:
cpcfs.h:425:6: note: expected 'char *' but argument is of type 'signed char *'
 void build_cpm_name   (char *buf, int user, char *root, char *ext);
      ^
fs.c:2899:11: warning: pointer targets in passing argument 1 of 'str2mem' differ in signedness [-Wpointer-sign]
   str2mem((signed char*)directory[ent].root,
           ^
In file included from fs.c:19:0:
cpcfs.h:427:6: note: expected 'char *' but argument is of type 'signed char *'
 void str2mem(char *mem, char *str, int spc);
      ^
fs.c:2900:4: warning: pointer targets in passing argument 2 of 'str2mem' differ in signedness [-Wpointer-sign]
    (signed char*)to_root, 8);
    ^
In file included from fs.c:19:0:
cpcfs.h:427:6: note: expected 'char *' but argument is of type 'signed char *'
 void str2mem(char *mem, char *str, int spc);
      ^
fs.c:2901:11: warning: pointer targets in passing argument 1 of 'str2mem' differ in signedness [-Wpointer-sign]
   str2mem((signed char*)directory[ent].ext,
           ^
In file included from fs.c:19:0:
cpcfs.h:427:6: note: expected 'char *' but argument is of type 'signed char *'
 void str2mem(char *mem, char *str, int spc);
      ^
fs.c:2902:4: warning: pointer targets in passing argument 2 of 'str2mem' differ in signedness [-Wpointer-sign]
    (signed char*)to_ext, 3);
    ^
In file included from fs.c:19:0:
cpcfs.h:427:6: note: expected 'char *' but argument is of type 'signed char *'
 void str2mem(char *mem, char *str, int spc);
      ^
fs.c: In function 'dumpdir':
fs.c:3002:3: warning: incompatible implicit declaration of built-in function 'strncpy'
   strncpy(n,(signed char*)directory[i].root,8);  n[8] = 0;
   ^
fs.c:3002:13: warning: pointer targets in passing argument 2 of 'strncpy' differ in signedness [-Wpointer-sign]
   strncpy(n,(signed char*)directory[i].root,8);  n[8] = 0;
             ^
fs.c:3002:13: note: expected 'const char *' but argument is of type 'signed char *'
fs.c:3003:13: warning: pointer targets in passing argument 2 of 'strncpy' differ in signedness [-Wpointer-sign]
   strncpy(e,(signed char*)directory[i].ext,3); e[3] = 0;
             ^
fs.c:3003:13: note: expected 'const char *' but argument is of type 'signed char *'
fs.c: In function 'map':
fs.c:3121:2: warning: incompatible implicit declaration of built-in function 'memset'
  memset(block_allocation, 0, sizeof(ushort)*(dpb->DSM+1));
  ^
fs.c: In function 'get':
fs.c:3321:29: warning: pointer targets in passing argument 1 of 'detectmode' differ in signedness [-Wpointer-sign]
      localmode = detectmode(buf,
                             ^
fs.c:3228:5: note: expected 'char *' but argument is of type 'uchar *'
 int detectmode (char *buf, int size)  {
     ^
fs.c:3360:6: warning: implicit declaration of function 'memchr' [-Wimplicit-function-declaration]
      p = memchr(buf,CPM_EOF,size);
      ^
fs.c:3360:10: warning: incompatible implicit declaration of built-in function 'memchr'
      p = memchr(buf,CPM_EOF,size);
          ^
fs.c: In function 'put':
fs.c:3471:11: warning: pointer targets in passing argument 1 of 'str2mem' differ in signedness [-Wpointer-sign]
   str2mem((signed char*)directory[entry].root,
           ^
In file included from fs.c:19:0:
cpcfs.h:427:6: note: expected 'char *' but argument is of type 'signed char *'
 void str2mem(char *mem, char *str, int spc);
      ^
fs.c:3472:4: warning: pointer targets in passing argument 2 of 'str2mem' differ in signedness [-Wpointer-sign]
    (signed char*)rootname, 8);
    ^
In file included from fs.c:19:0:
cpcfs.h:427:6: note: expected 'char *' but argument is of type 'signed char *'
 void str2mem(char *mem, char *str, int spc);
      ^
fs.c:3473:11: warning: pointer targets in passing argument 1 of 'str2mem' differ in signedness [-Wpointer-sign]
   str2mem((signed char*)directory[entry].ext,
           ^
In file included from fs.c:19:0:
cpcfs.h:427:6: note: expected 'char *' but argument is of type 'signed char *'
 void str2mem(char *mem, char *str, int spc);
      ^
fs.c:3474:4: warning: pointer targets in passing argument 2 of 'str2mem' differ in signedness [-Wpointer-sign]
    (signed char*)extension, 3);
    ^
In file included from fs.c:19:0:
cpcfs.h:427:6: note: expected 'char *' but argument is of type 'signed char *'
 void str2mem(char *mem, char *str, int spc);
      ^
fs.c:3512:24: warning: pointer targets in passing argument 2 of 'write_block' differ in signedness [-Wpointer-sign]
    if (write_block(blk,(signed char*)buf)==NULL) {
                        ^
fs.c:929:8: note: expected 'uchar *' but argument is of type 'signed char *'
 uchar *write_block (int blk, uchar *buf) {
        ^
gcc -Wall -O3 -DLINUX=1 -DDOS=0   -c -o ui.o ui.c
In file included from cpcfs.h:73:0,
                 from ui.c:14:
unix.h:34:0: warning: "O_BINARY" redefined
 #define O_BINARY 0  /* dummy to make DOS happy */
 ^
In file included from /usr/include/sys/fcntl.h:3:0,
                 from /usr/include/fcntl.h:15,
                 from /usr/include/sys/file.h:26,
                 from unix.h:13,
                 from cpcfs.h:73,
                 from ui.c:14:
/usr/include/sys/_default_fcntl.h:56:0: note: this is the location of the previous definition
 #define O_BINARY _FBINARY
 ^
ui.c: In function 'cmd_comment':
ui.c:151:3: warning: array subscript has type 'char' [-Wchar-subscripts]
   switch (tolower(arg[1][1])) {
   ^
ui.c:157:4: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
    strcpy(buf,"EMU / "); /* 6 bytes */
    ^
ui.c:157:4: warning: incompatible implicit declaration of built-in function 'strcpy'
ui.c: In function 'cmd_dir':
ui.c:250:25: warning: incompatible implicit declaration of built-in function 'strcpy'
  if (REMAINING_ARGS==0) strcpy(pattern,"*.*");
                         ^
ui.c: In function 'cmd_dump':
ui.c:347:13: warning: incompatible implicit declaration of built-in function 'strcpy'
   case 'f': strcpy(name,optarg); how=2; break;
             ^
ui.c: In function 'cmd_clean':
ui.c:502:6: warning: unused variable 'freed' [-Wunused-variable]
 long freed = 0;
      ^
ui.c: In function 'cmd_get':
ui.c:614:3: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   && arg[nbof_args][strlen(arg[nbof_args])-1]==DIRSEPARATOR) {
   ^
ui.c:614:21: warning: incompatible implicit declaration of built-in function 'strlen'
   && arg[nbof_args][strlen(arg[nbof_args])-1]==DIRSEPARATOR) {
                     ^
ui.c:627:4: warning: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
    strcat(trg,path);
    ^
ui.c:627:4: warning: incompatible implicit declaration of built-in function 'strcat'
ui.c:644:5: warning: incompatible implicit declaration of built-in function 'strcat'
     strcat(trg,".");
     ^
ui.c:649:4: warning: incompatible implicit declaration of built-in function 'strcpy'
    strcpy(trg,arg[optind+1]);
    ^
ui.c: In function 'cmd_help':
ui.c:676:25: warning: incompatible implicit declaration of built-in function 'strcpy'
  else if (nbof_args==0) strcpy(topic,"~nothing~");
                         ^
ui.c:679:3: warning: incompatible implicit declaration of built-in function 'strcat'
   strcat(topic,arg[1]);
   ^
ui.c:685:2: warning: incompatible implicit declaration of built-in function 'strcat'
  strcat(line,HELPFILE);
  ^
ui.c:695:3: warning: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
   if (!found&& line[0]=='~') found = (strstr(line,topic)!=NULL);
   ^
ui.c:695:39: warning: incompatible implicit declaration of built-in function 'strstr'
   if (!found&& line[0]=='~') found = (strstr(line,topic)!=NULL);
                                       ^
ui.c:702:9: warning: incompatible implicit declaration of built-in function 'strlen'
   topic[strlen(topic)-1]='"';
         ^
ui.c: In function 'cmd_lcd':
ui.c:724:43: warning: incompatible implicit declaration of built-in function 'strlen'
  if ((nbof_args==0) || (arg[1]==NULL) || (strlen(arg[1])==0))
                                           ^
ui.c:796:2: warning: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration]
  strncpy(buf, &arg[1][index], 256);
  ^
ui.c:796:2: warning: incompatible implicit declaration of built-in function 'strncpy'
ui.c: In function 'cmd_ldir':
ui.c:833:2: warning: incompatible implicit declaration of built-in function 'strcat'
  strcat(buf,LDIRCOMMAND);
  ^
ui.c: In function 'cmd_mget':
ui.c:902:4: warning: incompatible implicit declaration of built-in function 'strcpy'
    strcpy(trg,(signed char*)directory[ent].name);
    ^
ui.c:902:15: warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness [-Wpointer-sign]
    strcpy(trg,(signed char*)directory[ent].name);
               ^
ui.c:902:15: note: expected 'const char *' but argument is of type 'signed char *'
ui.c:904:12: warning: incompatible implicit declaration of built-in function 'strlen'
    if (trg[strlen(trg)-1]=='.') trg[strlen(trg)-1]=0;
            ^
ui.c: In function 'cmd_mode':
ui.c:938:2: warning: array subscript has type 'char' [-Wchar-subscripts]
  switch (tolower(arg[1][0]))  {
  ^
ui.c: In function 'cmd_mput':
ui.c:1008:5: warning: incompatible implicit declaration of built-in function 'strcpy'
     strcpy(trg,rootname);
     ^
ui.c:1010:6: warning: incompatible implicit declaration of built-in function 'strcat'
      strcat(trg,".");
      ^
ui.c: In function 'cmd_label':
ui.c:1088:40: warning: passing argument 3 of 'LoadLabelFile' from incompatible pointer type
  LoadLabelFile(arg[optind],&LabelData, &LabelDataLength);
                                        ^
In file included from ui.c:14:0:
cpcfs.h:430:6: note: expected 'long unsigned int **' but argument is of type 'long unsigned int *'
 void LoadLabelFile(char *LabelFilename, unsigned char **ppData, unsigned long **ppLength);
      ^
ui.c:1093:20: warning: pointer targets in passing argument 2 of 'write_label' differ in signedness [-Wpointer-sign]
   write_label(dpb, LabelData,LabelDataLength);
                    ^
In file included from ui.c:14:0:
cpcfs.h:465:6: note: expected 'char *' but argument is of type 'unsigned char *'
 void write_label(DPB_type *dpb,char *label_data, unsigned long label_data_length);
      ^
ui.c:1076:6: warning: unused variable 'optchar' [-Wunused-variable]
 char optchar;
      ^
ui.c:1074:6: warning: unused variable 'name' [-Wunused-variable]
 char name[INPUTLEN];
      ^
ui.c: In function 'cmd_new':
ui.c:1189:2: warning: incompatible implicit declaration of built-in function 'strcpy'
  strcpy(name,arg[optind]);
  ^
ui.c:1219:19: warning: pointer targets in passing argument 2 of 'write_label' differ in signedness [-Wpointer-sign]
   write_label(dpb,dpb->label_data, dpb->label_data_length);
                   ^
In file included from ui.c:14:0:
cpcfs.h:465:6: note: expected 'char *' but argument is of type 'unsigned char *'
 void write_label(DPB_type *dpb,char *label_data, unsigned long label_data_length);
      ^
ui.c: In function 'cmd_open':
ui.c:1325:3: warning: incompatible implicit declaration of built-in function 'strncpy'
   strncpy(buf,arg[optind], INPUTLEN);
   ^
ui.c: In function 'cmd_prompt':
ui.c:1361:3: warning: incompatible implicit declaration of built-in function 'strncpy'
   strncpy(prompt,arg[1], INPUTLEN);
   ^
ui.c:1366:3: warning: incompatible implicit declaration of built-in function 'strcpy'
   strcpy(prompt,">");
   ^
ui.c: In function 'cmd_put':
ui.c:1411:3: warning: incompatible implicit declaration of built-in function 'strcpy'
   strcpy(trg,rootname);
   ^
ui.c:1413:4: warning: incompatible implicit declaration of built-in function 'strcat'
    strcat(trg,".");
    ^
ui.c:1416:27: warning: incompatible implicit declaration of built-in function 'strlen'
  } else if (arg[optind+1][strlen(arg[optind+1])-1]==':') {/* only user */
                           ^
ui.c:1417:3: warning: incompatible implicit declaration of built-in function 'strcpy'
   strcpy(trg,arg[optind+1]);
   ^
ui.c:1418:3: warning: incompatible implicit declaration of built-in function 'strcat'
   strcat(trg,rootname);
   ^
ui.c:1424:3: warning: incompatible implicit declaration of built-in function 'strcpy'
   strcpy(trg,arg[optind+1]);
   ^
ui.c: In function 'cmd_type':
ui.c:1655:13: warning: incompatible implicit declaration of built-in function 'strcpy'
   case 'f': strcpy(outname,optarg); how=2; break;
             ^
ui.c:1713:27: warning: pointer targets in passing argument 1 of 'detectmode' differ in signedness [-Wpointer-sign]
   local_mode = detectmode((signed char*)buf,max((dpb->BLS),r));
                           ^
In file included from ui.c:14:0:
cpcfs.h:488:6: note: expected 'char *' but argument is of type 'signed char *'
 int  detectmode (char *buf, int size) ;
      ^
ui.c: In function 'cmd_user':
ui.c:1764:3: warning: array subscript has type 'char' [-Wchar-subscripts]
   if (!isdigit(arg[1][0])) return cmd_error(errmsg);
   ^
ui.c: In function 'execute_one_cmd':
ui.c:1857:2: warning: incompatible implicit declaration of built-in function 'strncpy'
  strncpy(buffer,input,INPUTLEN-1);
  ^
ui.c:1908:29: warning: incompatible implicit declaration of built-in function 'strlen'
  if (nbof_args==0 && arg[0][strlen(arg[0])-1]==':') {
                             ^
ui.c:1915:3: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   if (strcmp(command[i].name,arg[0])==0) {
   ^
ui.c: In function 'execute_cmd':
ui.c:1929:3: warning: implicit declaration of function 'strchr' [-Wimplicit-function-declaration]
   p = strchr(input,';');
   ^
ui.c:1929:7: warning: incompatible implicit declaration of built-in function 'strchr'
   p = strchr(input,';');
       ^
ui.c: In function 'init':
ui.c:1951:2: warning: incompatible implicit declaration of built-in function 'strcpy'
  strcpy(prompt,"cpcfs> ");
  ^
ui.c:1977:2: warning: incompatible implicit declaration of built-in function 'strncpy'
  strncpy(installpath,argv0, INPUTLEN);
  ^
ui.c:1981:2: warning: implicit declaration of function 'strrchr' [-Wimplicit-function-declaration]
  p = strrchr(installpath,DIRSEPARATOR);
  ^
ui.c:1981:6: warning: incompatible implicit declaration of built-in function 'strrchr'
  p = strrchr(installpath,DIRSEPARATOR);
      ^
ui.c:1998:3: warning: incompatible implicit declaration of built-in function 'strcat'
   strcat(installpath, local_string);
   ^
ui.c: In function 'read_cfg_file':
ui.c:2025:2: warning: incompatible implicit declaration of built-in function 'strncpy'
  strncpy(name,CONFIGNAME,INPUTLEN);
  ^
ui.c:2031:3: warning: incompatible implicit declaration of built-in function 'strcat'
   strcat(name,CONFIGNAME);
   ^
ui.c: In function 'ui_main':
ui.c:2220:20: warning: incompatible implicit declaration of built-in function 'strlen'
   size_t nLength = strlen(argv[i]);
                    ^
ui.c:2264:3: warning: incompatible implicit declaration of built-in function 'strcpy'
   strcpy(line,"open");
   ^
ui.c:2268:13: warning: incompatible implicit declaration of built-in function 'strcat'
             strcat(line," -f ");
             ^
ui.c:2271:9: warning: incompatible implicit declaration of built-in function 'strcat'
         strcat(line," \"");
         ^
ui.c:2280:2: warning: incompatible implicit declaration of built-in function 'strcpy'
  strcpy(line,"open"); /* if no command is given */
  ^
ui.c:2284:9: warning: incompatible implicit declaration of built-in function 'strcat'
         strcat(line," -f ");
         ^
ui.c:2296:4: warning: array subscript has type 'char' [-Wchar-subscripts]
    switch (tolower(argv[i][1])) {
    ^
ui.c:2303:5: warning: array subscript has type 'char' [-Wchar-subscripts]
     switch (tolower(argv[i][2])) {
     ^
ui.c:2310:5: warning: array subscript has type 'char' [-Wchar-subscripts]
     switch (tolower(argv[i][2])) {
     ^
ui.c:2330:5: warning: incompatible implicit declaration of built-in function 'strcat'
     strcat(line," \"");
     ^
ui.c:2334:5: warning: incompatible implicit declaration of built-in function 'strcat'
     strcat(line," ");
     ^
ui.c:2336:4: warning: incompatible implicit declaration of built-in function 'strcat'
    strcat(line,argv[i]);
    ^
ui.c: In function 'cmd_get':
ui.c:623:4: warning: 'src' may be used uninitialized in this function [-Wmaybe-uninitialized]
    build_cpm_name(src,user,root,ext);
    ^
gcc -Wall -O3 -DLINUX=1 -DDOS=0   -c -o cpcfs.o cpcfs.c
In file included from cpcfs.h:73:0,
                 from cpcfs.c:14:
unix.h:34:0: warning: "O_BINARY" redefined
 #define O_BINARY 0  /* dummy to make DOS happy */
 ^
In file included from /usr/include/sys/fcntl.h:3:0,
                 from /usr/include/fcntl.h:15,
                 from /usr/include/sys/file.h:26,
                 from unix.h:13,
                 from cpcfs.h:73,
                 from cpcfs.c:14:
/usr/include/sys/_default_fcntl.h:56:0: note: this is the location of the previous definition
 #define O_BINARY _FBINARY
 ^
cpcfs.c: In function 'dpb_list_add_item':
cpcfs.c:472:4: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    entry->description = (char *)malloc(strlen(description)+1);
    ^
cpcfs.c:472:40: warning: incompatible implicit declaration of built-in function 'strlen'
    entry->description = (char *)malloc(strlen(description)+1);
                                        ^
cpcfs.c:476:5: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
     strcpy(entry->description, description);
     ^
cpcfs.c:476:5: warning: incompatible implicit declaration of built-in function 'strcpy'
cpcfs.c:486:34: warning: incompatible implicit declaration of built-in function 'strlen'
    entry->ident = (char *)malloc(strlen(ident)+1);
                                  ^
cpcfs.c:490:5: warning: incompatible implicit declaration of built-in function 'strcpy'
     strcpy(entry->ident, ident);
     ^
cpcfs.c:497:3: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
   memcpy(&entry->dpb, dpb, sizeof(DPB_type));
   ^
cpcfs.c:497:3: warning: incompatible implicit declaration of built-in function 'memcpy'
gcc -Wall -O3 -DLINUX=1 -DDOS=0   -c -o readdef.o readdef.c
In file included from cpcfs.h:73:0,
                 from readdef.c:24:
unix.h:34:0: warning: "O_BINARY" redefined
 #define O_BINARY 0  /* dummy to make DOS happy */
 ^
In file included from /usr/include/sys/fcntl.h:3:0,
                 from /usr/include/fcntl.h:15,
                 from /usr/include/sys/file.h:26,
                 from unix.h:13,
                 from cpcfs.h:73,
                 from readdef.c:24:
/usr/include/sys/_default_fcntl.h:56:0: note: this is the location of the previous definition
 #define O_BINARY _FBINARY
 ^
readdef.c: In function 'Parse_Init':
readdef.c:78:18: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
  pParse->pString = line;
                  ^
readdef.c: In function 'Parse__LookupID':
readdef.c:87:33: warning: pointer targets in passing argument 2 of 'strcmp' differ in signedness [-Wpointer-sign]
   if (strcmp(pTable[i].pString, pString)==0)
                                 ^
In file included from /usr/include/stdio.h:29:0,
                 from readdef.c:10:
/usr/include/string.h:28:6: note: expected 'const char *' but argument is of type 'unsigned char *'
 int  _EXFUN(strcmp,(const char *, const char *));
      ^
readdef.c: In function 'Parse__IsAKeywordChar':
readdef.c:104:2: warning: array subscript has type 'char' [-Wchar-subscripts]
  return (isalpha(ch) || isdigit(ch) || (ch=='&'));
  ^
readdef.c:104:2: warning: array subscript has type 'char' [-Wchar-subscripts]
readdef.c: In function 'Parse__IsHexDigit':
readdef.c:124:2: warning: array subscript has type 'char' [-Wchar-subscripts]
  upper_ch = toupper(ch);
  ^
readdef.c: In function 'Parse__ConvertDigitToNumber':
readdef.c:134:2: warning: array subscript has type 'char' [-Wchar-subscripts]
  if (isdigit(ch))
  ^
readdef.c: In function 'Parse__ConvertHexDigitToNumber':
readdef.c:146:2: warning: array subscript has type 'char' [-Wchar-subscripts]
  Number = toupper(ch)-'0';
  ^
readdef.c: In function 'Parse__ReadNumber':
readdef.c:201:4: warning: array subscript has type 'char' [-Wchar-subscripts]
    ParseBuffer[Index] = toupper(ch);
    ^
readdef.c:209:2: warning: array subscript has type 'char' [-Wchar-subscripts]
  if (toupper(ch)=='H')
  ^
readdef.c:222:2: warning: array subscript has type 'char' [-Wchar-subscripts]
  else if (toupper(ch)=='B')
  ^
readdef.c: In function 'Parse__ReadKeyword':
readdef.c:274:4: warning: array subscript has type 'char' [-Wchar-subscripts]
    ParseBuffer[Index] = toupper(ch);
    ^
readdef.c:286:2: warning: pointer targets in return differ in signedness [-Wpointer-sign]
  return ParseBuffer;
  ^
readdef.c: In function 'Parse_Get':
readdef.c:338:3: warning: array subscript has type 'char' [-Wchar-subscripts]
   else if (isdigit(ch))
   ^
readdef.c:349:3: warning: array subscript has type 'char' [-Wchar-subscripts]
   if (isalpha(ch))
   ^
readdef.c: In function 'parse_def_file':
readdef.c:499:18: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
          pString = ParseStatus.pString;
                  ^
readdef.c:806:20: warning: passing argument 1 of 'strlen' makes pointer from integer without a cast
         if (strlen(ParseItem.Value)!=0)
                    ^
In file included from /usr/include/stdio.h:29:0,
                 from readdef.c:10:
/usr/include/string.h:33:9: note: expected 'const char *' but argument is of type 'int'
 size_t  _EXFUN(strlen,(const char *));
         ^
readdef.c:811:40: warning: passing argument 1 of 'strlen' makes pointer from integer without a cast
          LabelFilename = malloc(strlen(ParseItem.Value)+4+1);
                                        ^
In file included from /usr/include/stdio.h:29:0,
                 from readdef.c:10:
/usr/include/string.h:33:9: note: expected 'const char *' but argument is of type 'int'
 size_t  _EXFUN(strlen,(const char *));
         ^
readdef.c:820:32: warning: passing argument 2 of 'strcpy' makes pointer from integer without a cast
           strcpy(LabelFilename,ParseItem.Value);
                                ^
In file included from /usr/include/stdio.h:29:0,
                 from readdef.c:10:
/usr/include/string.h:30:8: note: expected 'const char *' but argument is of type 'int'
 char  *_EXFUN(strcpy,(char *__restrict, const char *__restrict));
        ^
readdef.c:824:61: warning: passing argument 3 of 'LoadLabelFile' from incompatible pointer type
           LoadLabelFile(LabelFilename,&temp_dpb.label_data, &temp_dpb.label_data_length);
                                                             ^
In file included from readdef.c:24:0:
cpcfs.h:430:6: note: expected 'long unsigned int **' but argument is of type 'long unsigned int *'
 void LoadLabelFile(char *LabelFilename, unsigned char **ppData, unsigned long **ppLength);
      ^
readdef.c:815:17: warning: unused variable 'fh' [-Wunused-variable]
           FILE *fh;
                 ^
gcc -Wall -O3 -DLINUX=1 -DDOS=0   -c -o unix.o unix.c
unix.c:18:21: fatal error: termcap.h: No such file or directory
 #include <termcap.h>
                     ^
compilation terminated.
<builtin>: recipe for target 'unix.o' failed
make[2]: *** [unix.o] Error 1
make[2]: Leaving directory '/home/ronaldo/cpc-dev-tool-chain/tool/cpcxfs/cpcxfs/src'
Makefile:76: recipe for target 'cpcxfs/src/cpcxfs' failed
make[1]: *** [cpcxfs/src/cpcxfs] Error 1
make[1]: Leaving directory '/home/ronaldo/cpc-dev-tool-chain/tool/cpcxfs'
..//sdcc-project.Makefile:176: fallo en las instrucciones para el objetivo '..//tool/cpcxfs/build_config.inc'
make: *** [..//tool/cpcxfs/build_config.inc] Error 2

There is a big bunch of warnings regarding cpcxfs (I suppose it was compiled using an older version of gcc or a different compiler). As you see, it finally complains about termcap.h. This is easily solved by installing libncurses-devel in cygwin, which includes termcap.h. Then, we arrive to another problem:

$ make dsk
BINAMSDOSS = hellosdc.binamsdos
BINS = hellosdc.bin
CDTC_ENV_FOR_2CDT = ..//tool/2cdt/build_config.inc
CDTC_ENV_FOR_CFWI = ..//cpclib/cfwi/cfwi.lib
CDTC_ENV_FOR_CPCRSLIB = ..//cpclib/cpcrslib/cpcrslib_SDCC.installtree/.installed
CDTC_ENV_FOR_CPCXFS = ..//tool/cpcxfs/build_config.inc
CDTC_ENV_FOR_CPC_PUTCHAR = ..//cpclib/cdtc_stdio/cdtc_stdio.lib ..//cpclib/cdtc_stdio/putchar_cpc.rel
CDTC_ENV_FOR_HEX2BIN = ..//tool/hex2bin/build_config.inc
CDTC_ENV_FOR_IDSK = ..//tool/idsk/build_config.inc
CDTC_ENV_FOR_PLAYTZX = ..//tool/playtzx/build_config.inc
CDTC_ENV_FOR_SDCC = ..//tool/sdcc/build_config.inc
CDTNAME = hellosdc.cdt
CODELOC = 0x4000
DSKNAME = hellosdc.dsk
GENHRDS = hello.h
HDRS = fillscreen.h hello.h cpcfirmware.h
IHXS = hellosdc.ihx
LDFLAGS =
RELS = hello.rel km_wait_key.rel fillscreen.rel
SRCS = hello.c
SRSS = km_wait_key.s fillscreen.s
TARGETS = hellosdc.dsk hellosdc.bin
VOCNAME = hellosdc.voc
( . ..//tool/hex2bin/build_config.inc ; hex2bin -e "bin" -p 00 "hellosdc.ihx" | tee "hellosdc.bin.log" ; )
/bin/bash: /home/ronaldo/cpc-dev-tool-chain/tool/hex2bin/Hex2bin-1.0.10/hex2bin: cannot execute binary file: Exec format error
( set -exv ; \
LOADADDR=$( sed -n 's/^Lowest address  = 0000\([0-9]*\).*$/\1/p' <hellosdc.bin.log ) ; \
RUNADDR=$( sed -n 's/^ *0000\([0-9A-F]*\) *cpc_run_address  *.*$/\1/p' <hellosdc.map ) ; \
if [[ -z "$RUNADDR" ]] ; then \
RUNADDR=$( sed -n 's/^ *0000\([0-9A-F]*\) *init  *.*$/\1/p' <hellosdc.map ) ; \
fi ; \
if [[ -z "$RUNADDR" ]] ; then \
RUNADDR=$( sed -n 's/^ *0000\([0-9A-F]*\) *_main  *.*$/\1/p' <hellosdc.map ) ; \
fi ; \
if [[ -z "$RUNADDR" ]] ; then \
echo "Cannot figure out run address. Aborting." ; exit 1 ; \
fi ; \
. ..//tool/addhead/build_config.inc ; \
addhead -a -t "binary" "hellosdc.bin" "hellosdc.binamsdos" -x '&'${RUNADDR} -s '&'${LOADADDR} | tee "hellosdc.binamsdos.log" ; \
)
 sed -n 's/^Lowest address  = 0000\([0-9]*\).*$/\1/p' <hellosdc.bin.log
++ sed -n 's/^Lowest address  = 0000\([0-9]*\).*$/\1/p'
+ LOADADDR=
 sed -n 's/^ *0000\([0-9A-F]*\) *cpc_run_address  *.*$/\1/p' <hellosdc.map
++ sed -n 's/^ *0000\([0-9A-F]*\) *cpc_run_address  *.*$/\1/p'
+ RUNADDR=
+ [[ -z '' ]]
 sed -n 's/^ *0000\([0-9A-F]*\) *init  *.*$/\1/p' <hellosdc.map
++ sed -n 's/^ *0000\([0-9A-F]*\) *init  *.*$/\1/p'
+ RUNADDR=
+ [[ -z '' ]]
 sed -n 's/^ *0000\([0-9A-F]*\) *_main  *.*$/\1/p' <hellosdc.map
++ sed -n 's/^ *0000\([0-9A-F]*\) *_main  *.*$/\1/p'
+ RUNADDR=4000
+ [[ -z 4000 ]]
+ . ..//tool/addhead/build_config.inc
# with bash do "source" this file.
export PATH="${PATH}:/home/ronaldo/cpc-dev-tool-chain/tool/addhead/addhead"
++ export PATH=/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/home/ronaldo/cpc-dev-tool-chain/tool/addhead/addhead
++ PATH=/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/home/ronaldo/cpc-dev-tool-chain/tool/addhead/addhead
+ addhead -a -t binary hellosdc.bin hellosdc.binamsdos -x '&4000' -s '&'
+ tee hellosdc.binamsdos.log
User defined type as "binary"
User defined execution address as 16384 (&4000)
User defined start address as 0 (&0000)
Failed to open input file
( export LC_ALL=C ; make -C "..//tool/cpcxfs" ; )
make[1]: Entering directory '/home/ronaldo/cpc-dev-tool-chain/tool/cpcxfs'
PRODUCT_NAME = cpcxfs
EXTRACT_DIR_NAME = cpcxfs
PATCHNAME = cpcxfs_build_patch.patch
ARCHIVE_NAME = cpcxfs.zip
BUILD_TARGET_FILE = cpcxfs/src/cpcxfs
BUILD_DIR = cpcxfs/src
TARGETS = build_config.inc
URL_RELEASE = http://cpctech.cpc-live.com/download/cpcxfs.zip
************************************************************************
**************** Configuring and build in: cpcxfs/.patched
************************************************************************
( set -e ; cd cpcxfs/src ;_ALL=C make --print-directory -f makefile.lnx ; )
make[2]: Entering directory '/home/ronaldo/cpc-dev-tool-chain/tool/cpcxfs/cpcxfs/src'
gcc -Wall -O3 -DLINUX=1 -DDOS=0 match.o tools.o fs.o ui.o cpcfs.o readdef.o unix.o -o cpcxfs  -ltermcap
/usr/lib/gcc/i686-pc-cygwin/4.9.2/../../../../i686-pc-cygwin/bin/ld: cannot find -ltermcap
collect2: error: ld returned 1 exit status
makefile.lnx:58: recipe for target 'cpcxfs' failed
make[2]: *** [cpcxfs] Error 1
make[2]: Leaving directory '/home/ronaldo/cpc-dev-tool-chain/tool/cpcxfs/cpcxfs/src'
Makefile:76: recipe for target 'cpcxfs/src/cpcxfs' failed
make[1]: *** [cpcxfs/src/cpcxfs] Error 1
make[1]: Leaving directory '/home/ronaldo/cpc-dev-tool-chain/tool/cpcxfs'
..//sdcc-project.Makefile:176: fallo en las instrucciones para el objetivo '..//tool/cpcxfs/build_config.inc'
make: *** [..//tool/cpcxfs/build_config.inc] Error 2

It won't link against libtermcap as it does not exist in cygwin at all. Cygwin developers say that new applications should use terminfo, as libtermcap is deprecated. To solve this issue, I've changed LDARGS in /tool/cpcxfs/cpcxfs/src/makefile.lnx to use -lncurses instead of -ltermcap:

ifdef LINUX_VER
LDARGS += -lncurses
#LDARGS += -ltermcap
#LDARGS += -lreadline -lhistory -ltermcap
endif

With this last change, I've finally got it compiled. However, I've had to solve 2 more issues before having a working dsk. These two issues are Win/Linux executable problems: paths are not enough for executing the previously built Windows executables, as Cygwin gets confused with Linux and Windows .exes. The affected executables are hex2bin/hex2bin.exe and cpcxfs/cpcxfs.exe:

+ cpcxfs -f -nd hellosdc.dsk.tmp -b -p hellosdc.binamsdos
/bin/bash: línea 2: /home/ronaldo/cpc-dev-tool-chain/tool/cpcxfs/cpcxfs/src/cpcxfs: cannot execute binary file: Exec format error
..//sdcc-project.Makefile:223: fallo en las instrucciones para el objetivo 'hellosdc.dsk'
make: *** [hellosdc.dsk] Error 126

And the solution is easy. Renaming linux executables and moving .exes to the correct path

$ mv tool/cpcxfs/cpcxfs/src/cpcxfs tool/cpcxfs/cpcxfs/src/cpcxfs.linux
$ mv tool/hex2bin/Hex2bin-1.0.10/hex2bin tool/hex2bin/Hex2bin-1.0.10/hex2bin.linux
$ mv tool/hex2bin/Hex2bin-1.0.10/Windows/hex2bin.exe tool/hex2bin/Hex2bin-1.0.10/

After all these steps, I managed to get a functional DSK with a working HELLOSDC.BIN.

Sorry for the lost time with just a software version issue.

Conclusions:

cpcitor commented 9 years ago

Le 24/02/2015 11:39, Francisco Gallego a écrit :

It won't link against libtermcap as it does not exist in cygwin at all. Cygwin developers say that new applications should use terminfo, as libtermcap is deprecated. To solve this issue, I've changed LDARGS in /tool/cpcxfs/cpcxfs/src/makefile.lnx to use -lncurses instead of -ltermcap: ifdef LINUX_VER LDARGS += -lncurses

LDARGS += -ltermcap

LDARGS += -lreadline -lhistory -ltermcap

endif

Published as https://github.com/cpcitor/cpc-dev-tool-chain/commit/5b2731466a2e1aed8eee5e46219bb6c186ec92dd

With this last change, I've finally got it compiled. However, I've had to solve 2 more issues before having a working dsk. These two issues are Win/Linux executable problems: paths are not enough for executing the previously built Windows executables, as Cygwin gets confused with Linux and Windows .exes.

On first reading your report I did not understand but I noticed it because on my current distribution (Ubuntu 14.04 AMD64) the precompiled i386 binary would not run (for lack of i386 support libraries). So I changed the makefile to just move it away.

https://github.com/cpcitor/cpc-dev-tool-chain/commit/1c973805a882104f2e91e81822bc9af16f671fa0

The affected executables are hex2bin/hex2bin.exe and cpcxfs/cpcxfs.exe:

Same problem, cpcxfs should be okay since https://github.com/cpcitor/cpc-dev-tool-chain/commit/67391ebe0340dac416bd0c1b65481e9850dd9ef1

cpcitor commented 9 years ago

As you saw, the Linux instructions give command lines to copy-paste and install what's needed quickly. But the Windows instructions ask to manually install packages through clicking.

It looks like we can simplify/accelerate the cygwin setup by using a command line. The setup instructions would just say "install cygwin, run a shell" and from that shell a command line would install all needed dependencies quickly. It looks like there are hints on http://stackoverflow.com/a/14986916

Next time there's an opportunity, can you test something like:

setup-x86.exe -q -P git,make,patch,gcc,gcc-core,gcc-g++,wget,bison,flex,libboost-devel,unrar,libncurses-devel,ioperm

and see if it works ? That would be a time saver and facilitate adoption for Windows users. What do you think ?

lronaldo commented 9 years ago

As I suspected, this command

setup-x86.exe -q -P git,make,patch,gcc,gcc-core,gcc-g++,wget,bison,flex,libboost-devel,unrar,libncurses-devel,ioperm

works only if you put setup-x86.exe manually in the path (under bin/ or usr/bin/ cywgin folders). It could be problematic putting this into a script if we have to ask the user about putting setup-x86.exe in a specific folder. Other way to do it is to check if setup-x86.exe does indeed exist or not (before using it) and then proceeding to download it, if it does not exist. The potential problem would be a 64bit cygwin instalation downloading this 32bit setup-x86.exe.

Taking everything into account, a script could be created to automate these tasks, but with care.

cpcitor commented 9 years ago

As I suspected, this command works only if you put setup-x86.exe manually in the path

Thank you for testing. So, provided the executable is found it works, doesn't it ?

Look at how they document call to it in e.g. http://cygwinports.org/ . We may expect a programmer to manually adjust the path (or perhaps drag-and-drop the exe icon into a Windows or Cygwin terminal window, does it work ?).

Taking everything into account, a script could be created to automate these tasks, but with care.

So far I consider this prerequisite part is too system-dependent to be fully automated. The existing instructions (for Debian and derivatives like Ubuntu) are meant for copy-paste anyway. Any step in that direction is good to take, still.

Feel free to offer improvements (e.g. pull request) to https://github.com/cpcitor/cpc-dev-tool-chain/blob/master/documentation/how_to_install.md

lronaldo commented 9 years ago

Thank you for testing. So, provided the executable is found it works, doesn't it ?

Yes, precisely.

I was going to code the script, but there is another problem. I was thinking of downloading setup-x86.exe as a first step in the script, but then I remembered that wget is not included by default with cygwin. So, the user has to manually install wget anyway. Therefore, there is almost no point in automating the rest of the process, as the user could install everything needed the same moment of installing wget.

Any other idea for automatically downloading setup-x86.exe without using wget? Other ideas include a script that asks the user for manually copying setup-x86.exe if it is not detected. What do you think about it?

cpcitor commented 9 years ago

If we really want to download the cygwin installer via scripting, one might consider http://superuser.com/questions/25538/how-to-download-files-from-command-line-in-windows-like-wget-is-doing (expecially the powershell option). But in the case the user already has cygwin, this is overkill. And we should not search the hard drive for it (except maybe look in standard location).

Isn't it simpler to ask the user "install package x, y and z, for example by copy-pasting the following command line, adjusting the path, ..." ? Then needed packages are installed and the rest of the installation can process automatically.

lronaldo commented 9 years ago

sn't it simpler to ask the user "install package x, y and z, for example by copy-pasting the following command line, adjusting the path, ..." ? Then needed packages are installed and the rest of the installation can process automatically.

Yes, it is. But it only works if you already have setup-x86.exe in a folder added to path. So, I think it continues to be easier to ask users to manually install packages when they install cygwin.

cpcitor commented 9 years ago

I have pushed a branch with instructions for Cygwin. Look for "drag-n-drop trick allows to get everything working quickly. See step-by-step instructions for Windows." https://github.com/cpcitor/cpc-dev-tool-chain/blob/cygwin_install_instructions/documentation/how_to_install.md#windows Cheers!

lronaldo commented 9 years ago

It works perfectly (tested on Win7)

Two things: there is no need to use Windows/cmd, it is possible to use Cygwin command line directly. The "drag-n-drop trick" also works on it, and has a much Linux-like, beautiful feeling :).

I am retesting makefiles and trying to create an installation video.

lronaldo commented 9 years ago

I don't know why, but compiling SDCC sometimes gives several errors that have to be patched. It sometimes happens on Arch, sometimes on Cygwin, but they do not happen always. It's quite bizarre. I am refering to this error:

/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd -I. -I/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd -I/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd/../include  -DHAVE_asxxxx_vec  -DBINDIR='"/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0.installtree/bin"'  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT opncls.lo -MD -MP -MF .deps/opncls.Tpo -c -o opncls.lo /home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd/opncls.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd -I. -I/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd -I/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd/../include -DHAVE_asxxxx_vec -DBINDIR=\"/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0.installtree/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT opncls.lo -MD -MP -MF .deps/opncls.Tpo -c /home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd/opncls.c -o opncls.o
In file included from /home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd/opncls.c:26:0:
/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd/opncls.c: In function 'bfd_fopen':
./bfd.h:529:65: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 #define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
                                                                 ^
/home/Poker/cpc-dev-tool-chain/tool/sdcc/sdcc-3.4.0/support/sdbinutils/bfd/opncls.c:261:5: note: in expansion of macro 'bfd_set_cacheable'
     bfd_set_cacheable (nbfd, TRUE);
     ^
cc1: all warnings being treated as errors
Makefile:1312: recipe for target 'opncls.lo' failed

This error affects two macros (when patching this first error message, we get the second one), but it is quite easy to get patched, just by doing this:

304c304
< #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
---
> #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE))
529c529
< #define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
---
> #define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool))

As the ", TRUE" has no sense at all in the place where macros get expanded. Maybe we should consider submitting it to SDCC developers.

Once these files are fixed, SDCC compiles and works perfectly. Also does Hex2bin. After adding unzip to package requirements, cpcxfs also compiles and works. 2cdt works after some fixes to paths in the Makefile (it failed either on Win7/Cygwin or on Linux/Manjaro).

cpcitor commented 9 years ago

Hello,

It's interesting that you seem to often reproduce things on two platforms!

Never seen the SDCC issue. ", TRUE" (http://en.wikipedia.org/wiki/Comma_operator) probably makes sense in some contexts, though it seems right that the compiler complains.

The 2cdt issue is strange. The path is correct on Ubuntu 14.04.

Perhaps we should stop discussing on this closed issue on which I set a too broad topic.

Let's make separate issues from now on. I see these topics: instructions, SDCC oddity, 2cdt path. To me:

Regards.