2

I am trying to create a whl for pymssql that includes FreeTDS with GNUTLS support. My build is on cflinuxfs2 on docker which is based off ubuntu 14.04. This image includes gnutls, which I compiled FreeTDS R1_00 against with the options:

--enable-msdblib \
--enable-sspi \
--sysconfdir=/etc/freetds \
--with-tdsver=7.1 \
--disable-apps \
--enable-static \
--disable-shared \
--disable-server \
--disable-pool \
--disable-odbc \
--with-gnutls  \

I am attempting to follow the directions in the PYMSSQL documentation's steps they followed to create the public whl (without tls), by compiling with -fPIC set.

I have set:

LDFLAGS="-Wl,-Bstatic -Bsymbolic -l:libsybdb.a -Wl,-Bdynamic -lgnutls -Wl,-Bdynamic"

Before running the setup. PY within the PYMSSQL library and the resulting whl is not including gnutls symbols. When I import pymssql I get:

ImportError: /usr/lib64/python2.7/site-packages/pymssql.so: undefined symbol: gnutls_pem_base64_decode

What should I do to include dynamic references to the gnutls symbols used in FreeTDS within pymssql.so?

Is there a better way to do ANY of this? At the end of the day I need a whl that INCLUDES FreeTDS with TLS support so I can include it with a flask app that will run on python_buildpack on cloudfoundry.

5377037
  • 9,493
  • 12
  • 43
  • 73
  • It kind of looks like you're missing a shared library. What happens if your run `ldd pymssql.so`? Where does it find the GNUTLS library? Is that part of the standard `cflinuxfs2` docker image or did you have to install that with `apt`? – Daniel Mikusa Oct 01 '17 at 16:51
  • Also, can you use openssl instead of GNUTLS? You might have an easier time with it. – Daniel Mikusa Oct 01 '17 at 16:53

0 Answers0