[gnutls-help] compiling gnutls 3.1.28 not being used by php in travis-ci workers
shadiakiki1986 at gmail.com
Wed Jun 10 08:15:31 CEST 2015
On Mon, Jun 1, 2015 at 2:26 PM, shadi akiki <shadiakiki1986 at gmail.com>
> So I've dug a bit further and learned that I should compile curl for this,
> and not php.
> My problem now is that this works on an experimental ec2 instance, but
> doesn't work on the travis-ci workers.
> *ldd /usr/lib/php5/20090626/curl.so|grep gnutls*
> on the ec2 instance yields
> /usr/lib/php5/20090626/curl.so: /usr/local/lib/libcurl.so.4: no version
> information available (required by /usr/lib/php5/20090626/curl.so)
> libgnutls.so.28 => /usr/local/lib/libgnutls.so.28
> showing that it's referencing GnuTls 3.1.28 that I compiled
> but on the travis-ci workers yields
> /usr/lib/php5/20090626/curl.so: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/lib/php5/20090626/curl.so)
> libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00002aca991d0000)
> showing that it's still referencing GnuTls 2.12 (full log here
> <https://s3.amazonaws.com/archive.travis-ci.org/jobs/64888398/log.txt> )
> A var_dump(curl_version()) confirms this.
> My specific commands are found here
> Has anyone faced this problem before?
> On Sun, May 31, 2015 at 1:39 AM, shadi akiki <shadiakiki1986 at gmail.com>
>> I'm compiling gnutls 3.1.28 from source on travis-ci to use it from php.
>> Running "*pkg-config --modversion gnutls*" before the compilation shows
>> 2.12.14 whereas afterwards shows 3.1.28.
>> However, running "*var_dump(curl_version())*" as well as "*phpinfo*()"
>> before and after the compilation show 'ssl_version'="*GnuTLS/2.12.14*"
>> From digging around, I understood that php is using
>> /usr/lib/x86_64-linux-gnu/libgnutls.so.26 . My compiled gnutls is ending up
>> in /usr/local/lib/libgnutls.so.28
>> I thought that perhaps replacing libgnutls.so.26 with a symlink to libgnutls.so.28
>> could be a dirty fix, but it doesn't work. Php complains:
>> *symbol gnutls_certificate_get_x509_cas, version GNUTLS_1_4 not defined
>> in file libgnutls.so.26 with link time reference*
>> What do I still need to do to get php to use my compiled gnutls?
>> Should I recompile php from source as well?
>> Here are some files with details
>> - Log file
>> - .travis.yml file
>> - Compilation bash script
>> Best, Shadi AKIKI
> Best, Shadi AKIKI
It turned out that installing a separate php CLI on the travis-ci worker
other than the ones that it already had (in phpenv) solved it for me.
The php binary /usr/bin/php5 was linking properly to the curl and gnutls
libraries that I install in /usr/local/lib,
but the binaries that phpenv automatically used didn't.
Best, Shadi AKIKI
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gnutls-help