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

Unable to compile make-4.1 as part of toolchain build on ubuntu 18.04 aarch64 #100

Open
dkowis opened this issue Nov 1, 2018 · 5 comments

Comments

@dkowis
Copy link

dkowis commented Nov 1, 2018

I've got a fresh ubuntu 18.04 installed on a Raspberry Pi running in 64-bit mode:

Linux dnspi.dark.kow.is 4.19.0+beepdog-v8+ #1 SMP PREEMPT Wed Oct 31 20:43:30 CDT 2018 aarch64 aarch64 aarch64 GNU/Linux

Google searching indicates that it's a compatibility problem with glibc I think: https://lists.nongnu.org/archive/html/bug-make/2017-11/msg00020.html, but this is kinda old, so I'm not sure that's the actual problem.

Error follows

mv -f .deps/read.Tpo .deps/read.Po
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 output.o read.o remake.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o rem
ote-stub.o glob/libglob.a   -ldl 
Makefile:620: recipe for target 'make' failed
make[2]: Leaving directory '/var/cache/omnibus/src/make/make-4.1'
Makefile:762: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/var/cache/omnibus/src/make/make-4.1'
Makefile:514: recipe for target 'all' failed

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:581:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       newp = (char *) __alloca (dirlen + 1);
              ^
glob.c:709:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        newp = (char *) __alloca (home_len + dirlen);
               ^
glob.c:732:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        newp = (char *) __alloca (end_name - dirname);
               ^
glob.c:783:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        newp = (char *) __alloca (home_len + rest_len + 1);
               ^
glob.c:814:11: warning: implicit declaration of function ‘__stat’; did you mean ‘__xstat’? [-Wimplicit-function-declaration]
         : __stat (dirname, &st)) == 0
           ^~~~~~
           __xstat
glob.c: In function ‘glob_in_dir’:
glob.c:1256:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    char *fullname = (char *) __alloca (dirlen + 1 + patlen + 1);
                     ^
glob.c:1283:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    names = (struct globlink *) __alloca (sizeof (struct globlink));
            ^
glob.c:1341:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         struct globlink *new = (struct globlink *)
                                ^
glob.c:1367:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       names = (struct globlink *) __alloca (sizeof (struct globlink));
               ^
ar: `u' modifier ignored since `D' is the default (see `U')
glob/libglob.a(glob.o): In function `glob_in_dir':
glob.c:(.text+0x2e0): undefined reference to `__alloca'
glob.c:(.text+0x3c8): undefined reference to `__alloca'
glob.c:(.text+0x4dc): undefined reference to `__alloca'
glob.c:(.text+0x54c): undefined reference to `__alloca'
glob/libglob.a(glob.o): In function `glob':
glob.c:(.text+0x984): undefined reference to `__alloca'
glob/libglob.a(glob.o):glob.c:(.text+0xc74): more undefined references to `__alloca' follow
collect2: error: ld returned 1 exit status
make[2]: *** [make] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
@dkowis
Copy link
Author

dkowis commented Nov 5, 2018

I also dug into trying to set the version to 4.2.1, the latest for make, to see if that would build. Haven't had success doing that either :( It tries to download from some amazon S3 url, and I couldn't figure out how to give it the upstream tarball location.

@dkowis
Copy link
Author

dkowis commented Mar 9, 2019

Sadly, still a problem with 4.2.1 on ubuntu aarch64:

Makefile:655: recipe for target 'make' failed
make[2]: Leaving directory '/var/cache/omnibus/src/make/make-4.2.1'
Makefile:798: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/var/cache/omnibus/src/make/make-4.2.1'
Makefile:534: recipe for target 'all' failed

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:581:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       newp = (char *) __alloca (dirlen + 1);
              ^
glob.c:709:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        newp = (char *) __alloca (home_len + dirlen);
               ^
glob.c:732:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        newp = (char *) __alloca (end_name - dirname);
               ^
glob.c:783:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        newp = (char *) __alloca (home_len + rest_len + 1);
               ^
glob.c:814:11: warning: implicit declaration of function '__stat'; did you mean '__xstat'? [-Wimplicit-function-declaration]
         : __stat (dirname, &st)) == 0
           ^~~~~~
           __xstat

@Rockstar04
Copy link

Can confirm. Trying to build with Ubuntu 18.04 on ARM.

mv -f .deps/read.Tpo .deps/read.Po
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
Makefile:655: recipe for target 'make' failed
make[2]: Leaving directory '/var/cache/omnibus/src/make/make-4.2.1'
Makefile:798: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/var/cache/omnibus/src/make/make-4.2.1'
Makefile:534: recipe for target 'all' failed

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:581:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       newp = (char *) __alloca (dirlen + 1);
              ^
glob.c:709:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        newp = (char *) __alloca (home_len + dirlen);
               ^
glob.c:732:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        newp = (char *) __alloca (end_name - dirname);
               ^
glob.c:783:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        newp = (char *) __alloca (home_len + rest_len + 1);
               ^
glob.c:814:11: warning: implicit declaration of function ‘__stat’; did you mean ‘__xstat’? [-Wimplicit-function-declaration]
         : __stat (dirname, &st)) == 0
           ^~~~~~
           __xstat
glob.c: In function ‘glob_in_dir’:
glob.c:1256:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    char *fullname = (char *) __alloca (dirlen + 1 + patlen + 1);
                     ^
glob.c:1283:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    names = (struct globlink *) __alloca (sizeof (struct globlink));
            ^
glob.c:1341:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         struct globlink *new = (struct globlink *)
                                ^
glob.c:1367:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       names = (struct globlink *) __alloca (sizeof (struct globlink));
               ^
ar: `u' modifier ignored since `D' is the default (see `U')
glob/libglob.a(glob.o): In function `glob_in_dir':
glob.c:(.text+0x2e0): undefined reference to `__alloca'
glob.c:(.text+0x3c8): undefined reference to `__alloca'
glob.c:(.text+0x4dc): undefined reference to `__alloca'
glob.c:(.text+0x54c): undefined reference to `__alloca'
glob/libglob.a(glob.o): In function `glob':
glob.c:(.text+0x984): undefined reference to `__alloca'
glob/libglob.a(glob.o):glob.c:(.text+0xc74): more undefined references to `__alloca' follow
collect2: error: ld returned 1 exit status
make[2]: *** [make] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


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

@YAMLcase
Copy link

What workaround or version are you all falling back to for a good build?

I'm getting the same issue on Raspbian Buster Pi 4
Linux raspberrypi 4.19.66-v7l+ armv7l GNU/Linux

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 jo
b.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

@dkowis
Copy link
Author

dkowis commented Sep 28, 2019

The only thing I've been able to do is apt install chef from the repo :(

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

No branches or pull requests

3 participants