Comments (23)
Original comment by [email protected]
on 8 Mar 2011 at 3:34
- Added labels: PyMssql-2.x
from pymssql.
This happens to me too, with the trunk checked out on 2011/07/06.
Original comment by [email protected]
on 7 Jul 2011 at 11:03
from pymssql.
This is the issue I'm having with the 2.0 beta. How am I supposed to compile on
OSX?
Original comment by [email protected]
on 27 Oct 2011 at 6:57
from pymssql.
FWIW, OSX was not targeted as a platform that 2.0 beta would run under.
For this to work on OSX, you would need to:
* compile FreeTDS for OSX (google or hit the FreeTDS mailing list for more info)
* customize the setup.py file so that your compiled binaries & header files are
used instead of the ones shipped with pymssql
* install pymssql
I know thats vague, but that is all I have time for at the moment. I don't
have OSX and not sure anyone else that is working on the project does either.
So if you want to dig in and submit patches, that would help.
Thanks.
Original comment by [email protected]
on 31 Oct 2011 at 11:15
from pymssql.
Ok, well good to know you didn't expect it to work on OSX. (i.e. it's not that
I'm doing something wrong).
I'll see if I can't get it to compile on OSX.
Original comment by [email protected]
on 1 Nov 2011 at 5:15
from pymssql.
Asuming that you've installed FreeTDS with brew. The attached setup.py should
be able to replace the one in the hg repo. Note that I have no idea of how
setup.py files are suppose to work.
I don't think this is a particular generic fix, nor would I bet my company on
it, but it seems to get the job done.
Original comment by [email protected]
on 14 Dec 2011 at 10:14
Attachments:
from pymssql.
Original comment by [email protected]
on 8 Mar 2012 at 3:04
- Changed title: won't build under OSX
from pymssql.
Original comment by [email protected]
on 8 Mar 2012 at 3:04
- Changed state: Accepted
from pymssql.
Attached is a patch implementing the approach in comment 6 expanded to include
other sources of FreeTDS.
Can also be found here:
http://code.google.com/r/dinkypumpkin-pymssql/source/browse/setup.py
Original comment by dinkypumpkin
on 30 Apr 2012 at 6:05
Attachments:
from pymssql.
[deleted comment]
from pymssql.
The original problem reported here was when installing from an svn repository,
which is presumably old, because the project is using Mercurial now.
Can the problem be reproduced when pip installing from the hg tip?
Original comment by [email protected]
on 7 Jan 2013 at 5:10
- Changed title: won't build under OSX: "_mssql.c: No such file or directory"
from pymssql.
Answering my own question in comment 11, yes, a pip instal still fails from hg
tip:
(pymssql_issue_14)marca@marca-mac:/tmp$ pip install -e
'hg+https://code.google.com/p/pymssql/#egg=pymssql'
Obtaining pymssql from hg+https://code.google.com/p/pymssql/#egg=pymssql
Cloning hg https://code.google.com/p/pymssql/ to ./pymssql_issue_14/src/pymssql
warning: code.google.com certificate with fingerprint
ca:5e:a3:f8:40:90:6b:ea:25:19:6f:a8:a1:82:bb:6c:6b:2d:96:85 not verified (check
hostfingerprints or web.cacerts config setting)
Running setup.py egg_info for package pymssql
warning: no files found matching '.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '.pxd' under directory 'Cython/Utility'
clang: warning: argument unused during compilation: '-mno-fused-madd'
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/easy_install-47oX_i/Cython-0.17.4/Cython/Plex/Scanners.c:7092:18: warning: unused function '__Pyx_CyFunction_New' [-Wunused-function]
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
^
1 warning generated.
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/easy_install-47oX_i/Cython-0.17.4/Cython/Plex/Scanners.c:3005:31: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
__pyx_v_self->input_state = __pyx_v_input_state;
~ ^~~~~~~~~~~~~~~~~~~
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/easy_install-47oX_i/Cython-0.17.4/Cython/Plex/Scanners.c:7092:18: warning: unused function '__Pyx_CyFunction_New' [-Wunused-function]
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
^
2 warnings generated.
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
Installed /private/tmp/pymssql_issue_14/src/pymssql/Cython-0.17.4-py2.6-macosx-10.8-intel.egg
cc -c /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimelFSzNb.c -o var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimelFSzNb.o
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimelFSzNb.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (int argc, char **argv) {
^~~~
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimelFSzNb.c:2:5: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
clock_gettime();
^
2 warnings generated.
cc var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimelFSzNb.o -lrt -o a.out
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
warning: no files found matching 'win32/freetds.zip'
Installing collected packages: pymssql
Running setup.py develop for pymssql
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimev7h1nL.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (int argc, char **argv) {
^~~~
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimev7h1nL.c:2:5: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
clock_gettime();
^
2 warnings generated.
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
warning: no files found matching 'win32/freetds.zip'
building '_mssql' extension
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/sw/include -I/private/tmp/pymssql_issue_14/src/pymssql/freetds/darwin_64/include -I/opt/local/include -I/opt/local/include/freetds -I/opt/local/freetds/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mssql.c -o build/temp.macosx-10.8-intel-2.6/_mssql.o -DMSDBLIB
clang: error: no such file or directory: '_mssql.c'
clang: error: no input files
error: command 'clang' failed with exit status 1
Complete output from command /private/tmp/pymssql_issue_14/bin/python2.6 -c "import setuptools; file='/private/tmp/pymssql_issue_14/src/pymssql/setup.py'; exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" develop --no-deps:
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimev7h1nL.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (int argc, char **argv) {
^~~~
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimev7h1nL.c:2:5:
warning: implicit declaration of function 'clock_gettime' is invalid in C99
[-Wimplicit-function-declaration]
clock_gettime();
^
2 warnings generated.
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
running develop
running egg_info
writing pymssql.egg-info/PKG-INFO
writing top-level names to pymssql.egg-info/top_level.txt
writing dependency_links to pymssql.egg-info/dependency_links.txt
writing entry points to pymssql.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pymssql.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'win32/freetds.zip'
writing manifest file 'pymssql.egg-info/SOURCES.txt'
running build_ext
building '_mssql' extension
creating build
creating build/temp.macosx-10.8-intel-2.6
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common
-fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG
-Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall
-Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/sw/include
-I/private/tmp/pymssql_issue_14/src/pymssql/freetds/darwin_64/include
-I/opt/local/include -I/opt/local/include/freetds -I/opt/local/freetds/include
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c
_mssql.c -o build/temp.macosx-10.8-intel-2.6/_mssql.o -DMSDBLIB
clang: error: no such file or directory: '_mssql.c'
clang: error: no input files
error: command 'clang' failed with exit status 1
Command /private/tmp/pymssql_issue_14/bin/python2.6 -c "import setuptools;
file='/private/tmp/pymssql_issue_14/src/pymssql/setup.py';
exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))"
develop --no-deps failed with error code 1 in
/private/tmp/pymssql_issue_14/src/pymssql
Storing complete log in /Users/marca/.pip/pip.log
It also fails if you invoke `pip install` on the already unpacked directory:
(pymssql_issue_14)marca@marca-mac:/tmp/pymssql_issue_14/src$ pip install
pymssql/
Unpacking ./pymssql
Running setup.py egg_info for package from file:///private/tmp/pymssql_issue_14/src/pymssql
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimecfCZKk.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (int argc, char *_argv) {
^~~~
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimecfCZKk.c:2:5: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
clock_gettime();
^
2 warnings generated.
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
warning: no files found matching 'win32/freetds.zip'
Installing collected packages: pymssql
Running setup.py install for pymssql
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimekbDkuc.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (int argc, char *_argv) {
^~~~
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimekbDkuc.c:2:5: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
clock_gettime();
^
2 warnings generated.
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
building '_mssql' extension
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/sw/include -I/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-eiC890-build/freetds/darwin_64/include -I/opt/local/include -I/opt/local/include/freetds -I/opt/local/freetds/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mssql.c -o build/temp.macosx-10.8-intel-2.6/_mssql.o -DMSDBLIB
clang: error: no such file or directory: '_mssql.c'
clang: error: no input files
error: command 'clang' failed with exit status 1
Complete output from command /private/tmp/pymssql_issue_14/bin/python2.6 -c "import setuptools;file='/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-eiC890-build/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-7jMSpm-record/install-record.txt --single-version-externally-managed --install-headers /private/tmp/pymssql_issue_14/include/site/python2.6:
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimekbDkuc.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (int argc, char **argv) {
^~~~
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/clock_gettimekbDkuc.c:2:5:
warning: implicit declaration of function 'clock_gettime' is invalid in C99
[-Wimplicit-function-declaration]
clock_gettime();
^
2 warnings generated.
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
running install
running build
running build_ext
building '_mssql' extension
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common
-fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG
-Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall
-Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/sw/include
-I/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-eiC890-build/freetds/darw
in_64/include -I/opt/local/include -I/opt/local/include/freetds
-I/opt/local/freetds/include
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c
_mssql.c -o build/temp.macosx-10.8-intel-2.6/_mssql.o -DMSDBLIB
clang: error: no such file or directory: '_mssql.c'
clang: error: no input files
error: command 'clang' failed with exit status 1
Command /private/tmp/pymssql_issue_14/bin/python2.6 -c "import
setuptools;file='/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-eiC890
-build/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'),
file, 'exec'))" install --record
/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-7jMSpm-record/install-recor
d.txt --single-version-externally-managed --install-headers
/private/tmp/pymssql_issue_14/include/site/python2.6 failed with error code 1
in /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-eiC890-build
Storing complete log in /Users/marca/.pip/pip.log
The interesting thing is that if you download the code manually and do `python
setup.py develop` then it works. There is something different about having pip
do it (one possibility is that pip does `python setup.py egg_info` before
`python setup.py develop` and maybe the former downloads Cython and puts it in
the environment but the latter doesn't see it? Wild guess...)
Original comment by [email protected]
on 7 Jan 2013 at 3:39
from pymssql.
Weird. Did `pip install Cython; pip install pymssql/` and it still failed to
run the Cython step and failed with the same error.
Original comment by [email protected]
on 7 Jan 2013 at 3:58
from pymssql.
See also:
- issue #3
- issue #86
- issue #90
Original comment by [email protected]
on 7 Jan 2013 at 3:58
from pymssql.
It seems that this happens in a virtualenv that has setuptools but not in a
virtualenv that has distribute. Did a little bit of research and I am 95% sure
that this is due to some monkeypatching that setuptools does to support Pyrex
(but it's Cython-unaware). This is a setuptools bug; distribute seems to have
fixed it. There are some workarounds floating around out there and I canl try a
couple out and see if they fix this issue. A few links:
- http://mail.python.org/pipermail/distutils-sig/2007-September/008207.html
- https://github.com/sampsyo/pylastfp/blob/master/setup.py
This is not unique to OS X. I reproduced it on Ubuntu as well. I think the key
is whether you have setuptools or distribute installed. So I am changing the
title of this issue to remove the "OS X" part and clarify a bit.
Original comment by [email protected]
on 7 Jan 2013 at 4:59
- Changed title: pip install (with setuptools) fails with "_mssql.c: No such file or directory" because Cython of .pyx files is skipped
from pymssql.
Issue 86 has been merged into this issue.
Original comment by [email protected]
on 8 Jan 2013 at 12:07
from pymssql.
OK, I think (I hope! :-) that I have a fix for this long-standing issue:
http://code.google.com/p/pymssql/source/detail?r=86a73a19d5bd627e72dbc8b0a924d29
7b10682c0
Hopefully, folks can try this out and verify whether the fix works or not?
Original comment by [email protected]
on 8 Jan 2013 at 12:25
- Changed state: Fixed
from pymssql.
Issue 86 has been merged into this issue.
Original comment by [email protected]
on 8 Jan 2013 at 12:27
from pymssql.
I can confirm the problem and the fix. I wondered why this hit colleagues but
not me, and it's because they used setuptools in VEs. Thanks for running this
down.
Original comment by dinkypumpkin
on 8 Jan 2013 at 2:44
from pymssql.
Great! Thanks for verifying, dinkypumpkin!
Original comment by [email protected]
on 8 Jan 2013 at 3:39
- Changed state: Verified
- Added labels: pip
from pymssql.
[deleted comment]
from pymssql.
easy_install pymssql returns:
| warning: no files found matching 'win32/freetds.zip'
| /usr/bin/ld: cannot find -lct
| collect2: ld returned 1 exit status
| error: Setup script exited with error: command 'gcc' failed with exit status 1
Environment: Ubuntu 12.04 using *virtualenv*.
Any fix for that one? File new ticket?
Feedback greatly appreciated.
Original comment by [email protected]
on 23 May 2013 at 8:06
from pymssql.
Hey Vlad,
That sounds like a different issue. I think it would be best to file a new
ticket. I haven't seen that "-lct" linker error before myself. Does `pip
install pymssql` work any better than easy_install or do you get the same error?
Original comment by [email protected]
on 24 May 2013 at 4:06
from pymssql.
Related Issues (20)
- Failure to pass Unicode characters to callproc; failing test: tests.test_sprocs.TestCallProcFancy.testCallProcWithUnicodeStringWithRussianCharacters HOT 7
- When pymssql.connect() - DB-Lib error message 20002, severity 9;Adaptive Server connection failed HOT 1
- Fix test_config.py typos. HOT 1
- Small fix about TDS protocol version in a comment HOT 1
- Fix a small bug in SP tests HOT 3
- Fix SP name handling in threaded test so we can actually run it. HOT 2
- Feature for discussion (with patch): pymssql_shell HOT 2
- A few tests fail if running on a system that has SQL Server available on port 1433 HOT 1
- add function for getting FreeTDS version HOT 1
- datetime conversion to sql is not converting sub-seconds correctly HOT 5
- memory leaks (patches included) HOT 24
- pymssql-2.0.0b1-dev-20130403.tar.gz doesn't compile due to /usr/bin/ld: cannot find -lct HOT 8
- Installer issue HOT 1
- error: unrecognized command line option "-Wno-parentheses-equality" HOT 8
- pymssql.so: undefined symbol: __fread_chk HOT 5
- Support "with" statement (PEP 343) HOT 5
- Can't compile on OS X 10.8.4 HOT 10
- Review pymssql result processing code
- Make Cython not necessary when pymssql.c and _mssql.c are already present HOT 1
- IOError: [Errno 2] No such file or directory: 'ChangeLog_highlights.rst' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymssql.