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 from source error: `Did not find a new enough assembler` #739

Closed
JounQin opened this issue Jul 19, 2019 · 1 comment
Closed

build from source error: `Did not find a new enough assembler` #739

JounQin opened this issue Jul 19, 2019 · 1 comment

Comments

@JounQin
Copy link

@JounQin JounQin commented Jul 19, 2019

I'm using Homebrew to build a custom Formula now-cli:

require "language/node"

class NowCli < Formula
  desc "The command-line interface for Now"
  homepage "https://zeit.co/now"
  url "https://github.com/zeit/now-cli/archive/15.8.3.tar.gz"
  sha256 "3b6d0a75f41b9ade13d9990d06d137e17c8c6b9d9d5eedbe4b143c62b1460c0b"

  depends_on "nasm" => :build
  depends_on "node" => :build

  def install
    # don't run postinstall
    inreplace("package.json") { |s| s.gsub! /^.*"postinstall".*$/, "" }

    system "npm", "install", *Language::Node.local_npm_install_args
    system "npm", "run", "build"

    # Read the target node version from package.json
    target = IO.read("package.json").match(/\"(node\d+(\.\d+){2})-[^"]+\"/)[1]

    # This packages now-cli together with a patched version of node
    pkg_args = %W[
      --c=package.json
      --o=now
      --options=no-warnings
      --targets=#{target}
      --build
    ]
    system "node_modules/.bin/pkg", "bin/now.js", *pkg_args

    bin.install "now"
  end

  test do
    system "#{bin}/now", "init", "bash"
    assert_predicate testpath/"bash/index.sh", :exist?, "index.sh must exist"
    assert_predicate testpath/"bash/now.json", :exist?, "now.json must exist"
    assert_predicate testpath/"bash/README.md", :exist?, "README.md must exist"
    system "echo", "handler >> bash/index.sh"
    system "bash", "bash/index.sh"
  end
end

I've tried to add nasm or apngasm, but it does not work.

2019-07-19 10:53:03 +0800

node_modules/.bin/pkg
bin/now.js
--c=package.json
--o=now
--options=no-warnings
--targets=node10.4.1
--build

> pkg@4.3.8
> Building base binary from source:
  built-v10.4.1-macos-x64
> Cloning Node.js repository from GitHub...

> Checking out v10.4.1
> Applying patches
> Compiling Node.js from sources...
ERROR: Did not find a new enough assembler, install one or build with
       --openssl-no-asm.
       Please refer to BUILDING.md
> Error! Error: ./configure failed with code 1
    at ChildProcess.<anonymous> (/private/tmp/now-cli-20190719-96723-1qvw85q/now-cli-15.8.3/node_modules/pkg-fetch/lib-es5/spawn.js:73:23)
    at ChildProcess.emit (events.js:203:13)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:203:13)
    at Pipe.<anonymous> (net.js:588:12)

HOMEBREW_VERSION: 2.1.7-43-g203980a
ORIGIN: https://github.com/Homebrew/brew
HEAD: 203980ac5b8404034e538d44882a5590be5e6bae
Last commit: 9 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 0f55ed223ddedf2ed61e36f77db9521471dbec8f
Core tap last commit: 8 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CACHE: /Users/JounQin/Library/Caches/Homebrew
HOMEBREW_LOGS: /Users/JounQin/Library/Logs/Homebrew
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1001
Git: 2.22.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 12.0.1
macOS: 10.14.5-x86_64
CLT: 10.2.1.0.1.1554506761
Xcode: 10.2.1
CLT headers: 10.2.1.0.1.1554506761

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.14
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/opt/node/libexec/bin:/usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/nasm/bin:/usr/local/opt/node/bin:/usr/bin:/bin:/usr/sbin:/sbin
@JounQin JounQin mentioned this issue Jul 19, 2019
5 of 5 tasks complete
@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Aug 11, 2019

Not using this approach any more.

@JounQin JounQin closed this Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.