bugmake - Bugs: bug #53597, Cross-compilation fails on...


bug #53597: Cross-compilation fails on GNU/Linux with GNU libc 2.27

Submitted by:  None
Submitted on:  Mon 09 Apr 2018 09:44:05 PM UTC  
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  Paul D. Smith <psmith> Open/Closed:  Closed
Component Version:  4.2.1 Operating System:  POSIX-Based
Fixed Release:  4.3 Triage Status:  None

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 04 Aug 2018 05:59:05 PM UTC, comment #2: 

Thanks Martin; closing as fixed.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Mon 09 Apr 2018 09:58:52 PM UTC, comment #1: 

This old chestnut again, for the second time in as many weeks?  The patch that closed the previous round was in:


The TL;DR from elsewhere in the thread was that building from make's git source will work and "It does look like we need to make a new release soon".

Martin Dorey <mdorey>
Mon 09 Apr 2018 09:44:05 PM UTC, original submission:  

I don't know whether this bug is triggered on all cross-compilation scenarios (or indeed on native-compilation scenarios), because I haven't tried many. However, when doing a armv7l-unknown-linux-gnueabihf to x86_64-unknown-linux-gnu build using glibc 2.27, gcc 7.3.0, binutils 2.30, I get a compilation error when linking libglob.a:

glob/libglob.a(glob.o): In function `glob':
glob.c:(.text+0x53a): undefined reference to `__alloca'
glob.c:(.text+0x75b): undefined reference to `__alloca'
glob.c:(.text+0x7fc): undefined reference to `__alloca'
glob.c:(.text+0x8de): undefined reference to `__alloca'
glob/libglob.a(glob.o): In function `glob_in_dir':
glob.c:(.text+0x1756): undefined reference to `__alloca'
glob/libglob.a(glob.o):glob.c:(.text+0x1831): more undefined references to `__alloca' follow
collect2: error: ld returned 1 exit status
Makefile:655: recipe for target 'make' failed
make[2]: *** [make] Error 1
make[2]: Leaving directory '/media/random/ws/WS/build/make-4.2.1'
Makefile:798: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/media/random/ws/WS/build/make-4.2.1'
Makefile:534: recipe for target 'all' failed
make: *** [all] Error 2

This appears to be caused by a change in the preprocessor symbols that are defined when using glibc 2.27. I'm able to work around it trivially by using the attached patch, but I don't know if this is a good approach to correct the issue.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by mdorey (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-04 psmith Assigned toNone => psmith
        Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.3
    2018-08-04 psmith StatusNone => Fixed
    2018-04-09 None Attached File- => Added make-4.2.1-alloca-glibc-2.27-fix-1.patch, #43860

    Back to the top

    Powered by Savane 3.7