Missing -lpthreads breaks build in plugins/tls/k5tls on AIX

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing -lpthreads breaks build in plugins/tls/k5tls on AIX

REIX, Tony
Hi,

I have :

krb5-1.15.1/src-64/plugins/tls/k5tls :

  /opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/collect2  ...
   -bgcbypass:1 -bfilelist -bM:SRE -bE:./k5tls.exports -bernotok -brtl -lkrb5 -lkrb5support -lssl -lcrypto -lc -lgcc_s -lc -lgcc_s
 ld: 0711-317 ERROR: Undefined symbol: .pthread_once
 Makefile:690: recipe for target 'k5tls.so' failed
 gmake[1]: Leaving directory '/opt/freeware/src/packages/BUILD/krb5-1.15.1/src-64/plugins/tls/k5tls'

An easy patch is to add the missing -lpthreads to TLS_IMPL_LIBS variable in Makefile.

-TLS_IMPL_LIBS    = -lssl -lcrypto
+TLS_IMPL_LIBS    = -lssl -lcrypto -lpthreads


Cordialement,

Tony Reix

Bull - ATOS
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net<http://www.atos.net/>

_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev

krb5-1.15.1-k5tls-lpthreads.patch (526 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE:Missing -lpthreads breaks build in plugins/tls/k5tls on AIX

REIX, Tony
Hummmm It is more complicated since Makefile is generated by Makefile.in .
So my easy patch was removed by a rebuild from scratch.
And TLS_IMPL_LIBS appears only in: /plugins/tls/k5tls/Makefile.in as :
SHLIB_EXPLIBS= $(KRB5_LIB) $(SUPPORT_LIB) $(TLS_IMPL_LIBS)

Hummmm Looks like the issue is there:
configure.in:    TLS_IMPL_LIBS="-lssl -lcrypto"
configure:       TLS_IMPL_LIBS="-lssl -lcrypto"

New patch.
Seems OK since build ran to the end. In 64bit first.

Cordialement,

Tony Reix

Bull - ATOS
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net<http://www.atos.net/>
________________________________
De : REIX, Tony
Envoyé : jeudi 24 août 2017 11:57
À : [hidden email]
Objet : Missing -lpthreads breaks build in plugins/tls/k5tls on AIX

Hi,

I have :

krb5-1.15.1/src-64/plugins/tls/k5tls :

  /opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/collect2  ...
   -bgcbypass:1 -bfilelist -bM:SRE -bE:./k5tls.exports -bernotok -brtl -lkrb5 -lkrb5support -lssl -lcrypto -lc -lgcc_s -lc -lgcc_s
 ld: 0711-317 ERROR: Undefined symbol: .pthread_once
 Makefile:690: recipe for target 'k5tls.so' failed
 gmake[1]: Leaving directory '/opt/freeware/src/packages/BUILD/krb5-1.15.1/src-64/plugins/tls/k5tls'

An easy patch is to add the missing -lpthreads to TLS_IMPL_LIBS variable in Makefile.

-TLS_IMPL_LIBS    = -lssl -lcrypto
+TLS_IMPL_LIBS    = -lssl -lcrypto -lpthreads


Cordialement,

Tony Reix

Bull - ATOS
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net<http://www.atos.net/>

_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev

krb5-1.15.1-k5tls-lpthreads-v2.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Missing -lpthreads breaks build in plugins/tls/k5tls on AIX

Benjamin Kaduk-2
On Thu, Aug 24, 2017 at 10:19:08AM +0000, REIX, Tony wrote:
> Hummmm It is more complicated since Makefile is generated by Makefile.in .
> So my easy patch was removed by a rebuild from scratch.
> And TLS_IMPL_LIBS appears only in: /plugins/tls/k5tls/Makefile.in as :
> SHLIB_EXPLIBS= $(KRB5_LIB) $(SUPPORT_LIB) $(TLS_IMPL_LIBS)
>
> Hummmm Looks like the issue is there:
> configure.in:    TLS_IMPL_LIBS="-lssl -lcrypto"
> configure:       TLS_IMPL_LIBS="-lssl -lcrypto"

IIRC, openssl only started requiring pthreads as of the 1.1.0 release;
could you confirm what version of openssl you are using?

I also thought that it was more portable to use the -pthread argument
(which does not necessarily translate to a new library dependency,
depending on the platform) than explictly linking a pthread implementation.

Also, does your openssl packaging provide a pkgconfig file or similar?
That seems like it would be a more portable way of picking up new
depnedencies than hardcoding it in configure.in.

-Ben
_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev