JuliaPackaging / Homebrew.jl

OSX Binary dependency provider for Julia
Other
27 stars 32 forks source link

Get out of the business of duplicating Homebrew #246

Open lewisl opened 6 years ago

lewisl commented 6 years ago

I read the reasons for this special version of Homebrew: Some of the formulae in the staticfloat/juliadeps tap are specifically patched to work with Julia. Some of these patches have not (or will not) be merged back into Homebrew mainline, so we don't want to conflict with any packages the user may or may not have installed. I realize there is also a problem with paths.

I would suggest creating a special "cask" of Julia dependencies must be different than standard system packages. When this is installed, the system brew can draw from a special repository. Users will need to know to "brew cask install Julia-". Cask is meant to install binaries. Maybe it won't work; but wouldn't it be nice to work on Julia needs and new capabilities and not duplicate work that others admirably maintain? Maybe this won't work. Seems like it's worth a shot to get out of the duplication business.

It's not that there is anything wrong with doing Homebrew.jl. It's just a lot of work to keep a lot of infrastructure working and keep tracking (the incessant) changes to Homebrew. That doesn't feel like a priority. Julia is still playing catchup to a certain extent on needed packages (acknowledging impressive progress to date...). Why not focus on functionality Julia users can benefit from and not duplicate system plumbing. I realize it seems easier to go self-contained. I don't understand why the cask and special repository approach won't work. Some Python dependencies use this.

I don't have time to figure this out. I just hope it doesn't matter and I can ignore it.

Can I run brew doctor on the private Julia version?

Here is the latest problem. Sorry it is so long:

Building Homebrew ────────→ `~/.julia/packages/Homebrew/l8kUw/deps/build.log`
┌ Error: Error building `Homebrew`, showing the last 100 of log: 
│ quicktype
│ rclone
│ shibboleth-sp
│ skaffold
│ sphinx-doc
│ swiftformat
│ tarantool
│ template-glib
│ tile38
│ topgrade
│ travis
│ uftp
│ unrar
│ v8
│ vagrant-completion
│ vala
│ valabind
│ vault
│ vte3
│ webpack
│ wildfly-as
│ wireguard-tools
│ wp-cli-completion
│ xml-tooling-c
│ yelp-tools
│ youtube-dl
│ zabbix
│ zsh
│ ==> Renamed Formulae
│ rebar@3 -> rebar3
│ Uninstalling adwaita-icon-theme... (5,566 files, 25MB)
│ ==> Installing adwaita-icon-theme from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/adwaita-icon-theme-3.30.0.high_sierra.bottle.tar.gz
│ ==> Pouring adwaita-icon-theme-3.30.0.high_sierra.bottle.tar.gz
│ 🍺  /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/adwaita-icon-theme/3.30.0: 5,713 files, 23.3MB
│ Warning: Already linked: /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/adwaita-icon-theme/3.30.0
│ Uninstalling gdk-pixbuf... (200 files, 4.4MB)
│ ==> Installing gdk-pixbuf from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/gdk-pixbuf-2.38.0.high_sierra.bottle.tar.gz
│ ==> Pouring gdk-pixbuf-2.38.0.high_sierra.bottle.tar.gz
│ ==> /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/gdk-pixbuf/2.38.0/bin/gdk-pixbuf-query-loaders --update-cache
│ 🍺  /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/gdk-pixbuf/2.38.0: 147 files, 3.2MB
│ Warning: Already linked: /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/gdk-pixbuf/2.38.0
│ Uninstalling glib... (435 files, 18.4MB)
│ ==> Installing glib from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/glib-2.58.0_1.high_sierra.bottle.tar.gz
│ ==> Pouring glib-2.58.0_1.high_sierra.bottle.tar.gz
│ 🍺  /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/glib/2.58.0_1: 435 files, 18.4MB
│ Warning: Already linked: /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/glib/2.58.0_1
│ Uninstalling fontconfig... (511 files, 3.2MB)
│ ==> Installing fontconfig from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.13.0.high_sierra.bottle.tar.gz
│ ==> Pouring fontconfig-2.13.0.high_sierra.bottle.tar.gz
│ ==> Regenerating font cache, this may take a while
│ ==> /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/fontconfig/2.13.0/bin/fc-cache -frv
│ Last 15 lines from /Users/lewis/Library/Logs/Homebrew/fontconfig/post_install.01.fc-cache:
│ 2018-09-06 07:43:51 -0700
│ 
│ /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/fontconfig/2.13.0/bin/fc-cache -frv
│ 
│ /usr/share/fonts: skipping, no such directory
│ /System/Library/Fonts: caching, new cache contents: 339 fonts, 0 dirs
│ /Library/Fonts: /Library/Fonts: failed to write cache
│ caching, new cache contents: 374 fonts, 0 dirs
│ /Users/lewis/Library/Fonts: caching, new cache contents: 0 fonts, 0 dirs
│ /Users/lewis/.local/share/fonts: skipping, no such directory
│ /Users/lewis/.fonts: skipping, no such directory
│ /usr/local/var/cache/fontconfig: not cleaning unwritable cache directory
│ /Users/lewis/.cache/fontconfig: not cleaning non-existent cache directory
│ /Users/lewis/.fontconfig: not cleaning non-existent cache directory
│ /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/fontconfig/2.13.0/bin/fc-cache: failed
│ Warning: The post-install step did not complete successfully
│ You can try again using `brew postinstall staticfloat/juliatranslated/fontconfig`
│ ==> Summary
│ 🍺  /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/fontconfig/2.13.0: 511 files, 3.2MB
│ ERROR: LoadError: failed process: Process(`/Users/lewis/.julia/packages/Homebrew/l8kUw/deps/usr/bin/brew install --ignore-dependencies staticfloat/juliatranslated/fontconfig`, ProcessExited(1)) [1]
│ Stacktrace:
│  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│  [2] pipeline_error at ./process.jl:712 [inlined]
│  [3] #run#509(::Bool, ::Function, ::Cmd) at ./process.jl:670
│  [4] run at ./process.jl:668 [inlined]
│  [5] #brew#4(::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Function, ::Cmd) at /Users/lewis/.julia/packages/Homebrew/l8kUw/src/API.jl:19
│  [6] #brew at ./none:0 [inlined]
│  [7] #install_and_link#38(::Bool, ::Function, ::String) at /Users/lewis/.julia/packages/Homebrew/l8kUw/src/API.jl:492
│  [8] (::getfield(Homebrew, Symbol("#kw##install_and_link")))(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(Homebrew.install_and_link), ::String) at ./none:0
│  [9] macro expansion at ./logging.jl:310 [inlined]
│  [10] #add#29(::Bool, ::Bool, ::Function, ::String) at /Users/lewis/.julia/packages/Homebrew/l8kUw/src/API.jl:449
│  [11] #add at ./none:0 [inlined]
│  [12] #add#36(::Bool, ::Bool, ::Function, ::Homebrew.BrewPkg) at /Users/lewis/.julia/packages/Homebrew/l8kUw/src/API.jl:472
│  [13] #add at ./none:0 [inlined]
│  [14] #upgrade#8(::Bool, ::Function) at /Users/lewis/.julia/packages/Homebrew/l8kUw/src/API.jl:144
│  [15] #upgrade at ./none:0 [inlined]
│  [16] #update#6(::Bool, ::Function) at /Users/lewis/.julia/packages/Homebrew/l8kUw/src/API.jl:56
│  [17] update() at /Users/lewis/.julia/packages/Homebrew/l8kUw/src/API.jl:50
│  [18] top-level scope at /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/build.jl:3
│  [19] include at ./boot.jl:317 [inlined]
│  [20] include_relative(::Module, ::String) at ./loading.jl:1038
│  [21] include(::Module, ::String) at ./sysimg.jl:29
│  [22] include(::String) at ./client.jl:398
│  [23] top-level scope at none:0
│ in expression starting at /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/build.jl:1
│ 
│ Full log at /Users/lewis/.julia/packages/Homebrew/l8kUw/deps/build.log
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:1068
CiaranOMara commented 6 years ago

Can I run brew doctor on the private Julia version?

using Homebrew; Homebrew.brew(`doctor`)
lewisl commented 6 years ago

I ran the literal brew doctor and found a missing dependencies. Installed them.

Another warning occurs because the install directory for the binaries and the Homebrew cellar doesn't match what Homebrew assumes as a default: /usr/local/bin. Of course, it can't be that because the Julia Homebrew installs under dep within the package directory.

Is it possible to change the directory to ..dep/local/bin instead of ...dep/bin? This might keep Homebrew happy. Or, since this is a fork of Homebrew (which I've pointed out here and elsewhere is a misuse of your capable efforts...) change the test for the proper path to the default path used within ~/.julia/packages.

Wouldn't it be great to have these issues go away and not have to maintain this?

musm commented 5 years ago

cc @staticfloat