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

Add linking tests and fix macOS rpath #12

Merged
merged 2 commits into from
Nov 22, 2020

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Nov 21, 2020

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@jwillemsen
Copy link
Contributor

Maybe use mpc to generate the build files, see the ace examples

@traversaro
Copy link
Contributor Author

Maybe use mpc to generate the build files, see the ace examples

I was trying to simulate the downstream users of the ACE library, for this reason I prefer to have full control (and understanding) of what the compiler is doing, as I imagine that at least some downstream uses of ACE (at least the one in YARP) do not use mpc. Indeed I was able to replicate the problem, as now the example works fine on Linux and Windows, while it fails on macOS.

@traversaro
Copy link
Contributor Author

After a few trial and errors, I was able to fix the problem. The main problem is that the rpath option given in https://github.com/DOCGroup/ACE_TAO/blob/25f5307a46b10ebe7f26f46c006892f0e249c365/ACE/include/makeinclude/platform_macosx_yosemite.GNU#L6 specify that the install location of the library is @rpath/$@, where $@ is the name of the Make target. The problem is that the name of the target is 64/libACE.dylib, so the installed name is also expected to inside a 64 directory, that in practice does not exist. For this reason I substituted in $@ with $(notdir $@) that get just the file name out of the target name, i.e. only libACE.dylib.

@traversaro traversaro changed the title [WIP] Add linking tests Add linking tests and fix macOS rpath Nov 22, 2020
@jwillemsen
Copy link
Contributor

Isn’t the ‘64’ directory set through a specific environment variable which you could use?

@traversaro
Copy link
Contributor Author

Isn’t the ‘64’ directory set through a specific environment variable which you could use?

This is a good question, for which I don't have an answer. Unfortunately the MPC/Makefile-based build system of ACE is not completely clear to me, so it is not clear how the target names are computed.

@jwillemsen
Copy link
Contributor

I don’t have a mac anymore so I can’t try this, maybe you can make an issue upstream for this issue in ACE, maybe someone else with a mac can try this

@traversaro
Copy link
Contributor Author

@conda-forge-admin, please rerender

@traversaro
Copy link
Contributor Author

traversaro commented Nov 22, 2020

I don’t have a mac anymore so I can’t try this, maybe you can make an issue upstream for this issue in ACE, maybe someone else with a mac can try this

Ok! By the way, I tried to understand why everything was working on Homebrew (the only other package manager on which we use) and I guess there homebrew does something after the build of binaries, such as removing rpath that are pointing to non-existing directories, but this is just my wild guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants