https://bugs.openldap.org/show_bug.cgi?id=10391
Issue ID: 10391 Summary: Add proper compiler/linker flag for threading support on HP-UX Product: OpenLDAP Version: 2.6.10 Hardware: Other OS: Other Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: libraries Assignee: bugs@openldap.org Reporter: michael.osipov@innomotics.com Target Milestone: ---
Created attachment 1085 --> https://bugs.openldap.org/attachment.cgi?id=1085&action=edit Patch against master
If an application uses a thread-enabled library or the application itself is thread enabled it is imperative on HP-UX to use the -mt flag through out build. The compiler will transform into proper -D and -l flags.
From the manpage: -mt Sets various -D flags to enable multi-threading. Also sets -lpthread. +Oopenmp automatically implies -mt. For details see HP C/aC++ Online Programmer's Guide.
Find a Git-formatted patch attached.
Sample output: libtool: link: /opt/aCC/bin/aCC -AC99 +We901 -o ldapsearch ldapsearch.o common.o ldsversion.o -L/opt/ports/lib/hpux32 ../../libraries/liblutil/liblutil.a ../../libraries/libldap/.libs/libldap.a -L/opt/ports/lib /var/tmp/ports/work/openldap-threading-hpux/libraries/liblber/.libs/liblber.a ../../libraries/liblber/.libs/liblber.a /opt/ports/lib/hpux32/libsasl2.so -ldl -lssl -lcrypto -mt -Wl,+b -Wl,/opt/ports/lib/hpux32
https://bugs.openldap.org/show_bug.cgi?id=10391
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Target Milestone|--- |2.6.11 Assignee|bugs@openldap.org |quanah@openldap.org
https://bugs.openldap.org/show_bug.cgi?id=10391
--- Comment #1 from michael.osipov@innomotics.com --- This is especially important when SASL loads plugins with dlopen(). They aren't loaded.
Here is a summary what happens if it is not done correctly: https://mailman.mit.edu/pipermail/kerberos/2025-September/023286.html
https://bugs.openldap.org/show_bug.cgi?id=10391
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |IN_PROGRESS Ever confirmed|0 |1
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- https://git.openldap.org/openldap/openldap/-/merge_requests/798
https://bugs.openldap.org/show_bug.cgi?id=10391
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |TEST Status|IN_PROGRESS |RESOLVED
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- head:
• eec5edd9 by Michael Osipov at 2025-10-22T20:07:49+00:00 ITS#10391 - Reactivate "-mt" for pthread support on HP-UX (and Solaris)
• b38a17b8 by Quanah Gibson-Mount at 2025-10-22T21:49:38+00:00 ITS#10391 - Regenerate configure
RE26:
• 6fd3d97a by Michael Osipov at 2025-11-04T16:14:10+00:00 ITS#10391 - Reactivate "-mt" for pthread support on HP-UX (and Solaris)
• bc7f71e7 by Quanah Gibson-Mount at 2025-11-04T16:14:34+00:00 ITS#10391 - Regenerate configure