Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mattray opened this issue Jul 4, 2019 · 2 comments · Fixed by #1071
Open

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

mattray opened this issue Jul 4, 2019 · 2 comments · Fixed by #1071

Comments

@mattray
Copy link
Contributor

mattray commented Jul 4, 2019

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>'
@tduffield
Copy link
Contributor

Since we needed to revert the associated commit, I am going to re-open this issue.

Release Engineering is also tracking an internal card to see what the best way to move forward with this.

@tduffield tduffield reopened this Aug 23, 2019
@rjhornsby
Copy link

AFAICT, the same issue is happening on CentOS 8. Poking around a bit, I've found two different options to deal with it. There may be others, just what I came up with so far specifically on CentOS 8, may work elsewhere.

  • make 4.3 does not seem to have this issue
  • RHEL/CentOS 8 supplies make 4.2.1, so they must have compiled it somehow. Digging into the source RPM, looks like they're applying 3 related patches before compiling and building the RPM. Snippet from the spec file:
# Upstream patch: https://git.savannah.gnu.org/cgit/make.git/patch/?id=193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4
# Fixes wrong assumptions of glibc's glob internals.
Patch5: make-4.2.1-glob-fix-2.patch
# Upstream patch: https://git.savannah.gnu.org/cgit/make.git/patch/?id=48c8a116a914a325a0497721f5d8b58d5bba34d4
# Fixes incorrect use of glibc 2.27 glob internals.
Patch6: make-4.2.1-glob-fix.patch
Patch7: make-4.2.1-glob-fix-3.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants