Skip to content

'make' fails to compile on Ubuntu 18.04/Debian 10 #1070

@mattray

Description

@mattray

Version:

make 4.2.1 fails to compile on Ubuntu 18.04 and Debian 10 because of the following issue:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891365

It appears that the Habitat make has patches applied to it, the comments appear to reference the same issue.
https://bldr.habitat.sh/#/pkgs/core/make/4.2.1/20190115013626

Log

gcc  -I/opt/omnibus-toolchain/embedded/include -O2 -Wl,--export-dynamic -Wl,-rpath,/opt/omnibus-toolchain/embedded/lib -L/opt/omnibus-toolchain/embedded/lib -o make ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o guile.o implicit.o job.o load.o loadapi.o main.o misc.o posixos.o output.o read.o remake.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o remote-stub.o glob/libglob.a   -ldl 
make[2]: Leaving directory '/var/cache/omnibus/src/make/make-4.2.1'
make[1]: Leaving directory '/var/cache/omnibus/src/make/make-4.2.1'

Error:

    glob.c: In function ‘glob’:
glob.c:581:23: warning: implicit declaration of function ‘__alloca’; did you mean ‘alloca’? [-Wimplicit-function-declaration]
       newp = (char *) __alloca (dirlen + 1);
                       ^~~~~~~~
                       alloca
glob.c:814:11: warning: implicit declaration of function ‘__stat’; did you mean ‘__xstat’? [-Wimplicit-function-declaration]
         : __stat (dirname, &st)) == 0
           ^~~~~~
           __xstat
ar: `u' modifier ignored since `D' is the default (see `U')
/usr/bin/ld: glob/libglob.a(glob.o): in function `glob_in_dir':
glob.c:(.text+0x26c): undefined reference to `__alloca'
/usr/bin/ld: glob.c:(.text+0x484): undefined reference to `__alloca'
/usr/bin/ld: glob.c:(.text+0x50c): undefined reference to `__alloca'
/usr/bin/ld: glob.c:(.text+0x684): undefined reference to `__alloca'
/usr/bin/ld: glob/libglob.a(glob.o): in function `glob64':
glob.c:(.text+0x920): undefined reference to `__alloca'
/usr/bin/ld: glob/libglob.a(glob.o):glob.c:(.text+0xef8): more undefined references to `__alloca' follow
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:656: make] Error 1
make[1]: *** [Makefile:798: all-recursive] Error 1
make: *** [Makefile:534: all] Error 2

/home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/util.rb:139:in `rescue in shellout!'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/util.rb:134:in `shellout!'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:870:in `shellout!'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:85:in `block in command'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:1060:in `instance_eval'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:1060:in `run'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:888:in `block (3 levels) in execute'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:910:in `with_retries'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:887:in `block (2 levels) in execute'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/instrumentation.rb:23:in `measure'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:886:in `block in execute'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:961:in `with_clean_env'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:885:in `execute'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:777:in `block (2 levels) in build'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:776:in `each'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:776:in `block in build'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/instrumentation.rb:23:in `measure'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/builder.rb:775:in `build'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/software.rb:1199:in `execute_build'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/software.rb:1082:in `build_me'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/project.rb:1077:in `block (2 levels) in build'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/project.rb:1076:in `each'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/project.rb:1076:in `block in build'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/licensing.rb:62:in `block in create_incrementally'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/licensing.rb:57:in `tap'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/licensing.rb:57:in `create_incrementally'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/project.rb:1075:in `build'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/cli.rb:89:in `build'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/cli/base.rb:33:in `dispatch'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/lib/omnibus/cli.rb:42:in `execute!'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bundler/gems/omnibus-035cc8392be8/bin/omnibus:16:in `<top (required)>'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bin/omnibus:23:in `load'
  /home/omnibus/omnibus-toolchain/.bundle/ruby/2.6.0/bin/omnibus:23:in `<top (required)>'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `load'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/cli/exec.rb:28:in `run'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/cli.rb:463:in `exec'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/cli.rb:27:in `dispatch'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/cli.rb:18:in `start'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
  /home/omnibus/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
  /home/omnibus/.rbenv/versions/2.6.3/bin/bundle:23:in `load'
  /home/omnibus/.rbenv/versions/2.6.3/bin/bundle:23:in `<main>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions