That depends on your setup of FreeDOS, I've used virtual drives and needed a mounting.
I guess that you have a setup where FreeDOS "mounts" a directory from your host as "drive", is this the case?
But to your issue: I guess that devel2/bin is in your PATH on the Linux side and potentially contains shell binaries like "sh" or "bash", or "make" - in this case I'd suggest to at leat temporary move them from there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You use it exactly like you did - and check that there's no shell/make in its devel2 subdirectory (at least for the purpose of setting up the cross compilation).
What you do should be relative easy, maybe you can get in contact with someone that has experience with cross-compiling and/or djgpp to help you with this special setup of yours?
If nothing helps we may could setup a remote session (Simon doing, whomever looking) but that would be more effort for me so we'd need to find an agreement based on a 30 minute rate (in EUR or USD). If you need that and want to go this route contact me via mail (found in the changelogs) or "send message".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Simon, I don't have enough money to hire your services... I've been working with computers since 1993 and I know a lot about ms-dos, windows and linux. I appreciate your help and, if it's not asking too much, I ask you to continue helping me solve this little "dilemma". I've already managed to generate .EXE that run inside FreeDOS, with djgpp installed on my Debian ... but I'll understand if you can't help me little by little ... I look forward to hearing from you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We can go on with that when you want to. The last point was about checking the devel2 directories for a shell and possibly rename those during the initial setup of the cross compile.
As the list of the steps is getting long already I suggest you to create a step by step note how to do this setup (ideally starting with "0 installation and configuration of FreeDOS", going on with "setup DOS cross-compiler", "3 prepare updated DJGPP environment 'devel2'", ... ).
This would allow others to follow your path, know something more about your setup which may help and could check for possible "gotchas". Note: I'm away for two weeks so feel free to take some time to do this and don't expect answers too fast.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
2 - Extract the contents of FreeDOS, resulting in FD13FULL.img. Having this file, mount it and copy all the contents to the \home\user\HDDs\E folder on your Debian;
mount e "/home/user/HDDs/E"
mount c "/home/user/HDDs/C" -freesize 2048
C:
C:\FDAUTO.BAT
Now, save the file and run dosbox as described above. FreeDOS will be installed to /home/user/HDDs/C, from /home/user/HDDs/E, where you extracted FD13FULL.img ...
Inside DOSBox, do the following:
1 - Go to the installer folder by typing:
C:\E:
E:\setup
2 - Choose the following option when presented:
Full installation including applications and games
Wait for the installation to finish and when it completes, run DOSBox again.
FreeDOS 1.3 will already be installed in the folder in question.
Now,we need to install the DJGPP in the FreeDOS. You do the following:
ensure you have "lots of" enough disk space (one GB would be more than enough, but of course this also depends on your configuration)
mkdir C:\DEVEL2 && cd C:\DEVEL2 && edit use_me.bat as follows
SET DJGPP=C:\DEVEL2\DJGPP.ENV
SET PATH=C:\DEVEL2\BIN;%PATH%
download a lot of files from your nearest mirror (I assume this to be http://mirrors.meowr.net/djgpp/ ) or create the file "down.sh":
then unzip everything (in order of their dates, enabling you to overwrite existing files), because of size issues and for better overview you'll likely want to del the ones you've unpacked and you'll create a "make.bat" in this folder and add:
echo:offecho"Start of the extraction to C:\DEVEL2 ... wait ... "unzip-dc:\devel2c:\install\acnf213b.zipunzip-dc:\devel2c:\install\acnf259b.zipunzip-dc:\devel2c:\install\ada1030b.zipunzip-dc:\devel2c:\install\amak194b.zipunzip-dc:\devel2c:\install\bann10b.zipunzip-dc:\devel2c:\install\barc098b.zipunzip-dc:\devel2c:\install\bc1071b.zipunzip-dc:\devel2c:\install\bnu2351b.zipunzip-dc:\devel2c:\install\bool022b.zipunzip-dc:\devel2c:\install\bsh204b.zipunzip-dc:\devel2c:\install\bsh4117b.zipunzip-dc:\devel2c:\install\bsn241br.zipunzip-dc:\devel2c:\install\byacc19b.zipunzip-dc:\devel2c:\install\bz2-108b.zipunzip-dc:\devel2c:\install\cdecl25.zipunzip-dc:\devel2c:\install\clear10b.zipunzip-dc:\devel2c:\install\clzp112b.zipunzip-dc:\devel2c:\install\cpio242b.zipunzip-dc:\devel2c:\install\csc154b.zipunzip-dc:\devel2c:\install\csdpmi5b.zipunzip-dc:\devel2c:\install\csdpmi7b.zipunzip-dc:\devel2c:\install\cvs111b.zipunzip-dc:\devel2c:\install\cxr15db.zipunzip-dc:\devel2c:\install\dcrw853b.zipunzip-dc:\devel2c:\install\derof16b.zipunzip-dc:\devel2c:\install\dfe9532b.zipunzip-dc:\devel2c:\install\dfst128b.zipunzip-dc:\devel2c:\install\dif37b.zipunzip-dc:\devel2c:\install\djdev205.zipunzip-dc:\devel2c:\install\djgpptsr.zipunzip-dc:\devel2c:\install\dlg09ab.zipunzip-dc:\devel2c:\install\dlm20b.zipunzip-dc:\devel2c:\install\dlx291.zipunzip-dc:\devel2c:\install\dosck11b.zipunzip-dc:\devel2c:\install\dxe2_011.zipunzip-dc:\devel2c:\install\em2602ab.zipunzip-dc:\devel2c:\install\ens162b.zipunzip-dc:\devel2c:\install\epz100b.zipunzip-dc:\devel2c:\install\expat20b.zipunzip-dc:\devel2c:\install\ezvga14.zipunzip-dc:\devel2c:\install\fftw312b.zipunzip-dc:\devel2c:\install\fil41br3.zipunzip-dc:\devel2c:\install\file334b.zipunzip-dc:\devel2c:\install\flx254br.zipunzip-dc:\devel2c:\install\fnd4233b.zipunzip-dc:\devel2c:\install\fpth314b.zipunzip-dc:\devel2c:\install\gccsjis.zipunzip-dc:\devel2c:\install\gcc1030b.zipunzip-dc:\devel2c:\install\gdb7121b.zipunzip-dc:\devel2c:\install\gdb72br4.zipunzip-dc:\devel2c:\install\gdb771b.zipunzip-dc:\devel2c:\install\gdb801b.zipunzip-dc:\devel2c:\install\gdbm113b.zipunzip-dc:\devel2c:\install\gdbm183b.zipunzip-dc:\devel2c:\install\gfor1030.zipunzip-dc:\devel2c:\install\glib126b.zipunzip-dc:\devel2c:\install\glo561b.zipunzip-dc:\devel2c:\install\gmp612b.zipunzip-dc:\devel2c:\install\gmp620b.zipunzip-dc:\devel2c:\install\gmp621b.zipunzip-dc:\devel2c:\install\gpc346b.zipunzip-dc:\devel2c:\install\gpp346b.zipunzip-dc:\devel2c:\install\gpp474b.zipunzip-dc:\devel2c:\install\gpp1030b.zipunzip-dc:\devel2c:\install\gprf304b.zipunzip-dc:\devel2c:\install\grap120b.zipunzip-dc:\devel2c:\install\grep228b.zipunzip-dc:\devel2c:\install\gro1223b.zipunzip-dc:\devel2c:\install\grx249br.zipunzip-dc:\devel2c:\install\gst175b.zipunzip-dc:\devel2c:\install\gtx1981b.zipunzip-dc:\devel2c:\install\gtxt201b.zipunzip-dc:\devel2c:\install\gwk500b.zipunzip-dc:\devel2c:\install\gzip110b.zipunzip-dc:\devel2c:\install\h2m14711.zipunzip-dc:\devel2c:\install\idu32b.zipunzip-dc:\devel2c:\install\ind2210b.zipunzip-dc:\devel2c:\install\inf028b.zipunzip-dc:\devel2c:\install\isl024b.zipunzip-dc:\devel2c:\install\isp3301b.zipunzip-dc:\devel2c:\install\jas1901b.zipunzip-dc:\devel2c:\install\jbig21br.zipunzip-dc:\devel2c:\install\jkthpack.zipunzip-dc:\devel2c:\install\jlggenp2.zipunzip-dc:\devel2c:\install\jonipx.zipunzip-dc:\devel2c:\install\jpeg9db.zipunzip-dc:\devel2c:\install\jptui42b.zipunzip-dc:\devel2c:\install\jsn2131b.zipunzip-dc:\devel2c:\install\l290d10b.zipunzip-dc:\devel2c:\install\lbdlx100.zipunzip-dc:\devel2c:\install\lcms212b.zipunzip-dc:\devel2c:\install\lcset10b.zipunzip-dc:\devel2c:\install\lib3d019.zipunzip-dc:\devel2c:\install\libt15b.zipunzip-dc:\devel2c:\install\licv115b.zipunzip-dc:\devel2c:\install\licv116b.zipunzip-dc:\devel2c:\install\lidn138b.zipunzip-dc:\devel2c:\install\llocl02b.zipunzip-dc:\devel2c:\install\lmb051b.zipunzip-dc:\devel2c:\install\lme117b.zipunzip-dc:\devel2c:\install\lmpg051b.zipunzip-dc:\devel2c:\install\lout328b.zipunzip-dc:\devel2c:\install\lp1114br.zipunzip-dc:\devel2c:\install\ls080b.zipunzip-dc:\devel2c:\install\lss530b.zipunzip-dc:\devel2c:\install\lssg358b.zipunzip-dc:\devel2c:\install\lua522b.zipunzip-dc:\devel2c:\install\luns098b.zipunzip-dc:\devel2c:\install\lus0910b.zipunzip-dc:\devel2c:\install\lw03b.zipunzip-dc:\devel2c:\install\lzop096b.zipunzip-dc:\devel2c:\install\m4-1418b.zipunzip-dc:\devel2c:\install\m64lib01.zipunzip-dc:\devel2c:\install\mak43b.zipunzip-dc:\devel2c:\install\mak381s.zipunzip-dc:\devel2c:\install\mak381b.zipunzip-dc:\devel2c:\install\marst27b.zipunzip-dc:\devel2c:\install\mfwpe11b.zipunzip-dc:\devel2c:\install\mgis055b.zipunzip-dc:\devel2c:\install\misc13b.zipunzip-dc:\devel2c:\install\mkkbd3.zipunzip-dc:\devel2c:\install\mktmp17b.zipunzip-dc:\devel2c:\install\mpc110b.zipunzip-dc:\devel2c:\install\mpc121b.zipunzip-dc:\devel2c:\install\mpfr410b.zipunzip-dc:\devel2c:\install\mss121.zipunzip-dc:\devel2c:\install\mttws121.zipunzip-dc:\devel2c:\install\npbm916b.zipunzip-dc:\devel2c:\install\nsname10.zipunzip-dc:\devel2c:\install\ntlfn08b.zipunzip-dc:\devel2c:\install\o2bfd01b.zipunzip-dc:\devel2c:\install\objc1030.zipunzip-dc:\devel2c:\install\p2c120b.zipunzip-dc:\devel2c:\install\pat275br.zipunzip-dc:\devel2c:\install\pcr1031b.zipunzip-dc:\devel2c:\install\pcre842b.zipunzip-dc:\devel2c:\install\pdmlwp03.zipunzip-dc:\devel2c:\install\perl588b.zipunzip-dc:\devel2c:\install\pico396b.zipunzip-dc:\devel2c:\install\pkgc015b.zipunzip-dc:\devel2c:\install\pmcom10.zipunzip-dc:\devel2c:\install\pmode13b.zipunzip-dc:\devel2c:\install\png1637b.zipunzip-dc:\devel2c:\install\popt12b.zipunzip-dc:\devel2c:\install\psut117b.zipunzip-dc:\devel2c:\install\pth207b.zipunzip-dc:\devel2c:\install\rcode35b.zipunzip-dc:\devel2c:\install\rcs5713b.zipunzip-dc:\devel2c:\install\rdln80b.zipunzip-dc:\devel2c:\install\repeat10.zipunzip-dc:\devel2c:\install\rhid15ab.zipunzip-dc:\devel2c:\install\rsxdj151.zipunzip-dc:\devel2c:\install\sed48b.zipunzip-dc:\devel2c:\install\shar42cb.zipunzip-dc:\devel2c:\install\shl2011b.zipunzip-dc:\devel2c:\install\shtl208b.zipunzip-dc:\devel2c:\install\smldbl12.zipunzip-dc:\devel2c:\install\ssl101ub.zipunzip-dc:\devel2c:\install\ssl102ub.zipunzip-dc:\devel2c:\install\svas011b.zipunzip-dc:\devel2c:\install\svgalibb.zipunzip-dc:\devel2c:\install\t2h164b.zipunzip-dc:\devel2c:\install\tar112ab.zipunzip-dc:\devel2c:\install\tiff420b.zipunzip-dc:\devel2c:\install\tr2lt22b.zipunzip-dc:\devel2c:\install\trse110b.zipunzip-dc:\devel2c:\install\trsi110b.zipunzip-dc:\devel2c:\install\tv210b.zipunzip-dc:\devel2c:\install\txi413br3.zipunzip-dc:\devel2c:\install\txt20br3.zipunzip-dc:\devel2c:\install\unit180b.zipunzip-dc:\devel2c:\install\urtf219b.zipunzip-dc:\devel2c:\install\vera19b.zipunzip-dc:\devel2c:\install\vsd104fb.zipunzip-dc:\devel2c:\install\wat3211b.zipunzip-dc:\devel2c:\install\whic220b.zipunzip-dc:\devel2c:\install\wmemu21b.zipunzip-dc:\devel2c:\install\xdlt112b.zipunzip-dc:\devel2c:\install\xml299b.zipunzip-dc:\devel2c:\install\xst1133b.zipunzip-dc:\devel2c:\install\xz-525b.zipunzip-dc:\devel2c:\install\zlb1212b.zipecho"The end of the extraction of the files ... "
get GnuCOBOL (because I had issues with https here also on http) and patch some files for FAT32 as follows
wget sf-mensch.users.sourceforge.net/files/dos/gc32-dev.tgz
gzip -d gc32-dev.tgz && tar -xvf gc32-dev.tar
move gnucobol* C:\gc32dev
cd C:\gc32dev
wget sf-mensch.users.sourceforge.net/files/dos/autoc.zip
unzip autoc.zip
cd libcob
wget sf-mensch.users.sourceforge.net/files/cJSON/cJSON.c
wget sf-mensch.users.sourceforge.net/files/cJSON/cJSON.h
Also: DJGPP suggests to cross-compile more complex projects instead of getting all those pieces together in a much slower environment. If you cross-compile you can still use libgmp from that distribution on both the building machine and FreeDOS (only the binaries from the package needed then) and binutils+GCC (+potentially GDB) on FreeDOS + then copy the GnuCOBOL build from your cross-compiling environment - no need for most of the downloads of all the tools and bash on FreeDOS.
Then access FreeDOS, go to the C:\INSTALL folder where you will put the zipped files and run the "make.bat" file inside this folder:
C:\INSTALL>make.bat
Now, we need to install DJGPP on Debian for cross-compilation, download and follow the instructions from the following website:
Every time you are going to create GNUCobol for FreeDOS, enter the folder "/home/user/HDDs/C/g32dev/" and run the file described above in a terminal... now, if it shows errors or the EXEs are not generated for FreeDOS, post here what happened and attach the "config.log" file so you can get further help. Remembering, instead of "user" put your username in Debian, ok!
Simon, again I tried to generate the GNUCobol for FreeDOS, but I don't know to resolve the problems generated with the proceed ... Do you can help me???? I'll await your contact .... the attachment the logs ...
P.S.: "CONFIG-FreeDOS.LOG is referent to the executions in the FreeDOS DOSbox, ok!!!!
The configure run in your dos environment looks actually quite promising. It reached the end of configure and just has an issue with the long filename that you can adjust in the generated "config.status" script.
Note: When checking the log file I've found an old issue with configure (which I'll try to fix tomorrow); for now I suggest to edit the configure script removing the following lines:
-if test "$COB_USES_GCC" = "yes"; then- if test "x$CFLAGS" != "x"; then- CFLAGS="$CFLAGS -pipe"- else- CFLAGS="-pipe"- fi-fi
After changing the configure script you likely want to run it again.
You'll then need to find out how the file config.status looks for can be read (I guess some shortened name will work, the command ls -l ../gc32dev/tests should help to see the name), then edit config.status to this other name, then rerun the script again ./config.status - if that passes go on with make.
As noted before to build there you'll likely need to edit libcob/exception*def to match a shortened name; but that's something to see when make returns errors (if it does: and you can't fix that: run with make -C cobc to also try building this before posting the results).
And of course: take notes about your process and configuration on the way.
For the cross-compile option we already got further before, currently it bails out with
error: neither GMP nor MPIR library are found, but one of those is mandatory
and when checking config.log we can see the reason:
You've adjusted the -pipe, that's OK. For the build within the DOS environment you need to adjust the path in config.status for "tests/run_prog_manual.sh.in" to whatever can be used there (possibly some ~ variant), then only re-execute ./config.status.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Simon, I set every entry of "run_prog_manual.sh" to an 8 character name "run_prog.sh", but when "config.status" is executed, instead of finding the name I put, it looks for another name "run_prog .sh.in" ... I then renamed it to that name and the "config.status" keeps saying it couldn't find the file!!!! Can you help me with this problem????
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That actually looks quite good. It is not clear from the log file (you may want to just run make -C libcob and post the output directly here), but I guess you now trip over the issue with the long name of the exception.def files I've seen before when running the cross-compile on my side.
To go on with that you need to rename those and adjust one file in libcob, that was what I've did and posted for that before:
cd libcob
copy except1~.def exception.def
move except2~.def exc-io.def
... then change exception.def to now use "exc-io" instead of "exception-io".
I'm now rally eager to see when we'll have conquered that and also eager to see your resulting "recipe" how to go through this process without all the extra steps in between (and we possibly will be able to write a script to do these steps for any future build).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sigh. A log file is always "the last resort", mainly useful for big files like config.log or testsuite log, for everything else a plain code markdown is much better (all details can be found in the help circle of the editor. Reasons for log output instead of a file: this is also shown when reading via mail (which I commonly do, others, too), people can find references via search, screen readers don't need to switch to another file...
Concerning the log content: that "not finding libtool" looks weird, isn't the libtool wrapper there?
From dos prompt (omit the first character below when entering the commands):
Simon, I found a directory "libtool" in "C:\devel2", but I don't know if it's the same directory in question ... there is too a file with that name and without extension. I did a test executing the command "make", but it not found the folder added to the local indicated, Do you can to help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now I ran ... it's generated a new file without extension ... but when I execute the "make" command appear errors. The "make" doesn't find the "libtool" file. In attachment I send the log file, ok!
I investigated the file "libtool" and it is a configuration file ... maybe the file doesn't have the permission to make the job in question. I am sending in attachment that file, ok!
Well, I extracted files via Debian and it created all the correct form ... but appears other error, see below:
Last edit: Everaldo Bernardo Cunha 2022-04-07
You mentioned mounting ... is it necessary to mount the directory "../devel2" as FAT32 inside linux????
That depends on your setup of FreeDOS, I've used virtual drives and needed a mounting.
I guess that you have a setup where FreeDOS "mounts" a directory from your host as "drive", is this the case?
But to your issue: I guess that devel2/bin is in your PATH on the Linux side and potentially contains shell binaries like "sh" or "bash", or "make" - in this case I'd suggest to at leat temporary move them from there.
Simon is exactly it, a directory as host "home/everaldo/HDDs/C/" ... How should we proceed in this case, then?
You use it exactly like you did - and check that there's no shell/make in its devel2 subdirectory (at least for the purpose of setting up the cross compilation).
What you do should be relative easy, maybe you can get in contact with someone that has experience with cross-compiling and/or djgpp to help you with this special setup of yours?
If nothing helps we may could setup a remote session (Simon doing, whomever looking) but that would be more effort for me so we'd need to find an agreement based on a 30 minute rate (in EUR or USD). If you need that and want to go this route contact me via mail (found in the changelogs) or "send message".
Simon, I don't have enough money to hire your services... I've been working with computers since 1993 and I know a lot about ms-dos, windows and linux. I appreciate your help and, if it's not asking too much, I ask you to continue helping me solve this little "dilemma". I've already managed to generate .EXE that run inside FreeDOS, with djgpp installed on my Debian ... but I'll understand if you can't help me little by little ... I look forward to hearing from you!
We can go on with that when you want to. The last point was about checking the devel2 directories for a shell and possibly rename those during the initial setup of the cross compile.
As the list of the steps is getting long already I suggest you to create a step by step note how to do this setup (ideally starting with "0 installation and configuration of FreeDOS", going on with "setup DOS cross-compiler", "3 prepare updated DJGPP environment 'devel2'", ... ).
This would allow others to follow your path, know something more about your setup which may help and could check for possible "gotchas". Note: I'm away for two weeks so feel free to take some time to do this and don't expect answers too fast.
Gnu COBOL on FreeDOS platform within DOSBOX debian.
Installing FreeDOS in a Debian 11 LXDE or LXQt 64-bit folder:
First, download FreeDOS from the internet, FreeDOS 1.3 FullUSB, http://freedos.org/download/ ...
1 - Create the following folders in your HOME:
\home\user\HDDs\C
\home\user\HDDs\E
\home\user\HDDs\A
NOTE: change the word "user" to your username...
2 - Extract the contents of FreeDOS, resulting in FD13FULL.img. Having this file, mount it and copy all the contents to the \home\user\HDDs\E folder on your Debian;
3 - Now, download DOSBOX-Staging from the following website:
https://github.com/dosbox-staging/dosbox-staging/releases/download/v0.78.1/dosbox-staging-linux-v0.78.1.tar.xz
Extract the file into your HOME folder and rename it to "dosbox-staging" and copy that folder to /home/user/.local/share/
4 - Edit the ".profile" file putting the following line at the end of it:
export PATH="$PATH:/home/user/.local/share/dosbox-staging"
5 - Edit the ".bashrc" file placing the same content reported above, at the end of this file.
Restart Debian and after reboot open a terminal and type:
$ dosbox
Now let's configure FreeDOS 1.3 in DOSBox.
1 - After initializing dosbox, file dosbox-staging.conf is created, see the full path below:
/home/user/.config/dosbox/dosbox-staging.conf
Open the file above with a simple text editor, as you already did in the other steps, it could be "gedit"...
2 - Modify the file options as follows (only the mentioned options):
[sdl]
windowresolution = l
output = openglnb
[dosbox]
memsize = 512
vmemsize = 16
vesa_modes = all
[cpu]
core = auto
cputype = auto
cycles = max
cycleup = 10
cycledown = 20
[mixer]
nosound = false
rate = 48000
blocksize = 2048
prebuffer = 100
negotiate = true
[autoexec]
mount e "/home/user/HDDs/E"
mount c "/home/user/HDDs/C" -freesize 2048
C:
C:\FDAUTO.BAT
Now, save the file and run dosbox as described above. FreeDOS will be installed to /home/user/HDDs/C, from /home/user/HDDs/E, where you extracted FD13FULL.img ...
Inside DOSBox, do the following:
1 - Go to the installer folder by typing:
C:\E:
E:\setup
2 - Choose the following option when presented:
Full installation including applications and games
Wait for the installation to finish and when it completes, run DOSBox again.
FreeDOS 1.3 will already be installed in the folder in question.
Now,we need to install the DJGPP in the FreeDOS. You do the following:
ensure you have "lots of" enough disk space (one GB would be more than enough, but of course this also depends on your configuration)
SET DJGPP=C:\DEVEL2\DJGPP.ENV
SET PATH=C:\DEVEL2\BIN;%PATH%
download a lot of files from your nearest mirror (I assume this to be http://mirrors.meowr.net/djgpp/ ) or create the file "down.sh":
then unzip everything (in order of their dates, enabling you to overwrite existing files), because of size issues and for better overview you'll likely want to del the ones you've unpacked and you'll create a "make.bat" in this folder and add:
get GnuCOBOL (because I had issues with https here also on http) and patch some files for FAT32 as follows
Also: DJGPP suggests to cross-compile more complex projects instead of getting all those pieces together in a much slower environment. If you cross-compile you can still use libgmp from that distribution on both the building machine and FreeDOS (only the binaries from the package needed then) and binutils+GCC (+potentially GDB) on FreeDOS + then copy the GnuCOBOL build from your cross-compiling environment - no need for most of the downloads of all the tools and bash on FreeDOS.
Then access FreeDOS, go to the C:\INSTALL folder where you will put the zipped files and run the "make.bat" file inside this folder:
C:\INSTALL>make.bat
Now, we need to install DJGPP on Debian for cross-compilation, download and follow the instructions from the following website:
https://github.com/andrewwutw/build-djgpp
Every time you compile within debian, open a terminal in the folder where you put cross-compile "/home/user/HDDs/C/gc32dev/", and run the command:
Create a bash file in the folder "/home/user/HDDs/C/g32dev/" with the name of "build.sh". Give it write permission and inside put the following:
Save and give execute permission:
Every time you are going to create GNUCobol for FreeDOS, enter the folder "/home/user/HDDs/C/g32dev/" and run the file described above in a terminal... now, if it shows errors or the EXEs are not generated for FreeDOS, post here what happened and attach the "config.log" file so you can get further help. Remembering, instead of "user" put your username in Debian, ok!
Related
Discussion: GnuCOBOL in FreeDOS/MS-DOS ...
Last edit: Everaldo Bernardo Cunha 2023-11-19
Simon, again I tried to generate the GNUCobol for FreeDOS, but I don't know to resolve the problems generated with the proceed ... Do you can help me???? I'll await your contact .... the attachment the logs ...
P.S.: "CONFIG-FreeDOS.LOG is referent to the executions in the FreeDOS DOSbox, ok!!!!
Last edit: Everaldo Bernardo Cunha 2022-04-29
The configure run in your dos environment looks actually quite promising. It reached the end of configure and just has an issue with the long filename that you can adjust in the generated "config.status" script.
Note: When checking the log file I've found an old issue with configure (which I'll try to fix tomorrow); for now I suggest to edit the configure script removing the following lines:
After changing the configure script you likely want to run it again.
You'll then need to find out how the file config.status looks for can be read (I guess some shortened name will work, the command
ls -l ../gc32dev/tests
should help to see the name), thenedit config.status
to this other name, then rerun the script again./config.status
- if that passes go on withmake
.As noted before to build there you'll likely need to edit
libcob/exception*def
to match a shortened name; but that's something to see whenmake
returns errors (if it does: and you can't fix that: run withmake -C cobc
to also try building this before posting the results).And of course: take notes about your process and configuration on the way.
For the cross-compile option we already got further before, currently it bails out with
and when checking config.log we can see the reason:
so either
/dev/c/devel2/include
does not exist / cannot be accessed from the cross compiling environment, or there is no gmp.h file in there.Simon, again I did the proceed, but the result not was good ... config.status doesn't find one file ... in attachment the log
You've adjusted the
-pipe
, that's OK. For the build within the DOS environment you need to adjust the path in config.status for "tests/run_prog_manual.sh.in" to whatever can be used there (possibly some ~ variant), then only re-execute./config.status
.Simon, I set every entry of "run_prog_manual.sh" to an 8 character name "run_prog.sh", but when "config.status" is executed, instead of finding the name I put, it looks for another name "run_prog .sh.in" ... I then renamed it to that name and the "config.status" keeps saying it couldn't find the file!!!! Can you help me with this problem????
Not from where I seat, but if this is the only issue then just ignore that part for now and go on with the next files manually, then issue
make
:Last edit: Simon Sobisch 2022-05-03
I did the proceed and how result appear a errors ... see the log in attachment ...
Last edit: Everaldo Bernardo Cunha 2022-05-03
Not sure, is it getting better after doing the missing part:
I've missed those in my list before.
If the same error occurs on make please retry with
make -k
once, then do amake -k
again and post the log from the second invocation.Ok, in attachment the log file ...
That actually looks quite good. It is not clear from the log file (you may want to just run
make -C libcob
and post the output directly here), but I guess you now trip over the issue with the long name of the exception.def files I've seen before when running the cross-compile on my side.To go on with that you need to rename those and adjust one file in libcob, that was what I've did and posted for that before:
... then change exception.def to now use "exc-io" instead of "exception-io".
I'm now rally eager to see when we'll have conquered that and also eager to see your resulting "recipe" how to go through this process without all the extra steps in between (and we possibly will be able to write a script to do these steps for any future build).
I tried again the process ... in attachment, more one log file, ok!
Sigh. A log file is always "the last resort", mainly useful for big files like config.log or testsuite log, for everything else a plain code markdown is much better (all details can be found in the help circle of the editor. Reasons for log output instead of a file: this is also shown when reading via mail (which I commonly do, others, too), people can find references via search, screen readers don't need to switch to another file...
Concerning the log content: that "not finding libtool" looks weird, isn't the libtool wrapper there?
From dos prompt (omit the first character below when entering the commands):
Good, how I don't know to do a screenshots in ms-dos ambient, I copied the informations ... below write those informations:
Simon, I found a directory "libtool" in "C:\devel2", but I don't know if it's the same directory in question ... there is too a file with that name and without extension. I did a test executing the command "make", but it not found the folder added to the local indicated, Do you can to help me?
It searches for a file that is created during configure. Did you run
./config.status libtool
already?Now I ran ... it's generated a new file without extension ... but when I execute the "make" command appear errors. The "make" doesn't find the "libtool" file. In attachment I send the log file, ok!
Last edit: Everaldo Bernardo Cunha 2022-05-11
I investigated the file "libtool" and it is a configuration file ... maybe the file doesn't have the permission to make the job in question. I am sending in attachment that file, ok!