cooklang / homebrew-tap

MIT License
4 stars 2 forks source link

Installation error in Ubuntu 20.04 WSL #13

Open nicholaswilde opened 2 years ago

nicholaswilde commented 2 years ago

When installing cooklang with brew in Windows 11 WSL Ubuntu 20.04, I get the following error:

~$ brew install cooklang/tap/cook
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 15 formulae.

==> Cloning https://github.com/cooklang/CookCLI.git
Updating /home/nicholas/.cache/Homebrew/cook--git
==> Checking out tag v0.1.4
HEAD is now at 2ba430c Merge pull request #46 from cooklang/remove-usage-libnss
HEAD is now at 2ba430c Merge pull request #46 from cooklang/remove-usage-libnss
==> Installing cook from cooklang/tap
==> swift build --configuration release --disable-sandbox --arch arm64 --arch x86_64
Last 15 lines from /home/nicholas/.cache/Homebrew/Logs/cook/01.swift:
2022-04-05 21:08:53 +0000

swift
build
--configuration
release
--disable-sandbox
--arch
arm64
--arch
x86_64

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/swift: line 15: /home/linuxbrew/.linuxbrew/opt/swift/bin/swift: No such file or directory

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/cooklang/homebrew-tap/issues

Version of brew

~$ brew -v
Homebrew 3.4.5
Homebrew/homebrew-core (git revision 5d0304540ae; last commit 2022-04-05)

Ubuntu wsl version on Windows 11

~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

Tried manually installing swift using brew. Swift version:

~$ swift -v
Swift version 5.6 (swift-5.6-RELEASE)
Target: x86_64-unknown-linux-gnu
/home/linuxbrew/.linuxbrew/Cellar/swift/5.6/libexec/bin/swift-frontend --version
Swift version 5.6 (swift-5.6-RELEASE)
Target: x86_64-unknown-linux-gnu
/home/linuxbrew/.linuxbrew/Cellar/swift/5.6/libexec/bin/swift-help intro

Welcome to Swift!

Subcommands:

  swift build      Build Swift packages
  swift package    Create and work on packages
  swift run        Run a program from a package
  swift test       Run package tests
  swift repl       Experiment with Swift code interactively (default)

  Use `swift --help` for descriptions of available options and flags.

  Use `swift help <subcommand>` for more information about a subcommand.

/home/linuxbrew/.linuxbrew/Cellar/swift/5.6/libexec/bin/lldb '--repl=-disable-objc-interop -color-diagnostics -new-driver-path /home/linuxbrew/.linuxbrew/Cellar/swift/5.6/libexec/bin/swift-driver -resource-dir /home/linuxbrew/.linuxbrew/opt/swift/libexec/lib/swift'
Welcome to Swift version 5.6 (swift-5.6-RELEASE).
Type :help for assistance.
  1>

Trying to install cooklang after manually installing swift gives me this error.

~$ brew install cooklang/tap/cook
==> Cloning https://github.com/cooklang/CookCLI.git
Updating /home/nicholas/.cache/Homebrew/cook--git
==> Checking out tag v0.1.4
HEAD is now at 2ba430c Merge pull request #46 from cooklang/remove-usage-libnss
HEAD is now at 2ba430c Merge pull request #46 from cooklang/remove-usage-libnss
==> Installing cook from cooklang/tap
==> swift build --configuration release --disable-sandbox --arch arm64 --arch x86_64
Last 15 lines from /home/nicholas/.cache/Homebrew/Logs/cook/01.swift:
Building for production...
remark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimization[1/10] Compiling ZIPFoundation Archive+MemoryFile.swift
<module-includes>:1:10: note: in file included from <module-includes>:1:
#include "shim.h"
         ^
/tmp/cook-20220405-31505-18weqsf/.build/checkouts/ZIPFoundation/Sources/CZLib/shim.h:15:9: error: 'zlib.h' file not found
#import <zlib.h>
        ^
/tmp/cook-20220405-31505-18weqsf/.build/checkouts/ZIPFoundation/Sources/ZIPFoundation/Data+Compression.swift:230:8: error: could not build C module 'CZlib'
import CZlib
       ^
[2/10] Compiling writer.c
[3/10] Compiling reader.c
[4/10] Compiling emitter.c
[4/10] Compiling scanner.c

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/cooklang/homebrew-tap/issues

wsl version

> wsl --version
WSL version: 0.56.2.0
Kernel version: 5.10.102.1
WSLg version: 1.0.30
MSRDC version: 1.2.2924
Direct3D version: 1.601.0
Windows version: 10.0.22581.200