public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problems building gcc
@ 2024-02-06 17:36 T Rex
  2024-02-06 19:22 ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: T Rex @ 2024-02-06 17:36 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

Good morning everyone,

I am compiling gcc-13.2 with the following configuration,

./configure --disable-multilib --enable-languages=c,c++ --enable-multiarch
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--enable-deterministic-archives --disable-bootstrap --enable-default-pie
--enable-default-ssp --disable-libssp --enable-linker-build-id
--disable-libstdcxx-filesystem-ts --enable-shared
--prefix=/home/runner/work/gcc/gcc/builds

and the process is successful. But when reviewing the include directory, it
is empty, with only the g++ directory and its contents, I would like all
the files necessary for the compiler to be in the folder. I don't know if
it's a configuration error or something additional needs to be done.

(this is a translation)

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

* Re: Problems building gcc
  2024-02-06 17:36 Problems building gcc T Rex
@ 2024-02-06 19:22 ` Jonathan Wakely
       [not found]   ` <CAGmGLoh+Pbo9G9=1sDRXyHTV7-_CkPDOw+JWppn1TuVRXnszcA@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2024-02-06 19:22 UTC (permalink / raw)
  To: T Rex; +Cc: gcc-help

On Tue, 6 Feb 2024 at 17:38, T Rex via Gcc-help <gcc-help@gcc.gnu.org> wrote:
>
> Good morning everyone,
>
> I am compiling gcc-13.2 with the following configuration,
>
> ./configure

Don't run configure in the source directory. See
https://gcc.gnu.org/wiki/InstallingGCC

> --disable-multilib --enable-languages=c,c++ --enable-multiarch
> --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
> --enable-deterministic-archives --disable-bootstrap --enable-default-pie
> --enable-default-ssp --disable-libssp --enable-linker-build-id
> --disable-libstdcxx-filesystem-ts --enable-shared
> --prefix=/home/runner/work/gcc/gcc/builds
>
> and the process is successful. But when reviewing the include directory, it

Which include directory?

> is empty, with only the g++ directory and its contents, I would like all

Do you mean c++ directory?

> the files necessary for the compiler to be in the folder. I don't know if
> it's a configuration error or something additional needs to be done.

Which files are you expecting to be there?

The C library headers are not part of GCC, they are already installed
elsewhere, like /usr/include

And many of GCC's headers will be under
$prefix/lib/gcc/x86_64-pc-linux-gnu/13.2.0/include

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

* Fwd: Problems building gcc
       [not found]   ` <CAGmGLoh+Pbo9G9=1sDRXyHTV7-_CkPDOw+JWppn1TuVRXnszcA@mail.gmail.com>
@ 2024-02-06 22:35     ` T Rex
  2024-02-07  7:33       ` Jonathan Wakely
  2024-02-07  8:56       ` Fwd: " David Brown
  0 siblings, 2 replies; 6+ messages in thread
From: T Rex @ 2024-02-06 22:35 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]

Thanks for the reply.

What I need are all the files that are in /usr/include, at the
$prefix/include location. I'm building a package for flatpak and I need
everything that gcc uses and makes it work to be contained in the directory
specified by $prefix. I was thinking about simply copying it from the
system but it seems to me that it's not the right thing to do and maybe it
won't work.

El mar, 6 feb 2024 a la(s) 2:22 p.m., Jonathan Wakely (jwakely.gcc@gmail.com)
escribió:

> On Tue, 6 Feb 2024 at 17:38, T Rex via Gcc-help <gcc-help@gcc.gnu.org>
> wrote:
> >
> > Good morning everyone,
> >
> > I am compiling gcc-13.2 with the following configuration,
> >
> > ./configure
>
> Don't run configure in the source directory. See
> https://gcc.gnu.org/wiki/InstallingGCC
>
> > --disable-multilib --enable-languages=c,c++ --enable-multiarch
> > --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
> > --enable-deterministic-archives --disable-bootstrap --enable-default-pie
> > --enable-default-ssp --disable-libssp --enable-linker-build-id
> > --disable-libstdcxx-filesystem-ts --enable-shared
> > --prefix=/home/runner/work/gcc/gcc/builds
> >
> > and the process is successful. But when reviewing the include directory,
> it
>
> Which include directory?
>
> > is empty, with only the g++ directory and its contents, I would like all
>
> Do you mean c++ directory?
>
> > the files necessary for the compiler to be in the folder. I don't know if
> > it's a configuration error or something additional needs to be done.
>
> Which files are you expecting to be there?
>
> The C library headers are not part of GCC, they are already installed
> elsewhere, like /usr/include
>
> And many of GCC's headers will be under
> $prefix/lib/gcc/x86_64-pc-linux-gnu/13.2.0/include
>

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

* Re: Problems building gcc
  2024-02-06 22:35     ` Fwd: " T Rex
@ 2024-02-07  7:33       ` Jonathan Wakely
  2024-02-07  8:56       ` Fwd: " David Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2024-02-07  7:33 UTC (permalink / raw)
  To: T Rex; +Cc: gcc-help

[-- Attachment #1: Type: text/plain, Size: 2291 bytes --]

On Tue, 6 Feb 2024, 22:36 T Rex via Gcc-help, <gcc-help@gcc.gnu.org> wrote:

> Thanks for the reply.
>
> What I need are all the files that are in /usr/include, at the
> $prefix/include location. I'm building a package for flatpak and I need
> everything that gcc uses and makes it work to be contained in the directory
> specified by $prefix.


GCC doesn't own or install those headers though. It also uses libc.so.6 and
it doesn't own that either.

A flatpak GCC would need to depend on a runtime that provides those files.
This will be complicated to build.

I was thinking about simply copying it from the
> system but it seems to me that it's not the right thing to do and maybe it
> won't work.
>

Correct, it probably won't.



> El mar, 6 feb 2024 a la(s) 2:22 p.m., Jonathan Wakely (
> jwakely.gcc@gmail.com)
> escribió:
>
> > On Tue, 6 Feb 2024 at 17:38, T Rex via Gcc-help <gcc-help@gcc.gnu.org>
> > wrote:
> > >
> > > Good morning everyone,
> > >
> > > I am compiling gcc-13.2 with the following configuration,
> > >
> > > ./configure
> >
> > Don't run configure in the source directory. See
> > https://gcc.gnu.org/wiki/InstallingGCC
> >
> > > --disable-multilib --enable-languages=c,c++ --enable-multiarch
> > > --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
> > > --enable-deterministic-archives --disable-bootstrap
> --enable-default-pie
> > > --enable-default-ssp --disable-libssp --enable-linker-build-id
> > > --disable-libstdcxx-filesystem-ts --enable-shared
> > > --prefix=/home/runner/work/gcc/gcc/builds
> > >
> > > and the process is successful. But when reviewing the include
> directory,
> > it
> >
> > Which include directory?
> >
> > > is empty, with only the g++ directory and its contents, I would like
> all
> >
> > Do you mean c++ directory?
> >
> > > the files necessary for the compiler to be in the folder. I don't know
> if
> > > it's a configuration error or something additional needs to be done.
> >
> > Which files are you expecting to be there?
> >
> > The C library headers are not part of GCC, they are already installed
> > elsewhere, like /usr/include
> >
> > And many of GCC's headers will be under
> > $prefix/lib/gcc/x86_64-pc-linux-gnu/13.2.0/include
> >
>

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

* Re: Fwd: Problems building gcc
  2024-02-06 22:35     ` Fwd: " T Rex
  2024-02-07  7:33       ` Jonathan Wakely
@ 2024-02-07  8:56       ` David Brown
  2024-02-07 13:25         ` T Rex
  1 sibling, 1 reply; 6+ messages in thread
From: David Brown @ 2024-02-07  8:56 UTC (permalink / raw)
  To: T Rex, gcc-help


On 06/02/2024 23:35, T Rex via Gcc-help wrote:
> Thanks for the reply.
> 
> What I need are all the files that are in /usr/include, at the
> $prefix/include location. I'm building a package for flatpak and I need
> everything that gcc uses and makes it work to be contained in the directory
> specified by $prefix. I was thinking about simply copying it from the
> system but it seems to me that it's not the right thing to do and maybe it
> won't work.
> 


Some resources you might find helpful here are :

<https://crosstool-ng.github.io/>
<https://github.com/crazychenz/x-tools>

Although the "crosstools" project was primarily created for building 
cross-compiler toolchains, it works perfectly well when the target 
system is the same as the host system.  The aim is a complete toolchain, 
including include files, library, assembler, linker, compiler, and so 
on.  I've found it useful for making updated static gcc toolchains for 
old Linux systems where the distro toolchains are older, and you don't 
want to face the complications of having a system glibc newer than the 
distro version supports.

David



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

* Re: Fwd: Problems building gcc
  2024-02-07  8:56       ` Fwd: " David Brown
@ 2024-02-07 13:25         ` T Rex
  0 siblings, 0 replies; 6+ messages in thread
From: T Rex @ 2024-02-07 13:25 UTC (permalink / raw)
  To: David Brown; +Cc: gcc-help, Jonathan Wakely

[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]

Thank you very much for the answers, I will continue searching to see what
I can find and what I can do.

El mié, 7 feb 2024 a la(s) 3:56 a.m., David Brown (david.brown@hesbynett.no)
escribió:

>
> On 06/02/2024 23:35, T Rex via Gcc-help wrote:
> > Thanks for the reply.
> >
> > What I need are all the files that are in /usr/include, at the
> > $prefix/include location. I'm building a package for flatpak and I need
> > everything that gcc uses and makes it work to be contained in the
> directory
> > specified by $prefix. I was thinking about simply copying it from the
> > system but it seems to me that it's not the right thing to do and maybe
> it
> > won't work.
> >
>
>
> Some resources you might find helpful here are :
>
> <https://crosstool-ng.github.io/>
> <https://github.com/crazychenz/x-tools>
>
> Although the "crosstools" project was primarily created for building
> cross-compiler toolchains, it works perfectly well when the target
> system is the same as the host system.  The aim is a complete toolchain,
> including include files, library, assembler, linker, compiler, and so
> on.  I've found it useful for making updated static gcc toolchains for
> old Linux systems where the distro toolchains are older, and you don't
> want to face the complications of having a system glibc newer than the
> distro version supports.
>
> David
>
>
>

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

end of thread, other threads:[~2024-02-07 13:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 17:36 Problems building gcc T Rex
2024-02-06 19:22 ` Jonathan Wakely
     [not found]   ` <CAGmGLoh+Pbo9G9=1sDRXyHTV7-_CkPDOw+JWppn1TuVRXnszcA@mail.gmail.com>
2024-02-06 22:35     ` Fwd: " T Rex
2024-02-07  7:33       ` Jonathan Wakely
2024-02-07  8:56       ` Fwd: " David Brown
2024-02-07 13:25         ` T Rex

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