Re: OSX distribution

Merle Reinhart <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Frediano,

Yes, Apple has deprecated a number of open source packages including iODBC.  They are still including the libraries to allow older apps to continue running, but have removed the include files so that new apps can’t use the built-in libraries.

They took that stance several versions of OS X ago.  Since then, I’ve been building iODBC myself (I use the source tarball from iodbc.org) and linking FreeTDS successfully against that.  My configure line for iODBC is:

sh bootstrap.sh
./configure --prefix=/usr/local/iodbc --with-iodbc-inidir=/Library/ODBC --disable-gui CFLAGS="-arch i386 -arch x86_64"


I also build against the Fink libraries (should work with MacPorts and HomeBrew as well) which pulls in a newer readline, a newer libiconv, recent openssl, etc.

The configure line I use for FreeTDS is:

./configure --with-iodbc=/usr/local/iodbc --enable-sybase-compat --prefix=/usr/local/freetds --with-libiconv-prefix=/sw --disable-debug --disable-server --disable-pool --enable-krb5 CC=clang

This works well for use where I work.  We use sqsh for sql access, odbc access via python/pyodbc, tcl tdbc and via lisp.  The databases we access are Sybase and MS SQL with Mac OS X, Linux and Solaris.

I’m not sure what to suggest for a FreeTDS build on Mac OS X without any additional external packages as I’m not sure how many features would have to be
left behind in that situation (or if would work at all given what Apple as deprecated and will likely completely remove in a future OS release).

Merle



 

> On Jun 12, 2016, at 10:50 AM, Frediano Ziglio <[email protected]> wrote:
> 
> 2016-06-11 8:58 GMT+01:00 Frediano Ziglio <[email protected]>:
>> Hi Merle,
>>  thanks to test it out. I think now the big concern about Mac OS X is
>> the OpenSSL support removal from Apple. Would be great to have the
>> support for Mac OS X system libraries for TLS support.
>> I have a Mac so I could try however I was not able to compile FreeTDS
>> with iODBC. I also installed iODBC (why is not included by default?)
>> but FreeTDS was not finding the headers/library. Should I add some
>> option?
>> 
> 
> I tried with the Mac OS X and I would have some feedback...
> - the iODBC library is contained in the Essential package (libiodbc.dylib);
> - Essential package contains pkgconfig file (int /usr/lib/pkgconfig)
> but not pkg-config script;
> - Xcode does not contain pkg-config either;
> - Apple removed isql.h and other iODBC include files from Xcode MacOSX
> 10.8 include directory. Also they removed iodbc-config. Did they
> decide to deprecate iODBC?
> - I installed iODBC PKG from iODBC website. The isql.h include try to
> include a <iODBC/sql.h> as isql.h is not supported anymore however
> there is no iODBC directory/link which contains a sql.h so the include
> fails!
> 
> Looks like they are trying to make thing much harder for developers :-(
> 
> Not counting that my PKG database has still Xcode MacOSX 10.8 files
> but files are not present anymore.
> 
>> Recently I had a report stating that ODBC on Mac OS X is compiling as
>> module instead of library causing some problems. I don't know if the
>> DM load drivers as module or as library. Actually there is no such
>> difference on other operating systems. What the difference between a
>> module and a library on Mac OS X?
>> Looking at http://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx
>> looks like module were required for dynamic loading. Nowadays however
>> dynamic libraries work always. I think the best option would be to use
>> modules if DM is used or library otherwise taking attention to link
>> only to DM instead of module.
>> 
> 
> Frediano
> 
>> 
>> 2016-06-10 15:10 GMT+01:00 Merle Reinhart <[email protected]>:
>>> Frediano,
>>> 
>>> That tarball fixes the compile issue at least on Mac OS X 10.11.x (El Capitan).  Thanks!!!
>>> 
>>> It turns out the problem would only occur when compiling FreeTDS with iodbc.  It was fine compile with unixodbc.  I finally tracked down 'why' it occurs.
>>> 
>>> In iodbc, the sql.h include calls sqltypes.h which calls iodbcunix.h which has a conditional definition of BYTE:
>>> #if defined (OBSOLETE_WINDOWS_TYPES)
>>> typedef unsigned char           BYTE;
>>> #endif
>>> 
>>> 
>>> In unixodbc, the sql.h include calls sqltypes.h which contains an unconditional definition of BYTE:
>>> typedef unsigned char           BYTE;
>>> 
>>> So, the compile would fail using iodbc apparently due to OBSOLETE_WINDOWS_TYPES not being defined anywhere, but would work using unixodbc.
>>> 
>>> I was just about to report the exact same issue when I saw Ryan's mail.
>>> 
>>> 
>>> Again, thank you very much for all the work.
>>> 
>>> Merle
>>> 
>>> 
>>> 
>>>> Message: 6
>>>> Date: Fri, 10 Jun 2016 11:59:50 +0100
>>>> From: Frediano Ziglio <[email protected]>
>>>> To: FreeTDS Development Group <[email protected]>
>>>> Subject: Re: [freetds] OSX distribution
>>>> Message-ID:
>>>>      <CAHt6W4e0QrzuEAK8Gi4g1a9PxuN3uckDxeG1zi9M7xd7U_d40A@mail.gmail.com>
>>>> Content-Type: text/plain; charset=UTF-8
>>>> 
>>>> 2016-06-06 12:25 GMT+01:00 Ryan Schmidt <[email protected]>:
>>>>> 
>>>>> On Jun 6, 2016, at 5:06 AM, Frediano Ziglio wrote:
>>>>> 
>>>>>> 2016-06-05 20:17 GMT+01:00 Igor Korot <[email protected]>:
>>>>>>> Hi, ALL,
>>>>>>> Is there a dmg file to download for the release?
>>>>>>> 
>>>>>>> Thank you.
>>>>>> 
>>>>>> There is actually not any official Mac OS X release package.
>>>>> 
>>>>> I'm the maintainer of freetds in the MacPorts package management system, and unfortunately, I've found that freetds 1.00 does not compile on OS X. (0.95.x versions did.) The error is:
>>>>> 
>>>>> 
>>>>>   In file included from odbc.c:51:
>>>>>   ../../include/odbcss.h:300:8: error: unknown type name 'BYTE'
>>>>>           const BYTE * colptr;
>>>>>                 ^
>>>>>   ../../include/odbcss.h:305:29: error: unknown type name 'BYTE'
>>>>>   bcp_colptr(HDBC hdbc, const BYTE * colptr, int table_column)
>>>>>                               ^
>>>>>   ../../include/odbcss.h:343:8: error: unknown type name 'BYTE'
>>>>>           const BYTE * varaddr;
>>>>>                 ^
>>>>>   ../../include/odbcss.h:346:8: error: unknown type name 'BYTE'
>>>>>           const BYTE * terminator;
>>>>>                 ^
>>>>>   ../../include/odbcss.h:353:27: error: unknown type name 'BYTE'
>>>>>   bcp_bind(HDBC hdbc, const BYTE * varaddr, int prefixlen, int varlen,
>>>>>                             ^
>>>>>   ../../include/odbcss.h:354:8: error: unknown type name 'BYTE'
>>>>>           const BYTE * terminator, int termlen, int vartype, int table_column)
>>>>>                 ^
>>>> 
>>>> 
>>>> Could you try ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.1.tar.bz2 ?
>>>> 
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.