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

Error for building fontconfig #229

Open
xiaoweiz opened this Issue May 5, 2018 · 9 comments

Comments

Projects
None yet
8 participants
@xiaoweiz
Copy link

xiaoweiz commented May 5, 2018

@staticfloat

OSX Sierra + Julia 0.6.2 (fresh install)

When building Homebrew, it failed with the following error message

==> Installing fontconfig from staticfloat/juliatranslated
==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.12.6.el_capita
Already downloaded: /Users/xiaoweiz/Library/Caches/Homebrew.jl/fontconfig-2.12.6.el_capitan.bottle.tar.gz
==> Pouring fontconfig-2.12.6.el_capitan.bottle.tar.gz
==> Regenerating font cache, this may take a while
==> /Users/xiaoweiz/.julia/v0.6/Homebrew/deps/usr/Cellar/fontconfig/2.12.6/bin/f
Last 15 lines from /Users/xiaoweiz/Library/Logs/Homebrew/fontconfig/post_install.01.fc-cache:
-frv

/usr/share/fonts: skipping, no such directory
/System/Library/Fonts: caching, new cache contents: 281 fonts, 0 dirs
/Library/Fonts: /Library/Fonts: failed to write cache
caching, new cache contents: 419 fonts, 1 dirs
/Library/Fonts/Microsoft: caching, new cache contents: 207 fonts, 0 dirs
/Users/xiaoweiz/Library/Fonts: /Users/xiaoweiz/Library/Fonts: failed to write cache
caching, new cache contents: 2579 fonts, 0 dirs
/Users/xiaoweiz/.local/share/fonts: skipping, no such directory
/Users/xiaoweiz/.fonts: skipping, no such directory
/usr/local/var/cache/fontconfig: not cleaning unwritable cache directory
/Users/xiaoweiz/.cache/fontconfig: not cleaning unwritable cache directory
/Users/xiaoweiz/.fontconfig: not cleaning non-existent cache directory
/Users/xiaoweiz/.julia/v0.6/Homebrew/deps/usr/Cellar/fontconfig/2.12.6/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/xiaoweiz/.julia/v0.6/Homebrew/deps/usr/Cellar/fontconfig/2.12.6: 493 files, 3.2MB
===================================[ ERROR: Homebrew ]====================================

LoadError: failed process: Process(`/Users/xiaoweiz/.julia/v0.6/Homebrew/deps/usr/bin/brew install --ignore-dependencies staticfloat/juliatranslated/fontconfig`, ProcessExited(1)) [1]
while loading /Users/xiaoweiz/.julia/v0.6/Homebrew/deps/build.jl, in expression starting on line 2

@yakir12 yakir12 referenced this issue May 10, 2018

Open

fontconfig #5

@cmey

This comment has been minimized.

Copy link

cmey commented May 17, 2018

+1

@skleinbo

This comment has been minimized.

Copy link

skleinbo commented May 22, 2018

Curiously, the step succeeds when run directly from the shell

shell> ./fc-cache -frv                                                                                                                                                 /usr/share/fonts: skipping, no such directory
/System/Library/Fonts: caching, new cache contents: 337 fonts, 0 dirs                                                                                                  /Library/Fonts: caching, new cache contents: 370 fonts, 0 dirs
/Users/skleinbo/Library/Fonts: caching, new cache contents: 0 fonts, 0 dirs
/System/Library/Assets/com_apple_MobileAsset_Font4: caching, new cache contents: 0 fonts, 0 dirs
/Users/skleinbo/.local/share/fonts: skipping, no such directory
/Users/skleinbo/.fonts: skipping, no such directory
/usr/local/var/cache/fontconfig: not cleaning unwritable cache directory
/Users/skleinbo/.cache/fontconfig: cleaning cache directory
/Users/skleinbo/.fontconfig: not cleaning non-existent cache directory
./fc-cache: succeeded
@lrsantos11

This comment has been minimized.

Copy link

lrsantos11 commented May 31, 2018

+1

@stillyslalom

This comment has been minimized.

Copy link

stillyslalom commented Jun 5, 2018

Try:

using Homebrew
Homebrew.brew(`reinstall fontconfig`)
Pkg.build("Homebrew")
@cmey

This comment has been minimized.

Copy link

cmey commented Jun 6, 2018

@stillyslalom That didn't help.

julia> Homebrew.brew(`reinstall fontconfig`)
==> Reinstalling staticfloat/juliatranslated/fontconfig
==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.12.6.high_sierra.bottle.tar.gz
Already downloaded: /Users/cmey/Library/Caches/Homebrew.jl/fontconfig-2.12.6.high_sierra.bottle.tar.gz
==> Pouring fontconfig-2.12.6.high_sierra.bottle.tar.gz
==> Regenerating font cache, this may take a while
==> /Users/cmey/.julia/v0.6/Homebrew/deps/usr/Cellar/fontconfig/2.12.6/bin/fc-cache -frv
Last 15 lines from /Users/cmey/Library/Logs/Homebrew/fontconfig/post_install.01.fc-cache:

/Users/cmey/.julia/v0.6/Homebrew/deps/usr/Cellar/fontconfig/2.12.6/bin/fc-cache
-frv

/usr/share/fonts: skipping, no such directory
/System/Library/Fonts: caching, new cache contents: 337 fonts, 0 dirs
/Library/Fonts: /Library/Fonts: failed to write cache
caching, new cache contents: 375 fonts, 0 dirs
/Users/cmey/Library/Fonts: caching, new cache contents: 146 fonts, 0 dirs
/Users/cmey/.local/share/fonts: skipping, no such directory
/Users/cmey/.fonts: skipping, no such directory
/usr/local/var/cache/fontconfig: not cleaning unwritable cache directory
/Users/cmey/.cache/fontconfig: not cleaning unwritable cache directory
/Users/cmey/.fontconfig: not cleaning non-existent cache directory
/Users/cmey/.julia/v0.6/Homebrew/deps/usr/Cellar/fontconfig/2.12.6/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/cmey/.julia/v0.6/Homebrew/deps/usr/Cellar/fontconfig/2.12.6: 493 files, 3.2MB
ERROR: failed process: Process(`/Users/cmey/.julia/v0.6/Homebrew/deps/usr/bin/brew reinstall fontconfig`, ProcessExited(1)) [1]
Stacktrace:
 [1] pipeline_error(::Base.Process) at ./process.jl:682
 [2] run(::Cmd) at ./process.jl:651
 [3] #brew#4(::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Function, ::Cmd) at /Users/cmey/.julia/v0.6/Homebrew/src/API.jl:19
 [4] brew(::Cmd) at /Users/cmey/.julia/v0.6/Homebrew/src/API.jl:11
@cmey

This comment has been minimized.

Copy link

cmey commented Jun 6, 2018

@skleinbo That helped! I did:

shell> cd /Users/cmey/.julia/v0.6/Homebrew/deps/usr/Cellar/fontconfig/2.12.6/bin
shell> ./fc-cache -frv
julia> Pkg.build("Homebrew")  # worked fine this time
@vancleve

This comment has been minimized.

Copy link

vancleve commented Jun 6, 2018

+1 for problem and solution by @skleinbo.

cmey added a commit to cmey/homebrew-juliadeps that referenced this issue Jul 9, 2018

Fix fontconfig post_install
Manually running `fc-cache -frv` (note no newline) in a julia shell works.

See JuliaPackaging/Homebrew.jl#229 and staticfloat/homebrew-juliatranslated#4

The post_install fails, and I believe that it is because somehow that `system` command here introduces a newline before the argument (see log in JuliaPackaging/Homebrew.jl#229 – `-frv` appears on a new line).
@danmackinlay

This comment has been minimized.

Copy link

danmackinlay commented Jul 16, 2018

as noted here, the following is a workaround, which works for me

$ ~/.julia/v0.6/Homebrew/deps/usr/Cellar/fontconfig/2.12.6/bin/fc-cache -frv

(posted in the wrong thread, sorry!)

@ianfiske

This comment has been minimized.

Copy link

ianfiske commented Nov 15, 2018

Heads up this is still needed in Julia 1.0.2. The path that worked for me was

➜  ~ ~/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/fontconfig/2.13.1/bin/fc-cache -frv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.