public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem creating cross-compiler
@ 2020-06-18  8:48 Jouk Jansen
  2020-06-18 10:52 ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Jouk Jansen @ 2020-06-18  8:48 UTC (permalink / raw)
  To: GCC-HELP

Hi,

I'm trying to build a cross-compiler which should be running on a Fedora 32
system building objects for a IA64-OpenVMS system. I'm running the
compilation on a "up-to-date" Fedora 32 system.

It does not matter which version of gcc I try, I always get the same error
message (see below). For gcc-10.1.0 II used the configure command showed
below. immediately after that I did run "make" and after some time I got the
error liste below.

What do I do wrong?


./configure --prefix=/home/joukj/openvms --exec-prefix=/home/joukj/openvms --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=ia64-hp-openvms
make


...
g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtt
i -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qu
al -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedan
tic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_
H  -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../.././gcc -I../.././gcc/build -I../
.././gcc/../include  -I../.././gcc/../libcpp/include  \
        -o build/genmodes.o ../.././gcc/genmodes.c
./as: line 106: exec: -I: invalid option
exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
make[2]: *** [Makefile:2722: build/genmodes.o] Error 1
make[2]: Leaving directory '/home2/joukj/public/gcc/gcc-10.1.0/host-x86_64-unkno
wn-linux-gnu/gcc'
make[1]: *** [Makefile:4390: all-gcc] Error 2
make[1]: Leaving directory '/home2/joukj/public/gcc/gcc-10.1.0'
make: *** [Makefile:955: all] Error 2



    regards
       Jouk


Pax, vel iniusta, utilior est quam iustissimum bellum.
    (free after Marcus Tullius Cicero (106 b.Chr.-46 b.Chr.)
     Epistularum ad Atticum 7.1.4.3)


               Touch not the cat bot a glove

>------------------------------------------------------------------------------<

  Jouk Jansen
		 
  joukj@hrem.nano.tudelft.nl

  Technische Universiteit Delft        tttttttttt  uu     uu  ddddddd
  Kavli Institute of Nanoscience       tttttttttt  uu     uu  dd    dd
  Nationaal centrum voor HREM              tt      uu     uu  dd     dd
  Lorentzweg 1                             tt      uu     uu  dd     dd
  2628 CJ Delft                            tt      uu     uu  dd     dd
  Nederland                                tt      uu     uu  dd    dd
  tel. 31-15-2782272                       tt       uuuuuuu   ddddddd

>------------------------------------------------------------------------------<


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

* Re: Problem creating cross-compiler
  2020-06-18  8:48 Problem creating cross-compiler Jouk Jansen
@ 2020-06-18 10:52 ` Jonathan Wakely
  2020-06-18 11:26   ` Kai Ruottu
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2020-06-18 10:52 UTC (permalink / raw)
  To: Jouk Jansen; +Cc: gcc-help

On Thu, 18 Jun 2020 at 09:59, Jouk Jansen via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Hi,
>
> I'm trying to build a cross-compiler which should be running on a Fedora 32
> system building objects for a IA64-OpenVMS system. I'm running the
> compilation on a "up-to-date" Fedora 32 system.
>
> It does not matter which version of gcc I try, I always get the same error
> message (see below). For gcc-10.1.0 II used the configure command showed
> below. immediately after that I did run "make" and after some time I got the
> error liste below.
>
> What do I do wrong?
>
>
> ./configure --prefix=/home/joukj/openvms --exec-prefix=/home/joukj/openvms --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=ia64-hp-openvms

Don't run configure in the source tree, see
https://gcc.gnu.org/wiki/InstallingGCC


> make
>
>
> ...
> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtt
> i -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qu
> al -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedan
> tic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_
> H  -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../.././gcc -I../.././gcc/build -I../
> .././gcc/../include  -I../.././gcc/../libcpp/include  \
>         -o build/genmodes.o ../.././gcc/genmodes.c
> ./as: line 106: exec: -I: invalid option


This means you don't have an assembler for the cross target.


> exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
> make[2]: *** [Makefile:2722: build/genmodes.o] Error 1
> make[2]: Leaving directory '/home2/joukj/public/gcc/gcc-10.1.0/host-x86_64-unkno
> wn-linux-gnu/gcc'
> make[1]: *** [Makefile:4390: all-gcc] Error 2
> make[1]: Leaving directory '/home2/joukj/public/gcc/gcc-10.1.0'
> make: *** [Makefile:955: all] Error 2
>
>
>
>     regards
>        Jouk
>
>
> Pax, vel iniusta, utilior est quam iustissimum bellum.
>     (free after Marcus Tullius Cicero (106 b.Chr.-46 b.Chr.)
>      Epistularum ad Atticum 7.1.4.3)
>
>
>                Touch not the cat bot a glove
>
> >------------------------------------------------------------------------------<
>
>   Jouk Jansen
>
>   joukj@hrem.nano.tudelft.nl
>
>   Technische Universiteit Delft        tttttttttt  uu     uu  ddddddd
>   Kavli Institute of Nanoscience       tttttttttt  uu     uu  dd    dd
>   Nationaal centrum voor HREM              tt      uu     uu  dd     dd
>   Lorentzweg 1                             tt      uu     uu  dd     dd
>   2628 CJ Delft                            tt      uu     uu  dd     dd
>   Nederland                                tt      uu     uu  dd    dd
>   tel. 31-15-2782272                       tt       uuuuuuu   ddddddd
>
> >------------------------------------------------------------------------------<
>

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

* Re: Problem creating cross-compiler
  2020-06-18 10:52 ` Jonathan Wakely
@ 2020-06-18 11:26   ` Kai Ruottu
  2020-06-18 11:46     ` Jonathan Wakely
  2020-06-18 11:52     ` Kai Ruottu
  0 siblings, 2 replies; 5+ messages in thread
From: Kai Ruottu @ 2020-06-18 11:26 UTC (permalink / raw)
  To: Jonathan Wakely, Jouk Jansen; +Cc: gcc-help

Jonathan Wakely via Gcc-help kirjoitti 18.6.2020 klo 13.52:
> On Thu, 18 Jun 2020 at 09:59, Jouk Jansen via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
>> Hi,
>>
>> I'm trying to build a cross-compiler which should be running on a Fedora 32
>> system building objects for a IA64-OpenVMS system. I'm running the
>> compilation on a "up-to-date" Fedora 32 system.
>>
>> What do I do wrong?
>>
>> ./configure --prefix=/home/joukj/openvms --exec-prefix=/home/joukj/openvms --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=ia64-hp-openvms
> Don't run configure in the source tree, see
> https://gcc.gnu.org/wiki/InstallingGCC
>
>
>> make
>>
>>
>> ...
>> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtt
>> i -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qu
>> al -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedan
>> tic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_
>> H  -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../.././gcc -I../.././gcc/build -I../
>> .././gcc/../include  -I../.././gcc/../libcpp/include  \
>>          -o build/genmodes.o ../.././gcc/genmodes.c
>> ./as: line 106: exec: -I: invalid option
> This means you don't have an assembler for the cross target.

I would guess this coming somehow from configuring in the source 
directory.  The 'genmodes'
executable is produced for the BUILD system so the 'as' required here 
would be the native one.
The './as' script is somehow broken.

What seems also to be missing is the prerequisite :

"In order to build GCC, the C standard library and headers must be 
present for all target variants
for which target libraries will be built (and not only the variant of 
the host C++ compiler)."

https://gcc.gnu.org/install/prerequisites.html

When there is no "--with-sysroot=<something>" to point to the required  
'ia64-hp-openvms'
target libraries and headers (the assumption nowadays being a separate 
$sysroot for the target
stuff), this mistake seems obvious.  The "prerequisites" talks about 
producing a native GCC but
just the same prerequisite is true for a cross GCC. People may have 
installed only the 64-bit libs
and headers but the GCC build tries to build also 32-bit stuff and needs 
32-bit libs and headers
in this task.

The same "--with-sysroot=<something>" is required in the binutils 
configure to tell the target
linker where the target libraries are.


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

* Re: Problem creating cross-compiler
  2020-06-18 11:26   ` Kai Ruottu
@ 2020-06-18 11:46     ` Jonathan Wakely
  2020-06-18 11:52     ` Kai Ruottu
  1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Wakely @ 2020-06-18 11:46 UTC (permalink / raw)
  To: Kai Ruottu; +Cc: Jouk Jansen, gcc-help

On Thu, 18 Jun 2020 at 12:26, Kai Ruottu <kai.ruottu@wippies.com> wrote:
>
> Jonathan Wakely via Gcc-help kirjoitti 18.6.2020 klo 13.52:
> > On Thu, 18 Jun 2020 at 09:59, Jouk Jansen via Gcc-help
> > <gcc-help@gcc.gnu.org> wrote:
> >> Hi,
> >>
> >> I'm trying to build a cross-compiler which should be running on a Fedora 32
> >> system building objects for a IA64-OpenVMS system. I'm running the
> >> compilation on a "up-to-date" Fedora 32 system.
> >>
> >> What do I do wrong?
> >>
> >> ./configure --prefix=/home/joukj/openvms --exec-prefix=/home/joukj/openvms --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=ia64-hp-openvms
> > Don't run configure in the source tree, see
> > https://gcc.gnu.org/wiki/InstallingGCC
> >
> >
> >> make
> >>
> >>
> >> ...
> >> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtt
> >> i -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qu
> >> al -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedan
> >> tic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_
> >> H  -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../.././gcc -I../.././gcc/build -I../
> >> .././gcc/../include  -I../.././gcc/../libcpp/include  \
> >>          -o build/genmodes.o ../.././gcc/genmodes.c
> >> ./as: line 106: exec: -I: invalid option
> > This means you don't have an assembler for the cross target.
>
> I would guess this coming somehow from configuring in the source
> directory.  The 'genmodes'
> executable is produced for the BUILD system so the 'as' required here
> would be the native one.
> The './as' script is somehow broken.

And the way it's broken is that one of the variables like
ORIGINAL_AS_FOR_TARGET is empty, meaning that trying to exec it fails.
And the usual way that happens is that the assembler (or linker, or
nm) is not found during configure.

Look in the gcc/as script in the build tree, and see if
ORIGINAL_AS_FOR_TARGET is set correctly. If not, look at the logs
generated by the configure step (probably the gcc/config.log one) and
look for the results related to the assembler.

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

* Re: Problem creating cross-compiler
  2020-06-18 11:26   ` Kai Ruottu
  2020-06-18 11:46     ` Jonathan Wakely
@ 2020-06-18 11:52     ` Kai Ruottu
  1 sibling, 0 replies; 5+ messages in thread
From: Kai Ruottu @ 2020-06-18 11:52 UTC (permalink / raw)
  To: Jonathan Wakely, Jouk Jansen; +Cc: gcc-help

Kai Ruottu kirjoitti 18.6.2020 klo 14.26:
> What seems also to be missing is the prerequisite :
>
> "In order to build GCC, the C standard library and headers must be 
> present for all target variants
> for which target libraries will be built (and not only the variant of 
> the host C++ compiler)."
>
> https://gcc.gnu.org/install/prerequisites.html
>
> When there is no "--with-sysroot=<something>" to point to the 
> required  'ia64-hp-openvms'
> target libraries and headers (the assumption nowadays being a separate 
> $sysroot for the target
> stuff), this mistake seems obvious.
>
If one hasn't a 'ia64-hp-openvms' target system (like me) where to copy 
the target stuff, there is a serious
problem :(  Here is one advice for solving this issue :

https://sourceforge.net/p/gnv/mailman/message/33596356/

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

end of thread, other threads:[~2020-06-18 11:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18  8:48 Problem creating cross-compiler Jouk Jansen
2020-06-18 10:52 ` Jonathan Wakely
2020-06-18 11:26   ` Kai Ruottu
2020-06-18 11:46     ` Jonathan Wakely
2020-06-18 11:52     ` Kai Ruottu

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).