[freetds] installation

Daniel Fazekas fdsubs at t-online.hu
Sat Dec 2 16:33:08 EST 2006


On Dec 2, 2006, at 20:33, Matt Davies wrote:

> mssqldbmodule.c:45:24: error: sqlfront.h: No such file or directory

James already answered this part about not finding sqlfront.h, but  
that's not the only problem you're going to run into, according to  
your message.

[Matt is using Mac OS X 10.4.8]
> cd freetds-0.64/
> ./configure --prefix=/usr/local/freetds --enable-msdblib
> make
> sudo make install

By doing this, you are only building a copy of FreeTDS for the native  
architecture of your system, that is, pcc on a PowerPC Mac, or i386  
on an Intel-based Mac.

If you then try to:
> cd ../pymssql-0.8.0/
> gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
[...]
> I'm running universal macpython 2.4.4 on this mac,

...link a Universal multi-architecture copy of something else to it,  
one half of it will fail, because your FreeTDS libs will only contain  
either ppc or i386 code.

Now, your easiest choice is to simply build pymssql for your native  
architecture only as well, if you don't care for having a Universal  
build. You could do that by simply dropping all those -arch and - 
isysroot switches.

If you really want a Universal copy of FreeTDS, it's going to get a  
little more involved, as unfortunately the FreeTDS build system isn't  
really set up to handle building for multiple architecture  
simultaneously.

Your best bet is to build a copy of FreeTDS as usual, with the same  
settings, both on an Intel Mac and on a PowerPC Mac, separately.
Then use the lipo tool on all the resulting binaries to bundle the  
two different architectures together.

--
fds



More information about the FreeTDS mailing list