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

fixup compilation of libharfbuzz on macos #128

Merged
merged 1 commit into from Feb 26, 2019
Merged

Conversation

@wez
Copy link
Contributor

wez commented Feb 23, 2019

The library is missing coretext features on macos; this manifests
in the travis build for wezterm here:

https://travis-ci.org/wez/wezterm/jobs/497309625

            "_hb_coretext_font_create", referenced from:
                wezterm::font::hbwrap::Font::new_coretext::hd071aafeac2e8295 in wezterm-0dd706f6ee97bf14.10pwsdaw58utpw8o.rcgu.o
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Inspecting the output of the build shows that configure is being invoked this way:

cd /Users/wez/src/wezterm/target/debug/build/harfbuzz-sys-0ec3b8d6c31c3064/out && /Users/wez/.cargo/registry/src/github.com-1ecc6299db9ec823/harfbu
zz-sys-0.3.0/harfbuzz/configure --prefix=/Users/wez/src/wezterm/target/debug/build/harfbuzz-sys-0ec3b8d6c31c3064/out --host=x86_64-apple-darwin --e
nable-static --disable-shared --without-icu --without-freetype --without-glib \
                CFLAGS="-fPIC -g" CXXFLAGS="-fPIC -g" CPPFLAGS=""

It appears that the logic in makefile.cargo isn't effective at detecting macos
in either the travis mac environment or on my local macbook (after I uninstalled
my locally installed hombrew harfbuzz).

This commit changes the invocation to unconditionally ask configure to probe for
coretext and enable it if found.


This change is Reviewable

The library is missing coretext features on macos; this manifests
in the travis build for wezterm here:

https://travis-ci.org/wez/wezterm/jobs/497309625

```
            "_hb_coretext_font_create", referenced from:
                wezterm::font::hbwrap::Font::new_coretext::hd071aafeac2e8295 in wezterm-0dd706f6ee97bf14.10pwsdaw58utpw8o.rcgu.o
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

Inspecting the output of the build shows that configure is being invoked this way:

```
cd /Users/wez/src/wezterm/target/debug/build/harfbuzz-sys-0ec3b8d6c31c3064/out && /Users/wez/.cargo/registry/src/github.com-1ecc6299db9ec823/harfbu
zz-sys-0.3.0/harfbuzz/configure --prefix=/Users/wez/src/wezterm/target/debug/build/harfbuzz-sys-0ec3b8d6c31c3064/out --host=x86_64-apple-darwin --e
nable-static --disable-shared --without-icu --without-freetype --without-glib \
                CFLAGS="-fPIC -g" CXXFLAGS="-fPIC -g" CPPFLAGS=""
```

It appears that the logic in `makefile.cargo` isn't effective at detecting macos
in either the travis mac environment or on my local macbook (after I uninstalled
my locally installed hombrew harfbuzz).

This commit changes the invocation to unconditionally ask configure to probe for
coretext and enable it if found.
wez added a commit to wez/wezterm that referenced this pull request Feb 23, 2019
@waywardmonkeys
Copy link
Collaborator

waywardmonkeys commented Feb 26, 2019

This seems reasonable to me. Anyone else?

@jdm
Copy link
Member

jdm commented Feb 26, 2019

Agreed.

@waywardmonkeys
Copy link
Collaborator

waywardmonkeys commented Feb 26, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Feb 26, 2019

📌 Commit 6c28868 has been approved by waywardmonkeys

@bors-servo
Copy link
Contributor

bors-servo commented Feb 26, 2019

Testing commit 6c28868 with merge b48abce...

bors-servo added a commit that referenced this pull request Feb 26, 2019
fixup compilation of libharfbuzz on macos

The library is missing coretext features on macos; this manifests
in the travis build for wezterm here:

https://travis-ci.org/wez/wezterm/jobs/497309625

```
            "_hb_coretext_font_create", referenced from:
                wezterm::font::hbwrap::Font::new_coretext::hd071aafeac2e8295 in wezterm-0dd706f6ee97bf14.10pwsdaw58utpw8o.rcgu.o
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

Inspecting the output of the build shows that configure is being invoked this way:

```
cd /Users/wez/src/wezterm/target/debug/build/harfbuzz-sys-0ec3b8d6c31c3064/out && /Users/wez/.cargo/registry/src/github.com-1ecc6299db9ec823/harfbu
zz-sys-0.3.0/harfbuzz/configure --prefix=/Users/wez/src/wezterm/target/debug/build/harfbuzz-sys-0ec3b8d6c31c3064/out --host=x86_64-apple-darwin --e
nable-static --disable-shared --without-icu --without-freetype --without-glib \
                CFLAGS="-fPIC -g" CXXFLAGS="-fPIC -g" CPPFLAGS=""
```

It appears that the logic in `makefile.cargo` isn't effective at detecting macos
in either the travis mac environment or on my local macbook (after I uninstalled
my locally installed hombrew harfbuzz).

This commit changes the invocation to unconditionally ask configure to probe for
coretext and enable it if found.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-harfbuzz/128)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 26, 2019

☀️ Test successful - checks-travis
Approved by: waywardmonkeys
Pushing b48abce to master...

@bors-servo bors-servo merged commit 6c28868 into servo:master Feb 26, 2019
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.