clueboy / pymssql_issues

0 stars 0 forks source link

hg tip: 'undefined symbol: clock_gettime' error #105

Closed clueboy closed 11 years ago

clueboy commented 11 years ago

From msabramo on December 01, 2012 09:30:40

This is when running the tests off the hg tip on an Ubuntu 10.04.3 LTS system:

Traceback (most recent call last):
  File "/tmp/msabramo-pymssql/.tox/py26/lib/python2.6/site-packages/nose/loader.py", line 390, in loadTestsFromName
 49 ROOT = osp.abspath(osp.dirname(__file__))
    addr.filename, addr.module)
  File "/tmp/msabramo-pymssql/.tox/py26/lib/python2.6/site-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/tmp/msabramo-pymssql/.tox/py26/lib/python2.6/site-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/tmp/msabramo-pymssql/tests/test_config.py", line 7, in <module>
    import _mssql
ImportError: /tmp/msabramo-pymssql/.tox/py26/lib/python2.6/site-packages/pymssql-2.0.0b1_dev_20121201-py2.6-linux-x86_64.egg/_mssql.so: undefined symbol: clock_gettime

The following change fixes the issue for me: http://code.google.com/r/msabramo-pymssql/source/detail?r=2948034fa0e50b857e62604f8e1588b212c8381a

Original issue: http://code.google.com/p/pymssql/issues/detail?id=105

clueboy commented 11 years ago

From msabramo on December 01, 2012 21:43:54

Oops, this issue is a dup of http://code.google.com/p/pymssql/issues/detail?id=91

clueboy commented 11 years ago

From msabramo on December 01, 2012 23:00:39

By the way, you can see this issue happening in a Travis CI build that I just did: https://travis-ci.org/msabramo/pymssql/builds/3458012 and here's a passing Travis CI build on a branch which has the fix: https://travis-ci.org/msabramo/pymssql/builds/3458137

clueboy commented 11 years ago

From msabramo on January 03, 2013 21:05:45

I think that it also makes sense to detect whether clock_gettime is in the rt library and only link with it if it is, rather than blindly trying to link with the rt library on all Unix systems. There very well may be Unix systems that don't have librt.

I suggest the following change: https://github.com/msabramo/pymssql/commit/6335535ccda71207100f92014064b245d30ccd2b

clueboy commented 11 years ago

From msabramo on January 03, 2013 21:06:46

I have both proposed changes in the following tree on GitHub: https://github.com/msabramo/pymssql/commits/link_with_rt_on_linux

clueboy commented 11 years ago

From msabramo on January 04, 2013 10:09:39

Fixed with http://code.google.com/p/pymssql/source/detail?r=2b255b1c035f77664d171fb5eb9d05bfd5a8f149

Status: Fixed
Owner: msabramo
Cc: rsyring pupssman

clueboy commented 11 years ago

From msabramo on January 06, 2013 22:12:14

Issue 91 has been merged into this issue.