gcc -m32 can't find stubs-32.h

  • Open
  • quality assurance status badge
Details
4 participants
  • Clément Lassieur
  • David Larsson
  • Ludovic Courtès
  • Ricardo Wurmus
Owner
unassigned
Submitted by
David Larsson
Severity
normal
D
D
David Larsson wrote on 7 Jul 2018 20:55
gcc -m32 can't find stubs-32.h
(address . bug-guix@gnu.org)
alpine.LNX.2.21.999.1807072049420.7900@localhost
I tried to run gcc to compile a simple c program which fails:

gcc -m32 -o m32test m32test.c
In file included from /home/user1/.guix-profile/include/features.h:388,
from /home/user1/.guix-profile/include/stdio.h:27,
from m32test.c:2:
/home/user1/.guix-profile/include/gnu/stubs.h:7:11: fatal error:
gnu/stubs-32.h: No such file or directory
# include <gnu/stubs-32.h>
^~~~~~~~~~~~~~~~
compilation terminated.

with -m64 it compiles correctly. In ~/.guix-profile/include/gnu/ I have
the files:

libc-version.h
lib-names-64.h
lib-names.h
stubs-64.h
stubs.h

Expected result is that it silently works.

--
Best Regards
David L
R
R
Ricardo Wurmus wrote on 10 Jul 2018 13:21
Re: bug#32087: gcc -m32 can't find stubs-32.h
(name . David Larsson)(address . david.larsson@selfhosted.xyz)(address . 32087@debbugs.gnu.org)
878t6js5do.fsf@elephly.net
David Larsson <david.larsson@selfhosted.xyz> writes:

Toggle quote (2 lines)
> I tried to run gcc to compile a simple c program which fails:

Are you using the “gcc-toolchain” package?

--
Ricardo
C
C
Clément Lassieur wrote on 10 Jul 2018 13:45
(name . Ricardo Wurmus)(address . rekado@elephly.net)
87va9nmi0l.fsf@lassieur.org
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (6 lines)
> David Larsson <david.larsson@selfhosted.xyz> writes:
>
>> I tried to run gcc to compile a simple c program which fails:
>
> Are you using the “gcc-toolchain” package?

I reproduce that bug with gcc-toolchain.
R
R
Ricardo Wurmus wrote on 10 Jul 2018 15:40
(name . Clément Lassieur)(address . clement@lassieur.org)
87601nryyo.fsf@elephly.net
Clément Lassieur <clement@lassieur.org> writes:

Toggle quote (10 lines)
> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> David Larsson <david.larsson@selfhosted.xyz> writes:
>>
>>> I tried to run gcc to compile a simple c program which fails:
>>
>> Are you using the “gcc-toolchain” package?
>
> I reproduce that bug with gcc-toolchain.

If you’re trying to compile for i686, should you not be using the i686
variant of gcc-toolchain? You can build it with

guix build --system=i686-linux gcc-toolchain

(I don’t really know much about this, but we don’t build GCC with
multilib support.)

--
Ricardo
C
C
Clément Lassieur wrote on 10 Jul 2018 16:13
(name . Ricardo Wurmus)(address . rekado@elephly.net)
87r2kbmb51.fsf@lassieur.org
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (17 lines)
> Clément Lassieur <clement@lassieur.org> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> David Larsson <david.larsson@selfhosted.xyz> writes:
>>>
>>>> I tried to run gcc to compile a simple c program which fails:
>>>
>>> Are you using the “gcc-toolchain” package?
>>
>> I reproduce that bug with gcc-toolchain.
>
> If you’re trying to compile for i686, should you not be using the i686
> variant of gcc-toolchain? You can build it with
>
> guix build --system=i686-linux gcc-toolchain

How would you install that variant?

Toggle quote (3 lines)
> (I don’t really know much about this, but we don’t build GCC with
> multilib support.)

This option is in the gcc manual that we package, so I think it should
be supported.
L
L
Ludovic Courtès wrote on 10 Jul 2018 19:40
(name . Clément Lassieur)(address . clement@lassieur.org)
8736wrq99z.fsf@gnu.org
Hello,

Clément Lassieur <clement@lassieur.org> skribis:

Toggle quote (21 lines)
> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Clément Lassieur <clement@lassieur.org> writes:
>>
>>> Ricardo Wurmus <rekado@elephly.net> writes:
>>>
>>>> David Larsson <david.larsson@selfhosted.xyz> writes:
>>>>
>>>>> I tried to run gcc to compile a simple c program which fails:
>>>>
>>>> Are you using the “gcc-toolchain” package?
>>>
>>> I reproduce that bug with gcc-toolchain.
>>
>> If you’re trying to compile for i686, should you not be using the i686
>> variant of gcc-toolchain? You can build it with
>>
>> guix build --system=i686-linux gcc-toolchain
>
> How would you install that variant?

Currently you’d have to do:

guix package -i `guix build -s i686-linux gcc-toolchain`

which is not ideal.

Toggle quote (6 lines)
>> (I don’t really know much about this, but we don’t build GCC with
>> multilib support.)
>
> This option is in the gcc manual that we package, so I think it should
> be supported.

Yeah. The problem is that currently we don’t build glibc with multilib
support. Something for the next ‘core-updates’ cycle if you feel like
working on it! :-)

Ludo’.
C
C
Clément Lassieur wrote on 10 Jul 2018 21:54
(name . Ludovic Courtès)(address . ludo@gnu.org)
87muuyn9x2.fsf@lassieur.org
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (4 lines)
> Yeah. The problem is that currently we don’t build glibc with multilib
> support. Something for the next ‘core-updates’ cycle if you feel like
> working on it! :-)

I can't work on it and I also don't need it at all. I'm just confirming
what David says :-)
?