Help Compiling TOS 2.06/2.08/3.06 in any language

GFA, ASM, STOS, ...

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
Arne
Captain Atari
Captain Atari
Posts: 397
Joined: Thu Nov 01, 2007 10:01 am

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby Arne » Sat Mar 11, 2017 12:31 pm

I changed glue\makefile to

Code: Select all

top_srcdir=..
subdir=glue

include $(top_srcdir)\Makefile.com
include $(top_srcdir)\Makefile.sil

IMG = tos$(TOSVERSION)$(COUNTRY).img

all: $(IMG)

include $(top_srcdir)\config.mak
-include $(top_srcdir)\common\sections.mak

include SRCFILES

STARTUP = startup.o

LIBS = ..\bios\bios.a ..\vdi\vdi.a ..\bdos\bdos.a ..\aes\aes.a ..\desk\desk.a
LIBSNDX = ..\bios\bios.ndx ..\vdi\vdi.ndx ..\bdos\bdos.ndx ..\aes\aes.ndx ..\desk\desk.ndx
OBJS = $(STARTUP) $(BIOS_OBJS) $(VDI_OBJS) $(BDOS_OBJS) $(AES_OBJS) $(DESK_OBJS)

ROMSIZE_206 = 256k
# use 257 for ST-book, since mkrom can't distinguish it from 2.06
ROMSIZE_208 = 257k
ROMSIZE_306 = 512k

ROMSIZE = $(ROMSIZE_$(TOSVERSION))

$(IMG): tos.img
   $(MKROM) pad $(ROMSIZE) $< $@

tos.img: $(STARTUP) $(LIBS) tosrsc$(COUNTRY).o vars.o
   $(LD) -o $@ $(SYMBOLS) -a $(rombase) x 0 $(STARTUP) -x ..\bios\bios.a -x ..\vdi\vdi.a -x ..\bdos\bdos.a -x ..\aes\aes.a -x ..\desk\desk.a tosrsc$(COUNTRY).o vars.o

..\bios\bios.ndx: ..\bios\bios.a
   $(RANLIB) $<

..\vdi\vdi.ndx: ..\vdi\vdi.a
   $(RANLIB) $<

..\bdos\bdos.ndx: ..\bdos\bdos.a
   $(RANLIB) $<

..\aes\aes.ndx: ..\aes\aes.a
   $(RANLIB) $<

..\desk\desk.ndx: ..\desk\desk.a
   $(RANLIB) $<

startup.o: startup.S
   $(AM_V_AS)${BIN}cp68${EXEEXT} ${CPPFLAGS} -P $< $*.i
   $(AM_V_at)${BIN}as68${EXEEXT} ${ASFLAGS} ${$*_ASFLAGS} $*.i $@
   $(AM_V_at)${RM} $*.i
   
vdivar.o: ..\vdi\vdivar.S
   $(AM_V_AS)${BIN}cp68${EXEEXT} ${CPPFLAGS} -P $< $*.i
   $(AM_V_at)${BIN}as68${EXEEXT} ${ASFLAGS} ${$*_ASFLAGS} $*.i $@
   $(AM_V_at)${RM} $*.i
   
vars.o: ..\common\vars.S $(top_srcdir)\common\config.h
   $(AM_V_AS)${BIN}cp68${EXEEXT} ${CPPFLAGS} -P $< $*.i
   $(AM_V_at)${BIN}as68${EXEEXT} ${ASFLAGS} ${$*_ASFLAGS} $*.i $@
   $(AM_V_at)${RM} $*.i

tosrsc$(COUNTRY).o: tosrsc$(COUNTRY).c

tosrsc$(COUNTRY).c: glue.$(COUNTRY)
   $(AM_V_GEN)$(MKBININC) glue.$(COUNTRY) tosrsc $@

glue.us: ..\aes\rsc\$(TOSVERSION)\gemus.rsc ..\desk\rsc\$(TOSVERSION)\deskus.rsc ..\desk\rsc\$(TOSVERSION)\deskus.inf
   $(AM_V_GEN)$(MKGLUE) us $(TOSVERSION)

glue.de: ..\aes\rsc\$(TOSVERSION)\gemde.rsc ..\desk\rsc\$(TOSVERSION)\deskde.rsc ..\desk\rsc\$(TOSVERSION)\deskde.inf
   $(AM_V_GEN)$(MKGLUE) de $(TOSVERSION)

glue.fr: ..\aes\rsc\$(TOSVERSION)\gemfr.rsc ..\desk\rsc\$(TOSVERSION)\deskfr.rsc ..\desk\rsc\$(TOSVERSION)\deskfr.inf
   $(AM_V_GEN)$(MKGLUE) fr $(TOSVERSION)

glue.uk: ..\aes\rsc\$(TOSVERSION)\gemuk.rsc ..\desk\rsc\$(TOSVERSION)\deskuk.rsc ..\desk\rsc\$(TOSVERSION)\deskuk.inf
   $(AM_V_GEN)$(MKGLUE) uk $(TOSVERSION)

glue.es: ..\aes\rsc\$(TOSVERSION)\gemes.rsc ..\desk\rsc\$(TOSVERSION)\deskes.rsc ..\desk\rsc\$(TOSVERSION)\deskes.inf
   $(AM_V_GEN)$(MKGLUE) es $(TOSVERSION)

glue.it: ..\aes\rsc\$(TOSVERSION)\gemit.rsc ..\desk\rsc\$(TOSVERSION)\deskit.rsc ..\desk\rsc\$(TOSVERSION)\deskit.inf
   $(AM_V_GEN)$(MKGLUE) it $(TOSVERSION)

glue.sv: ..\aes\rsc\$(TOSVERSION)\gemsv.rsc ..\desk\rsc\$(TOSVERSION)\desksv.rsc ..\desk\rsc\$(TOSVERSION)\desksv.inf
   $(AM_V_GEN)$(MKGLUE) sv $(TOSVERSION)

glue.sf: ..\aes\rsc\$(TOSVERSION)\gemsf.rsc ..\desk\rsc\$(TOSVERSION)\desksf.rsc ..\desk\rsc\$(TOSVERSION)\desksf.inf
   $(AM_V_GEN)$(MKGLUE) sf $(TOSVERSION)

glue.sg: ..\aes\rsc\$(TOSVERSION)\gemsg.rsc ..\desk\rsc\$(TOSVERSION)\desksg.rsc ..\desk\rsc\$(TOSVERSION)\desksg.inf
   $(AM_V_GEN)$(MKGLUE) sg $(TOSVERSION)

glue.tr: ..\aes\rsc\$(TOSVERSION)\gemtr.rsc ..\desk\rsc\$(TOSVERSION)\desktr.rsc ..\desk\rsc\$(TOSVERSION)\desktr.inf
   $(AM_V_GEN)$(MKGLUE) tr $(TOSVERSION)

glue.fi: ..\aes\rsc\$(TOSVERSION)\gemfi.rsc ..\desk\rsc\$(TOSVERSION)\deskfi.rsc ..\desk\rsc\$(TOSVERSION)\deskfi.inf
   $(AM_V_GEN)$(MKGLUE) fi $(TOSVERSION)

glue.no: ..\aes\rsc\$(TOSVERSION)\gemno.rsc ..\desk\rsc\$(TOSVERSION)\deskno.rsc ..\desk\rsc\$(TOSVERSION)\deskno.inf
   $(AM_V_GEN)$(MKGLUE) no $(TOSVERSION)

glue.dk: ..\aes\rsc\$(TOSVERSION)\gemdk.rsc ..\desk\rsc\$(TOSVERSION)\deskdk.rsc ..\desk\rsc\$(TOSVERSION)\deskdk.inf
   $(AM_V_GEN)$(MKGLUE) dk $(TOSVERSION)

glue.pl: ..\aes\rsc\$(TOSVERSION)\gempl.rsc ..\desk\rsc\$(TOSVERSION)\deskpl.rsc ..\desk\rsc\$(TOSVERSION)\deskpl.inf
   $(AM_V_GEN)$(MKGLUE) pl $(TOSVERSION)

glue.gr: ..\aes\rsc\$(TOSVERSION)\gemgr.rsc ..\desk\rsc\$(TOSVERSION)\deskgr.rsc ..\desk\rsc\$(TOSVERSION)\deskgr.inf
   $(AM_V_GEN)$(MKGLUE) gr $(TOSVERSION)

glue.ru: ..\aes\rsc\$(TOSVERSION)\gemru.rsc ..\desk\rsc\$(TOSVERSION)\deskru.rsc ..\desk\rsc\$(TOSVERSION)\deskru.inf
   $(AM_V_GEN)$(MKGLUE) ru $(TOSVERSION)

check::
   $(CMP) $(CMPL) -x --ignore-initial=0x0:0x0 --offsets=0x$(rombase):0 $(top_srcdir)\roms\tos$(TOSVERSION)$(COUNTRY).img $(IMG)

clean:
   $(RM) *.o *.i $(IMG) tos.img art00336 tosrsc*.c glue.* $(top_srcdir)\common\config.h

distclean: clean
   $(RM) $(top_srcdir)\common\sections.mak *.img


Now I get further but it hangs with this error:
Image
Image

ThorstenOtto
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Sun Aug 03, 2014 5:54 pm

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby ThorstenOtto » Sun Mar 12, 2017 2:32 pm

Arne wrote:Now I get further but it hangs with this error:


It's a bit difficult to check that Makefile with all the changes to the pathnames ;)

Anyway, i have now fixed several more bugs, mainly in the c-library. As a result, all the tools in the toplevel bin directory should now be able to accept pathnames with / or \ transparently (with the exception of aln.ttp, which i did'nt recompile yet). I also tested it now on a drive-image mounted as bios-device rather than using the hosts filesystem, so i think there should no problem with that anymore. Filenames which didn't fit into 8.3 format where also renamed (with the exepction of those GNUmakefiles; i'm currently thinking of omitting them from the archive, because they are most likely not useful for everybody).

You will find the updated archive at
http://www.tho-otto.de/download/tos306de.tar.bz2
Last edited by ThorstenOtto on Sun Mar 12, 2017 4:20 pm, edited 1 time in total.

User avatar
Arne
Captain Atari
Captain Atari
Posts: 397
Joined: Thu Nov 01, 2007 10:01 am

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby Arne » Sun Mar 12, 2017 3:47 pm

ThorstenOtto wrote:You will find the updated archive at
http://www.tho-otto.de/downloads/tos306de.tar.bz2


Sure? :angel:
Image

ThorstenOtto
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Sun Aug 03, 2014 5:54 pm

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby ThorstenOtto » Sun Mar 12, 2017 4:20 pm

Arne wrote:Sure? :angel:


args sry, link corrected.

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby troed » Sun Mar 12, 2017 4:41 pm

With the new archive my steps to reproduce an identical 3.06 DE build became (starting from scratch):

1) Unpack archive in your GEMDOS Hatari root, launch Hatari
2) Install and launch Mupfel
3) Type PATH="\tos306de\bin" - important, backslash, not slash
4) cd tos306de
5) make

... that's all. Everything's included in the archive now.

User avatar
Arne
Captain Atari
Captain Atari
Posts: 397
Joined: Thu Nov 01, 2007 10:01 am

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby Arne » Sun Mar 12, 2017 6:07 pm

It's getting worse :(
You still use / in the makefiles. This is rejected on a real Atari.
Image

ThorstenOtto
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Sun Aug 03, 2014 5:54 pm

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby ThorstenOtto » Sun Mar 12, 2017 7:08 pm

Arne wrote:It's getting worse :(
You still use / in the makefiles. This is rejected on a real Atari.


You didn't read my post ;)

Yes, they are used in the makefiles. Because normally a backslash in makefile syntax would escape the next char. But all the tools convert a slash to a backslash before calling any file related functions like Fopen, so the OS will never see them. If it does, then its a bug and i missed a function call, but thats unlikely, since i tried it on a image, where the emulator does no such translation.

joska
Hardware Guru
Hardware Guru
Posts: 3574
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby joska » Sun Mar 12, 2017 7:16 pm

ThorstenOtto wrote:args sry, link corrected.


Are you sure? I'm not able to download anything, I'm redirected to http://www.tho-otto.de/downloads/.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
Arne
Captain Atari
Captain Atari
Posts: 397
Joined: Thu Nov 01, 2007 10:01 am

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby Arne » Sun Mar 12, 2017 7:20 pm

IMG_0682.JPG


joska wrote:Are you sure? I'm not able to download anything, I'm redirected to http://www.tho-otto.de/downloads/.

Link works with me. :shrug:
You do not have the required permissions to view the files attached to this post.
Image

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby troed » Sun Mar 12, 2017 7:26 pm

Arne wrote:IMG_0682.JPG

joska wrote:Are you sure? I'm not able to download anything, I'm redirected to http://www.tho-otto.de/downloads/.

Link works with me. :shrug:


Your path picks up a different make binary? (Assuming Thorsten means he patched the one in the archive)

User avatar
Arne
Captain Atari
Captain Atari
Posts: 397
Joined: Thu Nov 01, 2007 10:01 am

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby Arne » Sun Mar 12, 2017 7:32 pm

troed wrote:Your path picks up a different make binary?

This sounds like an option. And indeed there is a MAKE.TTP in d:\gemini2\bin. I rename that to MAKE_ and still get the same results.
Your turn.
Image

joska
Hardware Guru
Hardware Guru
Posts: 3574
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby joska » Sun Mar 12, 2017 7:37 pm

Arne wrote:Link works with me. :shrug:


Code: Select all

wget http://www.tho-otto.de/downloads/tos306de.tar.bz2


...downloads this:

Code: Select all

<HTML>

<HEAD>
<TITLE>Homepage Thorsten Otto - Downloads</TITLE>
   <META NAME="KeyWords" CONTENT="ORCS, CAT, GC, PBEM, PBM, GC-Ork, GCORK, ARAnyM, UDO">
</HEAD>

<!-- --><BODY background="images/bg_stars.jpg" text="#0000FF" link="#8000FF" vlink="#8000FF" alink="#8000FF"><!-- -->

<HR>
<H1>ORCS</H1>
<HR>

<!----------------------------------------------------------------------------------->

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>Atari Versionen f&uuml;r TOS/MiNT/MagiC</B>

<menu type=none>

<li>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/orcs214.zip" type="application/x-compressed">ORCS 2.14</A></B>
</li>
<li>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/orcs213.zip" type="application/x-compressed">ORCS 2.13</A></B>
</li>
</menu>

<!----------------------------------------------------------------------------------->

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>Windows</B>

<menu type=none>

<li>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/orcs-2.14-win32.zip" type="application/x-compressed">ORCS 2.14</A></B>
</li>
<li>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/orcs-2.13-win32.zip" type="application/x-compressed">ORCS 2.13</A></B>
</li>
</menu>

<!----------------------------------------------------------------------------------->

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>Unix</B>

<menu type=none>
<p>
soon to come...
</P>

</menu>


<!----------------------------------------------------------------------------------->

<HR>
<H1>UDO</H1>
<HR>

My private version of <a href="http://www.udo-open-source.org/" alt="UDO">UDO</a>.
Documentation will follow soon, but major enhancements are:
<ul>
<li>Structure depth exceeded to 9 levels</li>
<li>No limits anymore to number of nodes, indices, hyphen patterns etc.</li>
<li>Auto-referencer about 30 times!! faster now.</li>
<li>Lots of fixes for non-HTML formats that were messed up in 7.01 to 7.04.</li>
</ul>

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>Atari Versionen f&uuml;r TOS/MiNT/MagiC</B>
<menu type=none>
<li>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/udo712.zip" type="application/x-compressed">UDO 7.12</A></B>
</li>
</menu>

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>Windows</B>
<menu type=none>
<li>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/udo-7.12-win32.zip" type="application/x-compressed">UDO 7.12</A> (x86 32-bit)</B>
</li>
</menu>

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>Unix</B>
<menu type=none>
<p>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/udo-7.12-linux.tar.bz2" type="application/x-compressed">UDO 7.12</A> (x86 64-bit, requires glibc >= 2.6.4)</B>
</P>
</menu>

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>MacOSX</B>
<menu type=none>
<p>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/udo-7.12-macosx.tar.bz2" type="application/x-compressed">UDO 7.12</A> (x86 64-bit)</B>
</P>
</menu>

<!----------------------------------------------------------------------------------->

<HR>
<H1>HCP</H1>
<HR>

A beta version of hcp (hypertext compiler). Use at your own risk.

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>Linux</B>
<menu type=none>
<p>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/hcp-0.9.9-linux.tar.bz2" type="application/x-compressed">hcp 0.9.9</A> (x86 64-bit, requires glibc >= 2.6.4)</B>
</P>
</menu>

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>Windows</B>
<menu type=none>
<li>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/hcp-0.9.9-win32.zip" type="application/x-compressed">hcp 0.9.9</A> (x86 32-bit)</B>
</li>
</menu>

<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B>Atari Versionen f&uuml;r TOS/MiNT/MagiC</B>
<menu type=none>
<li>
<P><IMG SRC="images/redball.gif" HEIGHT=21 WIDTH=21>
<B><A HREF="download/hcp099.zip" type="application/x-compressed">hcp 0.9.9</A></B>
</li>
</menu>

<!----------------------------------------------------------------------------------->

<p>
&nbsp;
<p>

<center>
<p>
<a href="index.html"> <img src="images/home1.gif" width=180 height=60 border=0></a>
</p>
</center>


</BODY>
</HTML>
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby troed » Sun Mar 12, 2017 7:45 pm

joska wrote:
Arne wrote:Link works with me. :shrug:


Code: Select all

wget http://www.tho-otto.de/downloads/tos306de.tar.bz2


The corrected link is to download, not downloads.

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby troed » Sun Mar 12, 2017 7:48 pm

Arne wrote:
troed wrote:Your path picks up a different make binary?

This sounds like an option. And indeed there is a MAKE.TTP in d:\gemini2\bin. I rename that to MAKE_ and still get the same results.
Your turn.


Verified. I took the files from my Hatari GEMDOS-drive and moved over to my STE. Launching the same Mupfel, the same tos306bin catalogue and tried to run the same make.

I get the same error as you.

edit: This also happens if I use the included command.tos as shell instead of Mupfel

/Troed

joska
Hardware Guru
Hardware Guru
Posts: 3574
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby joska » Sun Mar 12, 2017 10:02 pm

troed wrote:The corrected link is to download, not downloads.


Thanks, "download" worked. The URL in Thorsten's post still say "downloads" here though.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

joska
Hardware Guru
Hardware Guru
Posts: 3574
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby joska » Sun Mar 12, 2017 10:05 pm

It appears to be building here on my Milan060. Gemini under single-TOS. Unpacked the archive to d:\

Code: Select all

cd d:\tos306de
setenv PATH \tos306de\bin
make
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

ThorstenOtto
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Sun Aug 03, 2014 5:54 pm

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby ThorstenOtto » Sun Mar 12, 2017 10:19 pm

joska wrote:Thanks, "download" worked. The URL in Thorsten's post still say "downloads" here though.


I edited my post, and that should be correct now. Maybe you picked it up from some of the quotes? Anyway sry for the typo.

arne wrote:make: can't open ./Makefile.cmn near line 3.


Damn. Looks like the archive still did contain the old version of make.ttp, dunno how that happened. I've uploaded it again, still the same link.

joska
Hardware Guru
Hardware Guru
Posts: 3574
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby joska » Sun Mar 12, 2017 10:23 pm

joska wrote:It appears to be building here on my Milan060.


Everything seemed to work, but I got error messages from ar68. "ar68: can't create vdi.a/bdos.a/aes.a etc". So while everything compiled, I did not get a TOS image.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

ThorstenOtto
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Sun Aug 03, 2014 5:54 pm

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby ThorstenOtto » Sun Mar 12, 2017 11:15 pm

joska wrote:Everything seemed to work, but I got error messages from ar68. "ar68: can't create vdi.a/bdos.a/aes.a etc". So while everything compiled, I did not get a TOS image.


Hm that looks strange. Is there some more text after the error? There should at least be something like "archive left in arXXXXXX" where arXXXXXX is a temporary filename. If you feel adventurous, you can take a look at alcyon/util/ar.c ;)

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby troed » Mon Mar 13, 2017 8:56 am

With the new MAKE.TTP I can compile, with the included command.tos shell, on target. For some reason Mupfel aborts with "make: sh: command not found" (if I remember correctly) and I didn't dig deeper into why.

Whether it works will take "some time" to conclude. It's building on a non-accelerated STE with Unicorn USB-flashmemory as harddrive ... I was too lazy to even connect the Mega STE instead unfortunately :/

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby troed » Mon Mar 13, 2017 9:22 am

ThorstenOtto wrote:
joska wrote:Everything seemed to work, but I got error messages from ar68. "ar68: can't create vdi.a/bdos.a/aes.a etc". So while everything compiled, I did not get a TOS image.


Hm that looks strange. Is there some more text after the error? There should at least be something like "archive left in arXXXXXX" where arXXXXXX is a temporary filename. If you feel adventurous, you can take a look at alcyon/util/ar.c ;)


While my STE is still compiling I can see that yes, this happens here as well. vdi.a cannot be created, archive left in arXXXXXXX.

/Troed

(Sorry for shooting the photo at the exact time it scrolled one line .. )

build.jpg


edit: Looking in ar.c it's apparently this fopen that fails:

Code: Select all

      if ((arfp = fopen(arname, "wb")) == NULL)
      {
         fprintf(stderr, _("%s: can't create %s\narchive left in %s\n"), program_name, arname, tempname);
         tempname = NULL;            /* keeps endit from removing the archive */
         endit();
      }


edit2: an observation is that vdi.a already exists, created two minutes before (in my case) the tempname-archive. this _should_ only mean it's truncated and reused though.
You do not have the required permissions to view the files attached to this post.

ThorstenOtto
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Sun Aug 03, 2014 5:54 pm

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby ThorstenOtto » Mon Mar 13, 2017 2:14 pm

troed wrote:edit2: an observation is that vdi.a already exists, created two minutes before (in my case) the tempname-archive. this _should_ only mean it's truncated and reused though.


That should not be a problem, it's removed before being created by the Makefile. After that ar68 is invoked several times however, because of the command length limit. In that case ar works by copying the old archive to a tmp file, appending the new objects, then at the end copy the tmp file back. I just noticed though that the old archive is still open while doing so, maybe that is causing problems. If you want you can try to apply:

Code: Select all

--- a/alcyon/util/ar.c
+++ b/alcyon/util/ar.c
@@ -853,6 +853,11 @@ PP(char **argv;)
        }
        cleanup();
 #else
+       if (arfp != NULL)
+       {
+               fclose(arfp);
+               arfp = NULL;
+       }
        if (tflg || pflg)
                cleanup();
        tmp2ar();


Then cd to alcyon/util, type make and copy ar68.ttp to your bin directory. Or just wait for next version ;)

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby troed » Mon Mar 13, 2017 2:39 pm

ThorstenOtto wrote: I just noticed though that the old archive is still open while doing so, maybe that is causing problems.


While my STE is still linking, that seems to have done the trick ;) I no longer get any error message from the multiple instantiations of ar68.ttp working on the same .a.

(I had to apply the patch manually, our line numbering differed)

Hopefully I'll soon post again about having built a working image on target hardware ..

/Troed

ThorstenOtto
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Sun Aug 03, 2014 5:54 pm

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby ThorstenOtto » Mon Mar 13, 2017 3:10 pm

[quote="troed"that seems to have done the trick ;)[/quote]

Nice :) And also a bit surprising, i'm quite sure that older TOS versions had severe problems with opening the same file twice, i wonder that this bug has not already been discovered in the old days.

I had to apply the patch manually, our line numbering differed)


Thats possible. I added some error output first, attempting to print out the errno message, until i realized that errno was not set most the time...

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Help Compiling TOS 2.06/2.08/3.06 in any language

Postby troed » Mon Mar 13, 2017 3:39 pm

troed wrote:Hopefully I'll soon post again about having built a working image on target hardware ..


Success!

My STE has now built an identical TOS 3.06 DE image from scratch as previously done with Hatari and verified against Atari's original. I used COMMAND.TOS as included in the archive. Set the PATH (or if you use \tos then it's auto-set by the shell config) and make. That's all.

(With a new ar68.ttp with the final patch, of course)

Again, many thanks for all your work Thorsten :)

/Troed


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 2 guests