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

build tags/6.1.5 failed with ubuntu18.04 #164

Closed
zhanglinqiang opened this issue Jan 19, 2022 · 1 comment
Closed

build tags/6.1.5 failed with ubuntu18.04 #164

zhanglinqiang opened this issue Jan 19, 2022 · 1 comment

Comments

@zhanglinqiang
Copy link

Hello, I'm trying build tags/6.1.5 on aarch64 platform. Unfortunately, it failed. Can anyone help?

build env:

OS: Ubuntu 18.04.6 LTS
Paltform: aarch64
ruby: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [aarch64-linux]

Here is my build step.

apt-get install -y build-essential git ruby bundler ruby-dev bison flex autoconf automake zlib1g-dev libpq-dev libpcap0.8-dev libsqlite3-dev

mkdir -p /var/cache/omnibus
mkdir -p /opt/metasploit-framework

git config --global user.name "nobody"
git config --global user.email "nobody@mail.com"

git clone https://github.com/rapid7/metasploit-omnibus.git
cd metasploit-omnibus
git checkout tags/6.1.5 -b 6.1.5
rm -R local/cache/
git submodule update -i

bundle install --binstubs
bin/omnibus build metasploit-framework

build output:

root@6d633d3a8bde:~/metasploit-omnibus# bin/omnibus build metasploit-framework
                    [CLI] I | 2022-01-19T17:54:38+08:00 | Using config from 'omnibus.rb'
 [Software: config_guess] W | 2022-01-19T17:54:52+08:00 | Version master for software config_guess was not parseable. Comparison methods such as #satisfies? will not be available for this version.
Building metasploit-framework 6.1.10+20220119095438-1rapid7...
      [Software: bundler] I | 2022-01-19T17:54:52+08:00 | Resolving manifest entry for bundler
   [NullFetcher: bundler] I | 2022-01-19T17:54:52+08:00 | Fetching `bundler' (nothing to fetch)
[Software: metasploit-framework] I | 2022-01-19T17:54:52+08:00 | Resolving manifest entry for metasploit-framework
 [Software: config_guess] I | 2022-01-19T17:54:52+08:00 | Resolving manifest entry for config_guess
 [Software: config_guess] W | 2022-01-19T17:54:52+08:00 | Version master for software config_guess was not parseable. Comparison methods such as #satisfies? will not be available for this version.
 [Software: config_guess] W | 2022-01-19T17:54:52+08:00 | Version master for software config_guess was not parseable. Comparison methods such as #satisfies? will not be available for this version.
[Software: metasploit-framework] W | 2022-01-19T17:54:52+08:00 | Version master for software metasploit-framework was not parseable. Comparison methods such as #satisfies? will not be available for this version.
[Software: metasploit-framework] W | 2022-01-19T17:54:52+08:00 | Version master for software metasploit-framework was not parseable. Comparison methods such as #satisfies? will not be available for this version.
      [Software: pcaprub] I | 2022-01-19T17:54:52+08:00 | Resolving manifest entry for pcaprub
   [NullFetcher: pcaprub] I | 2022-01-19T17:54:52+08:00 | Fetching `pcaprub' (nothing to fetch)
[Software: metasploit-framework-wrappers] I | 2022-01-19T17:54:52+08:00 | Resolving manifest entry for metasploit-framework-wrappers
[NullFetcher: metasploit-framework-wrappers] I | 2022-01-19T17:54:52+08:00 | Fetching `metasploit-framework-wrappers' (nothing to fetch)
         [Software: zlib] I | 2022-01-19T17:54:52+08:00 | Resolving manifest entry for zlib
      [Software: cacerts] I | 2022-01-19T17:54:52+08:00 | Resolving manifest entry for cacerts
      [Software: openssl] I | 2022-01-19T17:54:52+08:00 | Resolving manifest entry for openssl
      [Software: libtool] I | 2022-01-19T17:54:52+08:00 | Resolving manifest entry for libtool
       [Software: libffi] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for libffi
      [Software: libyaml] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for libyaml
     [Software: jemalloc] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for jemalloc
         [Software: ruby] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for ruby
     [Software: rubygems] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for rubygems
      [Software: libpcap] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for libpcap
      [Software: liblzma] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for liblzma
      [Software: libxml2] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for libxml2
      [Software: libxslt] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for libxslt
      [Software: ncurses] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for ncurses
      [Software: libedit] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for libedit
      [Software: libuuid] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for libuuid
   [Software: postgresql] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for postgresql
       [Software: sqlite] I | 2022-01-19T17:54:53+08:00 | Resolving manifest entry for sqlite
              [Licensing] W | 2022-01-19T17:55:20+08:00 | Project 'metasploit-framework' does not contain licensing information.
 [Software: config_guess] W | 2022-01-19T17:55:20+08:00 | Version master for software config_guess was not parseable. Comparison methods such as #satisfies? will not be available for this version.
[Software: metasploit-framework] W | 2022-01-19T17:55:20+08:00 | Version master for software metasploit-framework was not parseable. Comparison methods such as #satisfies? will not be available for this version.
              [Licensing] I | 2022-01-19T17:55:20+08:00 | Software 'config_guess' uses license 'GPL-3.0 (with exception)' which is not one of the standard licenses identified in https://opensource.org/licenses/alphabetical. Consider using one of the standard licenses.
              [Licensing] W | 2022-01-19T17:55:20+08:00 | Software 'jemalloc' does not contain licensing information.
              [Licensing] W | 2022-01-19T17:55:20+08:00 | Software 'libpcap' does not contain licensing information.
              [Licensing] W | 2022-01-19T17:55:20+08:00 | Software 'pcaprub' does not contain licensing information.
              [Licensing] W | 2022-01-19T17:55:20+08:00 | Software 'sqlite' does not contain licensing information.
              [Licensing] W | 2022-01-19T17:55:20+08:00 | Software 'metasploit-framework' does not contain licensing information.
              [Licensing] W | 2022-01-19T17:55:20+08:00 | Software 'metasploit-framework-wrappers' does not contain licensing information.
         [Software: zlib] I | 2022-01-19T17:55:20+08:00 | Restored from cache
      [Software: cacerts] I | 2022-01-19T17:55:20+08:00 | Restored from cache
      [Software: openssl] I | 2022-01-19T17:55:20+08:00 | Restored from cache
 [Software: config_guess] W | 2022-01-19T17:55:20+08:00 | Version master for software config_guess was not parseable. Comparison methods such as #satisfies? will not be available for this version.
 [Software: config_guess] W | 2022-01-19T17:55:20+08:00 | Version master for software config_guess was not parseable. Comparison methods such as #satisfies? will not be available for this version.
 [Software: config_guess] I | 2022-01-19T17:55:20+08:00 | Restored from cache
      [Software: libtool] I | 2022-01-19T17:55:20+08:00 | Restored from cache
       [Software: libffi] I | 2022-01-19T17:55:20+08:00 | Restored from cache
      [Software: libyaml] I | 2022-01-19T17:55:20+08:00 | Restored from cache
     [Software: jemalloc] I | 2022-01-19T17:55:20+08:00 | Restored from cache
         [Software: ruby] I | 2022-01-19T17:55:20+08:00 | Restored from cache
     [Software: rubygems] I | 2022-01-19T17:55:20+08:00 | Restored from cache
      [Software: bundler] I | 2022-01-19T17:55:20+08:00 | Forcing a build because resolved version is nil
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 | Starting build
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 | Environment:
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 |   CFLAGS="-I/opt/metasploit-framework/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector"
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 |   CPPFLAGS="-I/opt/metasploit-framework/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector"
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 |   CXXFLAGS="-I/opt/metasploit-framework/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector"
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 |   LDFLAGS="-Wl,-rpath,/opt/metasploit-framework/embedded/lib -L/opt/metasploit-framework/embedded/lib"
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 |   LD_RUN_PATH="/opt/metasploit-framework/embedded/lib"
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 |   OMNIBUS_INSTALL_DIR="/opt/metasploit-framework"
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 |   PATH="/opt/metasploit-framework/bin:/opt/metasploit-framework/embedded/bin:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 |   PKG_CONFIG_PATH="/opt/metasploit-framework/embedded/lib/pkgconfig"
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 | $ /opt/metasploit-framework/embedded/bin/gem install bundler --force --no-document
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 | gem `install bundler --force --no-document': 0.0107s
       [Builder: bundler] I | 2022-01-19T17:55:20+08:00 | Build bundler: 0.0116s
Traceback (most recent call last):
	42: from bin/omnibus:29:in `<main>'
	41: from bin/omnibus:29:in `load'
	40: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/bin/omnibus:16:in `<top (required)>'
	39: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/cli.rb:42:in `execute!'
	38: from /usr/local/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
	37: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/cli/base.rb:33:in `dispatch'
	36: from /usr/local/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	35: from /usr/local/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	34: from /usr/local/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	33: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/cli.rb:89:in `build'
	32: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/project.rb:1095:in `build'
	31: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/licensing.rb:57:in `create_incrementally'
	30: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/licensing.rb:57:in `tap'
	29: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/licensing.rb:62:in `block in create_incrementally'
	28: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/project.rb:1096:in `block in build'
	27: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/project.rb:1096:in `each'
	26: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/project.rb:1097:in `block (2 levels) in build'
	25: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/software.rb:1107:in `build_me'
	24: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/software.rb:1235:in `execute_build'
	23: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:776:in `build'
	22: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/instrumentation.rb:23:in `measure'
	21: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:777:in `block in build'
	20: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:777:in `each'
	19: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:778:in `block (2 levels) in build'
	18: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:886:in `execute'
	17: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:962:in `with_clean_env'
	16: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:887:in `block in execute'
	15: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/instrumentation.rb:23:in `measure'
	14: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:888:in `block (2 levels) in execute'
	13: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:911:in `with_retries'
	12: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:889:in `block (3 levels) in execute'
	11: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:1061:in `run'
	10: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:1061:in `instance_eval'
	 9: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:335:in `block in gem'
	 8: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/builder.rb:871:in `shellout!'
	 7: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/util.rb:135:in `shellout!'
	 6: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/omnibus-5996840b384c/lib/omnibus/util.rb:119:in `shellout'
	 5: from /usr/local/lib/ruby/gems/2.7.0/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout.rb:270:in `run_command'
	 4: from /usr/local/lib/ruby/gems/2.7.0/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:97:in `run_command'
	 3: from /usr/local/lib/ruby/gems/2.7.0/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:321:in `fork_subprocess'
	 2: from /usr/local/lib/ruby/gems/2.7.0/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:321:in `fork'
	 1: from /usr/local/lib/ruby/gems/2.7.0/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:343:in `block in fork_subprocess'
/usr/local/lib/ruby/gems/2.7.0/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:343:in `exec': No such file or directory - /opt/metasploit-framework/embedded/bin/gem (Errno::ENOENT)

other info:

root@6d633d3a8bde:~/metasploit-omnibus# ll /opt/metasploit-framework/
total 0
drwxr-xr-x 4 root root 43 Jan 19 17:55 ./
drwxr-xr-x 1 root root 34 Jan 19 17:55 ../
drwxr-xr-x 2 root root 22 Jan 19 17:55 LICENSES/
drwxr-xr-x 2 root root 22 Jan 19 17:55 license-cache/
root@6d633d3a8bde:~/metasploit-omnibus# ll /var/cache/omnibus/
total 0
drwxrwxrwx 2 root root   6 Jan 19 17:14 ./
drwxr-xr-x 1 root root 110 Jan 19 17:14 ../
root@6d633d3a8bde:~/metasploit-omnibus# 

@zhanglinqiang
Copy link
Author

The problem seems to be that my first build fails due to missing dependencies, resulting in a temporary cache file that causes the build program to skip some build steps.

After remove "local/cache/git_cache" folder and rebuild worked.

rm -rf local/cache/git_cache/

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

1 participant