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

Homebrew install fails #79

Closed
erwinmaza opened this issue May 22, 2018 · 6 comments
Closed

Homebrew install fails #79

erwinmaza opened this issue May 22, 2018 · 6 comments

Comments

@erwinmaza
Copy link
Contributor

Reproducible failure when trying to install via Homebrew.

(install via git clone, make succeeded)

> brew install SwagGen
==> Installing SwagGen from yonaskolb/swaggen
==> Downloading https://github.com/yonaskolb/SwagGen/archive/2.1.0.tar.gz
Already downloaded: /Users/erwin/Library/Caches/Homebrew/SwagGen-2.1.0.tar.gz
==> make install PREFIX=/usr/local/Cellar/SwagGen/2.1.0
Last 15 lines from /Users/erwin/Library/Logs/Homebrew/SwagGen/01.make:
Cloning https://github.com/kylef/PathKit.git
Resolving https://github.com/kylef/PathKit.git at 0.8.0
Cloning https://github.com/onevcat/Rainbow.git
Resolving https://github.com/onevcat/Rainbow.git at 2.1.0
Cloning https://github.com/kylef/Spectre.git
Resolving https://github.com/kylef/Spectre.git at 0.7.2
Cloning https://github.com/jpsim/Yams.git
Resolving https://github.com/jpsim/Yams.git at 0.5.0
Cloning https://github.com/yonaskolb/JSONUtilities.git
Resolving https://github.com/yonaskolb/JSONUtilities.git at 3.3.8
Cloning https://github.com/jakeheis/SwiftCLI
Resolving https://github.com/jakeheis/SwiftCLI at 5.0.0
Cloning https://github.com/yonaskolb/Stencil.git
Resolving https://github.com/yonaskolb/Stencil.git at 0.9.3
make: *** [build] Error 1

If reporting this issue please do so to (not Homebrew/brew or Homebrew/core):
yonaskolb/swaggen

/usr/local/Homebrew/Library/Homebrew/utils/github.rb:220:in `raise_api_error': curl failed!  (GitHub::Error)
curl: (22) The requested URL returned error: 422 Unprocessable Entity
curl: (3) <url> malformed
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:178:in `open_api'
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:292:in `search'
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:225:in `search_issues'
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:238:in `issues_for_formula'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:368:in `fetch_issues'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:364:in `issues'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:418:in `dump'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:133:in `rescue in <main>'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:25:in `<main>'

@yonaskolb
Copy link
Owner

Strange, it's working for me. If using make works I assume you have Swift 4.1?
Can you run brew in verbose mode?

brew install swaggen --verbose

@erwinmaza
Copy link
Contributor Author

Doing brew install swaggen --verbose yields

> brew install swaggen --verbose
==> Installing SwagGen from yonaskolb/swaggen
/usr/bin/sandbox-exec -f /tmp/homebrew20180531-72568-5x91qm.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/yonaskolb/homebrew-swaggen/Formula/SwagGen.rb --verbose
==> Downloading https://github.com/yonaskolb/SwagGen/archive/2.1.0.tar.gz
Already downloaded: /Users/erwin/Library/Caches/Homebrew/SwagGen-2.1.0.tar.gz
==> Verifying SwagGen-2.1.0.tar.gz checksum
tar xzf /Users/erwin/Library/Caches/Homebrew/SwagGen-2.1.0.tar.gz
==> make install PREFIX=/usr/local/Cellar/SwagGen/2.1.0
swift build --disable-sandbox -c release -Xswiftc -static-stdlib
Compile CYaml src/scanner.c
Compile CYaml src/writer.c
Compile CYaml src/emitter.c
Compile CYaml src/reader.c
Compile CYaml src/api.c
Compile CYaml src/parser.c
Compile Swift Module 'SwiftCLI' (20 sources)
Compile Swift Module 'Spectre' (8 sources)
/Applications/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
module libxml2 [system] [extern_c] {
       ^
/usr/include/libxml2/module.modulemap:1:8: note: previously defined here
module libxml2 [system] [extern_c] {
       ^
1 error generated.
/Applications/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
module libxml2 [system] [extern_c] {
       ^
/usr/include/libxml2/module.modulemap:1:8: note: previously defined here
module libxml2 [system] [extern_c] {
       ^
1 error generated.
/Applications/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
module libxml2 [system] [extern_c] {
       ^
/usr/include/libxml2/module.modulemap:1:8: note: previously defined here
module libxml2 [system] [extern_c] {
       ^
1 error generated.
/Applications/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
module libxml2 [system] [extern_c] {
       ^
/usr/include/libxml2/module.modulemap:1:8: note: previously defined here
module libxml2 [system] [extern_c] {
       ^
/Applications/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
module libxml2 [system] [extern_c] {
       ^
/usr/include/libxml2/module.modulemap:1:8: note: previously defined here
module libxml2 [system] [extern_c] {
       ^
/Applications/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
module libxml2 [system] [extern_c] {
       ^
/usr/include/libxml2/module.modulemap:1:8: note: previously defined here
module libxml2 [system] [extern_c] {
       ^
error: terminated(1): /Applications/Apps/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /private/tmp/SwagGen-20180531-72570-jgx2du/SwagGen-2.1.0/.build/release.yaml main output:
    

Fetching https://github.com/kylef/PathKit.git
Fetching https://github.com/onevcat/Rainbow.git
Fetching https://github.com/kylef/Spectre.git
Fetching https://github.com/jpsim/Yams.git
Fetching https://github.com/yonaskolb/JSONUtilities.git
Fetching https://github.com/jakeheis/SwiftCLI
Fetching https://github.com/yonaskolb/Stencil.git
Cloning https://github.com/kylef/PathKit.git
Resolving https://github.com/kylef/PathKit.git at 0.8.0
Cloning https://github.com/onevcat/Rainbow.git
Resolving https://github.com/onevcat/Rainbow.git at 2.1.0
Cloning https://github.com/kylef/Spectre.git
Resolving https://github.com/kylef/Spectre.git at 0.7.2
Cloning https://github.com/jpsim/Yams.git
Resolving https://github.com/jpsim/Yams.git at 0.5.0
Cloning https://github.com/yonaskolb/JSONUtilities.git
Resolving https://github.com/yonaskolb/JSONUtilities.git at 3.3.8
Cloning https://github.com/jakeheis/SwiftCLI
Resolving https://github.com/jakeheis/SwiftCLI at 5.0.0
Cloning https://github.com/yonaskolb/Stencil.git
Resolving https://github.com/yonaskolb/Stencil.git at 0.9.3
make: *** [build] Error 1

==> Formula
Tap: yonaskolb/swaggen
Path: /usr/local/Homebrew/Library/Taps/yonaskolb/homebrew-swaggen/Formula/SwagGen.rb
==> Configuration
HOMEBREW_VERSION: 1.6.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: e4c02fafdaef5676cf40dd6d16e74976cf54b265
Last commit: 6 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 15883bdf7b7143da80587921fa0d1b857718f531
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION: 1
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.1 build 902
Git: 2.15.1 => /Applications/Apps/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.13.4-x86_64
CLT: 9.3.0.0.1.1521514116
Xcode: 9.4 => /Applications/Apps/Xcode.app/Contents/Developer
XQuartz: N/A
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.13
PATH: /usr/local/Homebrew/Library/Homebrew/shims/super:/usr/bin:/bin:/usr/sbin:/sbin

Error: yonaskolb/swaggen/SwagGen 2.1.0 did not build
Logs:
     /Users/erwin/Library/Logs/Homebrew/SwagGen/01.make
     /Users/erwin/Library/Logs/Homebrew/SwagGen/00.options.out
     /Users/erwin/Library/Logs/Homebrew/SwagGen/01.make.cc
If reporting this issue please do so to (not Homebrew/brew or Homebrew/core):
yonaskolb/swaggen

/usr/local/Homebrew/Library/Homebrew/utils/github.rb:222:in `raise_api_error': curl failed!   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current (GitHub::Error)
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 422 Unprocessable Entity
curl: (3) <url> malformed
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:180:in `open_api'
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:294:in `search'
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:227:in `search_issues'
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:240:in `issues_for_formula'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:368:in `fetch_issues'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:364:in `issues'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:418:in `dump'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:133:in `rescue in <main>'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:25:in `<main>'

@erwinmaza
Copy link
Contributor Author

Swift version:

> swift
Welcome to Apple Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2). Type :help for assistance.
  1>  

@yonaskolb
Copy link
Owner

Looks like the same issue as here yonaskolb/XcodeGen#283

@yonaskolb
Copy link
Owner

This is due to changes in Xcode 9.3 that homebrew doesn't deal with well.
Fixed in 7e359f8 and released in 2.1.1

@erwinmaza feel free to reopen this if you have any more issues

@yonaskolb
Copy link
Owner

Possible fix for homebrew Homebrew/brew#4147

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

2 participants