Discussion:
Missing -lpthreads breaks build in plugins/tls/k5tls on AIX
REIX, Tony
2017-08-24 09:57:42 UTC
Permalink
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/>
REIX, Tony
2017-08-24 10:19:08 UTC
Permalink
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
À : ***@mit.edu
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/>
Benjamin Kaduk
2017-08-27 22:28:39 UTC
Permalink
Post by 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.
SHLIB_EXPLIBS= $(KRB5_LIB) $(SUPPORT_LIB) $(TLS_IMPL_LIBS)
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 ***@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

Loading...