On Mon, Jun 1, 2015 at 2:26 PM, shadi akiki <[email protected]> wrote:
> 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. > > Running > *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 > (0x00007f58946e5000) > > 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 > <https://github.com/shadiakiki1986/gnutls-3.1-travisci/blob/master/Makefile> > Has anyone faced this problem before? > > > > On Sun, May 31, 2015 at 1:39 AM, shadi akiki <[email protected]> > wrote: > >> Hi >> >> 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*" >> only. >> >> 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 >> <https://s3.amazonaws.com/archive.travis-ci.org/jobs/64740717/log.txt> >> - .travis.yml file >> >> <https://github.com/shadiakiki1986/gnutls-3.1-travisci/blob/master/.travis.yml> >> - Compilation bash script >> >> <https://github.com/shadiakiki1986/gnutls-3.1-travisci/blob/master/updateGnutls.sh> >> >> >> -- >> Best, Shadi AKIKI >> www.akikieng.com/shadi >> > > > > -- > Best, Shadi AKIKI > www.akikieng.com/shadi > 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 www.akikieng.com/shadi
_______________________________________________ Gnutls-help mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnutls-help
