-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Using install_rpath for AIX #13981
Comments
On Linux, the meson.build can set an rpath to be used and the GNU option Meson will also pass a few of its own during the build in case of libraries and executables that depend on each other, so that running the software directly in Are the correct rpaths present when you inspect the build directory? Do they just disappear during install? If they only disappear during install then it's possible the depfixer.py routines are broken on AIX. We have some logic in there to figure out which RPATH entries come from LDFLAGS and preserve them, but it's possible this only got wired up for GNU. ... It is absolutely expected behavior that if you add this via LDFLAGS it should be respected. |
I get this. That is why we are able to run the meson test.
Yes, I see that the logic is for opening an ELF format binary in depfixer.py and changing the libpath. But this will not work for the XCOFF object file in AIX. But I think we should do the same for AIX. Can we develop something similar for AIX in depfixer.py with a different class, may be XCOFF? The requirement is that if we have blibpath from LDFLAGS environment variables, then we simply add that along with the required rpaths at install time. |
Yes please :) do whatever it takes to make sure that meson's AIX handling supports the same features that the Linux handling does. |
Hi community members,
Currently in AIX, there is no way [as far as I have searched] to pass install_path during the build while using Meson unless and until a project has given provision for the same using an option.
What we are looking for is something like CMAKE_INSTALL_RPATH.
Is there any way we can do the same in Meson?
If we cannot, then in AIX, we do pass in an environment variable called LD_FLAGS.
For example,
export LDFLAGS="-Wl,-blibpath:/opt/freeware/lib/pthread:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"
When we pass like this gcc understands that this is a linker flag and we are asking the compiler to set the LIBPATH within the XCOFF object to the blibpath mentioned in LDFLAGS.
By doing so when we dump a shared object we get,
If you see the path is what I have given from LDFLAGS when I created this library manually. [See Import File strings Index 0]
When we compile a package through pip in particular there is no way to tell meson that Hey we are looking to add the LDFLAGS blibpath that should override the build_rpath.
Hence I would like to add this feature in Meson for AIX by making some changes here.
Kindly let me know if we can proceed to add this via LDFLAGS environment variable or if the community has some other way to achieve the same.
The text was updated successfully, but these errors were encountered: