[Bug 395478] Re: /usr/include/gnu/stubs-32.h is missing

Sven 395478 at bugs.launchpad.net
Fri Dec 16 01:29:28 UTC 2011


Just ran into this error and agreeing with gpk. A useful error message
would have been helpful. Adding the one line stubs-32.h file proposed
above would fix the issue without compiler changes and improve the user
experience.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/395478

Title:
  /usr/include/gnu/stubs-32.h is missing

Status in “gcc-defaults” package in Ubuntu:
  Won't Fix

Bug description:
  Compiling even a trivial program with the gcc -m32 flag gives obscure
  error messages.

  Now, I understand that Ubuntu doesn't seem to want to support
  32-bit compiles on 64-bit systems.     I think that's a bad decision.

  But anyway, if you *don't* support the -m32 flag, it is a bug not to
  say so clearly.

  So, for instance, it is incorrect to allow these error messages to be
  produced:

  > In file included from /usr/include/features.h:354,
  >                  from /usr/include/stdio.h:28,
  >                  from test.c:1:
  > /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

  when you really should be producing the message
  "-m32: Sorry, we do not support 32-bit compilation on x86_64 systems."
  or
  "In file included from /usr/include/features.h:354:
  /usr/include/gnu/stubs-32.h": error: Sorry, we do not support 32-bit compiles on 64-bit Ubuntu."

  The latter message could be managed by simply having a 1-line version of
  stubs-32.h that contains an "#error" directive.

  Public confession of "wontfix" is good for the soul.   It helps people understand what is
  going on and prevents these things from being swept under the rug.

  This is not quite https://bugs.launchpad.net/bugs/117131

  
  P.S. Here's the code:

  #include <stdio.h>

  int main(int argc, char **argv)
  {
   long a = 10;
   int b = 3;
   fprintf(stderr, "%ld %d", a, b);
  }

  and here's the compilation:

  $ gcc -m32 test.c
  gcc -m32 test.c
  In file included from /usr/include/features.h:354,
                   from /usr/include/stdio.h:28,
                   from test.c:1:
  /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
  $

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/395478/+subscriptions




More information about the foundations-bugs mailing list