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

Meson failed to archive shared libraries in AIX. #14185

Closed
KamathForAIX opened this issue Jan 27, 2025 · 0 comments · Fixed by #14187
Closed

Meson failed to archive shared libraries in AIX. #14185

KamathForAIX opened this issue Jan 27, 2025 · 0 comments · Fixed by #14187

Comments

@KamathForAIX
Copy link
Contributor

KamathForAIX commented Jan 27, 2025

Describe the bug
Meson with ninja >= 1.12 failed to archive shared libraries in AIX.

To Reproduce
Build any library like glib2 which creates shared libraries that share symbols amongst themselves.

Expected behavior
A clean build

system parameters

  • Is this a cross build or just a plain native build (for the same computer)? No
  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) AIX
  • what Python version are you using e.g. 3.8.0 Python3.9
  • what meson --version Master branch
  • what ninja --version if it's a Ninja build - 1.12 and higher

So as reported here by an AIX user, meson does not archive with ninja >= 1.12.

The reason being I missed out marking SHSYM here target file to be the archive during the shared library archive feature development for AIX.

What this does is tell Ninja that "you need to build the archive first and then depend on that to build the next shared library archive.".

If we do not do that, then though Ninja wants to link the archive, it will skip creating the archive since in SHSYM it sees just a ".so" and not the archive. Hence, when multiple threads execute, we do not have the archive, and we get the build error like how the user got here.

One sample example for a wrong build.ninja file is this,

build glib/libglib-2.0.so.0.p/libglib-2.0.so.0.symbols: SHSYM glib/libglib-2.0.so.0
 IMPLIB = glib/libglib-2.0.a

The SHSYM glib/libglib-2.0.so.0 part is the problem. I want to change this to an archive, and this will fix the issue.

cc @eli-schwartz

Kindly let me know what you think.

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 a pull request may close this issue.

1 participant