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

capnp: fix installation, build with fpic and build shared libraries #139577

Merged
merged 2 commits into from
Aug 16, 2023
Merged

capnp: fix installation, build with fpic and build shared libraries #139577

merged 2 commits into from
Aug 16, 2023

Conversation

timkpaine
Copy link
Contributor

@timkpaine timkpaine commented Aug 15, 2023

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

capnproto is only building static libraries, and these are not actually linkable. This PR adds a small test case to ensure that the libraries can be linked, and also revamps to build both static and shared libraries (based off the bamtools.rb recipe).

xref: #139476
/usr/bin/ld: /home/linuxbrew/.linuxbrew/lib/libkj.a(exception.c++.o): relocation R_X86_64_TPOFF32 against _ZN2kj12_GLOBAL__N_1L19threadLocalCallbackE' can not be used when making a shared object; recompile with -fPIC

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Aug 15, 2023
@github-actions
Copy link
Contributor

Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

@timkpaine
Copy link
Contributor Author

timkpaine commented Aug 15, 2023

The test added fails against the current build (you can see in commit c2aba45, /usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/capnp/1.0.0/lib/libkj.a(exception.c++.o): relocation R_X86_64_TPOFF32 against _ZN2kj12_GLOBAL__N_1L19threadLocalCallbackE' can not be used when making a shared object; recompile with -fPIC , https://github.com/Homebrew/homebrew-core/actions/runs/5863531662/job/15897259150?pr=139577#step:4:103 )

I've squashed the commits now, but just wanted to show the error explicitly

Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks; could you squash your commits together and use the commit message

capnp: build with fpic and shared libraries

(or similar)?

Formula/capnp.rb Outdated Show resolved Hide resolved
Formula/capnp.rb Outdated Show resolved Hide resolved
@carlocab carlocab changed the title Fix capnp installation, build with fpic and build shared libraries capnp: fix installation, build with fpic and build shared libraries Aug 15, 2023
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Aug 15, 2023
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks; but we shouldn't switch around the method of the installation of the shared and static libraries. Shared libraries should be installed using cmake --install.

Also, you'll need to do git fetch origin && git rebase origin/master to pull in the changes from #139592.

Formula/capnp.rb Outdated Show resolved Hide resolved
Formula/c/capnp.rb Outdated Show resolved Hide resolved
Formula/c/capnp.rb Outdated Show resolved Hide resolved
Formula/c/capnp.rb Show resolved Hide resolved
@carlocab carlocab added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Aug 15, 2023
@timkpaine timkpaine marked this pull request as ready for review August 15, 2023 16:36
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work; thanks for your contribution!

@github-actions
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Aug 16, 2023
@BrewTestBot BrewTestBot added this pull request to the merge queue Aug 16, 2023
Merged via the queue into Homebrew:master with commit 808fc95 Aug 16, 2023
12 checks passed
@timkpaine timkpaine deleted the tkp/capnp branch August 16, 2023 12:24
@timkpaine timkpaine mentioned this pull request Sep 3, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants