-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Python 3.13a5 fails to build on AIX #117088
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
Comments
Apparently AIX doesn't use the ELF format, so this argument (which is the same as |
Is there any fix available for this issue. ? I am hitting same while building 3.13.2 on AIX @mhsmith @kadler |
@Ganeshkumhar1 For our local builds, we just patched it to remove the --- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -910,10 +910,7 @@
$(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
- $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM)
- if test $(INSTSONAME) != $@; then \
- $(LN) -f $(INSTSONAME) $@; \
- fi
+ $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM);
libpython3.so: libpython$(LDVERSION).so
$(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ I don't understand enough about the reason for removing the if check as part of the Android support PR to know what the proper fix is to support everybody. |
The If we need to omit this argument on AIX, then the proper fix would be to simply do that with a platform check. |
I suppose that the following patch also should fix issue on AIX: diff --git a/Makefile.pre.in b/Makefile.pre.in
index e41a26e469d..1f9d90ef385 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -999,9 +999,11 @@ $(LIBRARY): $(LIBRARY_OBJS)
$(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
- $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM)
if test $(INSTSONAME) != $@; then \
+ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
$(LN) -f $(INSTSONAME) $@; \
+ else \
+ $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
fi
libpython3.so: libpython$(LDVERSION).so @mhsmith, does it break Android build? |
Yes, it would break Android because it would take the |
Bug report
Bug description:
-h
is not a valid linker flag on AIX. This seems to be a regression introduced in fa1d675309c6a08b0833cf25cffe476c6166aba3 as previously on AIX it would have gone in to the else leg and not used this flag.CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Linked PRs
The text was updated successfully, but these errors were encountered: