public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* ranlib, not searched at the right place
@ 2021-06-18 10:43 Paul Dufresne
  2021-06-18 14:42 ` Jonathan Wakely
  2021-06-18 16:20 ` J.W. Jagersma
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Dufresne @ 2021-06-18 10:43 UTC (permalink / raw)
  To: gcc-help

Goal: compile DOS 32 bits program in Linux because many scripts use bash

Not sure I am on the right track.



Non-finish attempt: use Delorie djcrx205.zip, but instructions were quite complex, and

about tools in 2001, and give up



Then found: https://wiki.osdev.org/GCC_Cross-Compiler

at first not realizing it is for an other goal (building a kernel that boot under Grub)...

but I adapted by removing --without-headers... because I intend to compile "true" programs.



I had to install, like indicated, an older version of texinfo (version 4.13a -- latest before 5.0) for finishing:

make all-gcc



But I now get:

LANG=C make all-target-libgcc

result in:

sh /home/paul/Téléchargements/gcc-11.1.0/libgcc/../move-if-change $dest ../.././gcc/include/unwind.h

# Now that we have built all the objects, we need to copy

# them back to the GCC directory.  Too many things (other

# in-tree libraries, and DejaGNU) know about the layout

# of the build tree, for now.

make install-leaf DESTDIR=../.././gcc \

  slibdir= libsubdir= MULTIOSDIR=.

make[2]: Entering directory '/home/paul/src/build-gcc/i386-pc-msdosdjgpp/libgcc'

/bin/bash /home/paul/Téléchargements/gcc-11.1.0/libgcc/../mkinstalldirs ../.././gcc

/usr/bin/install -c -m 644 libgcc.a ../.././gcc/

chmod 644 ../.././gcc/libgcc.a

/home/paul/opt/cross/i386-pc-msdosdjgpp/bin/ranlib ../.././gcc/libgcc.a

/bin/bash: line 1: /home/paul/opt/cross/i386-pc-msdosdjgpp/bin/ranlib: No such file or directory

make[2]: *** [Makefile:1175: install-leaf] Error 127

make[2]: Leaving directory '/home/paul/src/build-gcc/i386-pc-msdosdjgpp/libgcc'

make[1]: *** [Makefile:120: all] Error 2

make[1]: Leaving directory '/home/paul/src/build-gcc/i386-pc-msdosdjgpp/libgcc'

make: *** [Makefile:13182: all-target-libgcc] Error 2

paul@kasparno:~/src/build-gcc$ apt search ranlib

En train de trier... Fait

Recherche en texte intégral... Fait

nvptx-tools/hirsute 0.20180301-1build1 amd64

  collection of tools for use with nvptx-none GCC toolchains



paul@kasparno:~/src/build-gcc$ 

paul@kasparno:~/src/build-gcc$ ls ~/opt/cross/bin/i386-pc-msdosdjgpp-*

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-c++

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-cpp

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-g++

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-11.1.0

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-ar

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-nm

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-ranlib

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcov

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcov-dump

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcov-tool

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gfortran

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-lto-dump



Searched: /bin/bash: 

/home/paul/opt/cross/i386-pc-msdosdjgpp/bin/ranlib: No such file or directory

Should have searched (I think):

/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-ranlib

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ranlib, not searched at the right place
  2021-06-18 10:43 ranlib, not searched at the right place Paul Dufresne
@ 2021-06-18 14:42 ` Jonathan Wakely
  2021-06-18 15:13   ` Dan Kegel
  2021-06-18 15:34   ` Paul Dufresne
  2021-06-18 16:20 ` J.W. Jagersma
  1 sibling, 2 replies; 7+ messages in thread
From: Jonathan Wakely @ 2021-06-18 14:42 UTC (permalink / raw)
  To: Paul Dufresne; +Cc: gcc-help

On Fri, 18 Jun 2021 at 11:44, Paul Dufresne via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Goal: compile DOS 32 bits program in Linux because many scripts use bash

Please clarify. Are you trying to compile DOS programs to run on linux?

Or just compile them on linux, to be run on Windows machines?


> Not sure I am on the right track.

I think you are on completely the wrong track, but you haven't told us
how you even configured GCC so we can't really say much about the rest
of the errors you showed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ranlib, not searched at the right place
  2021-06-18 14:42 ` Jonathan Wakely
@ 2021-06-18 15:13   ` Dan Kegel
  2021-06-18 15:34   ` Paul Dufresne
  1 sibling, 0 replies; 7+ messages in thread
From: Dan Kegel @ 2021-06-18 15:13 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Paul Dufresne, gcc-help

You probably want to use a prebuilt mingw on Linux, or possibly the one
that comes with git on windows...

Jonathan Wakely via Gcc-help <gcc-help@gcc.gnu.org> schrieb am Fr., 18.
Juni 2021, 07:45:

> On Fri, 18 Jun 2021 at 11:44, Paul Dufresne via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
> >
> > Goal: compile DOS 32 bits program in Linux because many scripts use bash
>
> Please clarify. Are you trying to compile DOS programs to run on linux?
>
> Or just compile them on linux, to be run on Windows machines?
>
>
> > Not sure I am on the right track.
>
> I think you are on completely the wrong track, but you haven't told us
> how you even configured GCC so we can't really say much about the rest
> of the errors you showed.
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ranlib, not searched at the right place
  2021-06-18 14:42 ` Jonathan Wakely
  2021-06-18 15:13   ` Dan Kegel
@ 2021-06-18 15:34   ` Paul Dufresne
  1 sibling, 0 replies; 7+ messages in thread
From: Paul Dufresne @ 2021-06-18 15:34 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

---- Le ven., 18 juin 2021 10:42:37 -0400 Jonathan Wakely <jwakely.gcc@gmail.com> écrit ----


On Fri, 18 Jun 2021 at 11:44, Paul Dufresne via Gcc-help 
<mailto:gcc-help@gcc.gnu.org> wrote: 
> 
>> Goal: compile DOS 32 bits program in Linux because many scripts use bash 
 
>Please clarify. Are you trying to compile DOS programs to run on linux? 
 >Or just compile them on linux, to be run on Windows machines? 
 
compile them on linux, to be run on DOS under DPMI (cwsdpmi) machines?... not Windows 

 

>> Not sure I am on the right track. 
 >I think you are on completely the wrong track, but you haven't told us 
>how you even configured GCC so we can't really say much about the rest 
>of the errors you showed. 
export PREFIX="$HOME/opt/cross"
export TARGET=i386-pc-msdosdjgpp
export PATH="$PREFIX/bin:$PATH"



mkdir build-gcc
cd build-gcc
../gcc-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ranlib, not searched at the right place
  2021-06-18 10:43 ranlib, not searched at the right place Paul Dufresne
  2021-06-18 14:42 ` Jonathan Wakely
@ 2021-06-18 16:20 ` J.W. Jagersma
  2021-06-18 23:09   ` Paul Dufresne
  1 sibling, 1 reply; 7+ messages in thread
From: J.W. Jagersma @ 2021-06-18 16:20 UTC (permalink / raw)
  To: Paul Dufresne, gcc-help

On 2021-06-18 12:43, Paul Dufresne via Gcc-help wrote:
> Goal: compile DOS 32 bits program in Linux because many scripts use bash
> 
> Not sure I am on the right track.
> 
> ...
> 
> paul@kasparno:~/src/build-gcc$ 
> 
> paul@kasparno:~/src/build-gcc$ ls ~/opt/cross/bin/i386-pc-msdosdjgpp-*
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-c++
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-cpp
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-g++
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-11.1.0
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-ar
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-nm
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-ranlib
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcov
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcov-dump
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcov-tool
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gfortran
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-lto-dump
> 
> 
> 
> Searched: /bin/bash: 
> 
> /home/paul/opt/cross/i386-pc-msdosdjgpp/bin/ranlib: No such file or directory
> 
> Should have searched (I think):
> 
> /home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc-ranlib
> 

You don't seem to have binutils installed.  The correct build order for djgpp is
binutils -> stubify -> gcc -> libc -> libgcc/libstdc++.

I have a complete toolchain build script on github, you may find it useful:
https://github.com/jwt27/build-gcc.git

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ranlib, not searched at the right place
  2021-06-18 16:20 ` J.W. Jagersma
@ 2021-06-18 23:09   ` Paul Dufresne
  2021-06-19  2:16     ` Dan Kegel
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Dufresne @ 2021-06-18 23:09 UTC (permalink / raw)
  To: J.W. Jagersma; +Cc: gcc-help

---- Le ven., 18 juin 2021 12:20:46 -0400 J.W. Jagersma <jwjagersma@gmail.com> écrit ----


On 2021-06-18 12:43, Paul Dufresne via Gcc-help wrote: 
>> Goal: compile DOS 32 bits program in Linux because many scripts use bash 
...
>I have a complete toolchain build script on github, you may find it useful: 
https://github.com/jwt27/build-gcc.git


Thank you so much!

It worked great... the second time... first time it was complaining my binutils file had premature EOF,

... so I rm -r build, rm download/*, and tried again.





Was able to compile hello.exe, and run it in DOSEMU2.



So I tried to go in my gnu-chess directory:

CC=/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc ./configure --build=i686-pc-linux-gnu --host=i386-pc-msdosdjgpp

maybe the CC stuff was not necessary...



paul@kasparno:~/Téléchargements/gnuchess$ LANG=C make

Making all in src

make[1]: Entering directory '/home/paul/Téléchargements/gnuchess/src'

make  all-recursive

make[2]: Entering directory '/home/paul/Téléchargements/gnuchess/src'

Making all in frontend

make[3]: Entering directory '/home/paul/Téléchargements/gnuchess/src/frontend'

i386-pc-msdosdjgpp-g++ -DHAVE_CONFIG_H -I. -I../../src  -I../../src -I../../lib   -g -O2 -MT atak.o -MD -MP -MF .deps/atak.Tpo -c -o atak.o atak.cc

In file included from atak.cc:30:

common.h:32:10: fatal error: pthread.h: No such file or directory

   32 | #include <pthread.h>

      |          ^~~~~~~~~~~

compilation terminated.

make[3]: *** [Makefile:421: atak.o] Error 1

make[3]: Leaving directory '/home/paul/Téléchargements/gnuchess/src/frontend'

make[2]: *** [Makefile:576: all-recursive] Error 1

make[2]: Leaving directory '/home/paul/Téléchargements/gnuchess/src'

make[1]: *** [Makefile:416: all] Error 2

make[1]: Leaving directory '/home/paul/Téléchargements/gnuchess/src'

make: *** [Makefile:516: all-recursive] Error 1

paul@kasparno:~/Téléchargements/gnuchess$ CC=/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc ./configure --build=i686-pc-linux-gnu --host=i386-pc-msdosdjgpp



So now, all I have to do is figure out how to handle threads in DOS, and I should be able to play chess! [80% joking]

Time for me to take my walk and think a bit...



Thank you again so much!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ranlib, not searched at the right place
  2021-06-18 23:09   ` Paul Dufresne
@ 2021-06-19  2:16     ` Dan Kegel
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Kegel @ 2021-06-19  2:16 UTC (permalink / raw)
  To: Paul Dufresne; +Cc: J.W. Jagersma, gcc-help

Threads and MS-DOS are not a great match.

You might want to check out ports of GNU chess to MS-DOS, see
http://kirste.userpage.fu-berlin.de/chemnet/use/info/xboard/FAQ.html
- Dan



Paul Dufresne via Gcc-help <gcc-help@gcc.gnu.org> schrieb am Fr., 18. Juni
2021, 16:11:

> ---- Le ven., 18 juin 2021 12:20:46 -0400 J.W. Jagersma <
> jwjagersma@gmail.com> écrit ----
>
>
> On 2021-06-18 12:43, Paul Dufresne via Gcc-help wrote:
> >> Goal: compile DOS 32 bits program in Linux because many scripts use
> bash
> ...
> >I have a complete toolchain build script on github, you may find it
> useful:
> https://github.com/jwt27/build-gcc.git
>
>
> Thank you so much!
>
> It worked great... the second time... first time it was complaining my
> binutils file had premature EOF,
>
> ... so I rm -r build, rm download/*, and tried again.
>
>
>
>
>
> Was able to compile hello.exe, and run it in DOSEMU2.
>
>
>
> So I tried to go in my gnu-chess directory:
>
> CC=/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc ./configure
> --build=i686-pc-linux-gnu --host=i386-pc-msdosdjgpp
>
> maybe the CC stuff was not necessary...
>
>
>
> paul@kasparno:~/Téléchargements/gnuchess$ LANG=C make
>
> Making all in src
>
> make[1]: Entering directory '/home/paul/Téléchargements/gnuchess/src'
>
> make  all-recursive
>
> make[2]: Entering directory '/home/paul/Téléchargements/gnuchess/src'
>
> Making all in frontend
>
> make[3]: Entering directory
> '/home/paul/Téléchargements/gnuchess/src/frontend'
>
> i386-pc-msdosdjgpp-g++ -DHAVE_CONFIG_H -I. -I../../src  -I../../src
> -I../../lib   -g -O2 -MT atak.o -MD -MP -MF .deps/atak.Tpo -c -o atak.o
> atak.cc
>
> In file included from atak.cc:30:
>
> common.h:32:10: fatal error: pthread.h: No such file or directory
>
>    32 | #include <pthread.h>
>
>       |          ^~~~~~~~~~~
>
> compilation terminated.
>
> make[3]: *** [Makefile:421: atak.o] Error 1
>
> make[3]: Leaving directory
> '/home/paul/Téléchargements/gnuchess/src/frontend'
>
> make[2]: *** [Makefile:576: all-recursive] Error 1
>
> make[2]: Leaving directory '/home/paul/Téléchargements/gnuchess/src'
>
> make[1]: *** [Makefile:416: all] Error 2
>
> make[1]: Leaving directory '/home/paul/Téléchargements/gnuchess/src'
>
> make: *** [Makefile:516: all-recursive] Error 1
>
> paul@kasparno:~/Téléchargements/gnuchess$
> CC=/home/paul/opt/cross/bin/i386-pc-msdosdjgpp-gcc ./configure
> --build=i686-pc-linux-gnu --host=i386-pc-msdosdjgpp
>
>
>
> So now, all I have to do is figure out how to handle threads in DOS, and I
> should be able to play chess! [80% joking]
>
> Time for me to take my walk and think a bit...
>
>
>
> Thank you again so much!
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-19  2:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 10:43 ranlib, not searched at the right place Paul Dufresne
2021-06-18 14:42 ` Jonathan Wakely
2021-06-18 15:13   ` Dan Kegel
2021-06-18 15:34   ` Paul Dufresne
2021-06-18 16:20 ` J.W. Jagersma
2021-06-18 23:09   ` Paul Dufresne
2021-06-19  2:16     ` Dan Kegel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).