[freetds] sql.h not found problem

Goyal, Pravin Shyam pravin.goyal at hp.com
Mon Jul 6 06:20:12 EDT 2009


Hi,
How are you using ./configure for FreeTDS? Are you not specifying the library in which unixODBC is pre-installed? For example, I normally use, ./configure --with-tdsver=8.0 --with-unixODBC=/usr/local

Also,
Make sure that you have below file present
/usr/local/include/sql.h. The sql.h comes from unixODBC package. I installed unixODBC inside /usr/local and hence sql.h is in include path as /usr/local/include.

Sql.h file location would depend on where have you installed unixODBC. Please make sure that sql.h is present under <unixODBC-install-path>/include/

Apart from that I sometimes configure as below on HP-Ux systems:
Configure FreeTDS
1.	Download Freetds from here: http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz

2.	Upload it on the server under /installer

3.	Unzip it using: gunzip FreeTDS-stable.tgz

4.	Un-tar it using: tar –xvf FreeTDS-stable.tar

5.	env CC=cc CFLAGS="+O2 -I/usr/local/include" LDFLAGS="-L/usr/local/lib/hpux32" ./configure --with-tdsver=8.0 --with-unixodbc=/usr/local --with-libiconv-prefix=/usr/local/lib/hpux32

6.	Once ./configure as in step 5 is done, do make

7.	Then go to /installer/freetds-0.82/src/tds/unittests/Makefile and change the line
LIBS = ../libtds.la ../../replacements/libreplacements.la  -lxnet
				To look
LIBS = ../libtds.la ../../replacements/libreplacements.la  -lxnet $(LIBICONV)

8.	Come back to /installer/freetds-0.82/

9.	Do make check. You may see many checks failed. For me it showed 13 out of 16 tests failed. But, don’t worry. Go ahead to step 10

10.	make install


Thanks and regards,
Pravin Goyal

-----Original Message-----
From: freetds-bounces at lists.ibiblio.org [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Frediano Ziglio
Sent: Monday, July 06, 2009 3:42 PM
To: FreeTDS Development Group
Subject: Re: [freetds] sql.h not found problem

Strange... perhaps a missing check, try removing --with-unixODBC
switch during configure (configure whould detect unitODBX
automatically)

freddy77


2009/7/4 RUSSELL DILKS <russelldilks at btinternet.com>:
> Got that installed via rpm - seems to be installed in /usr - and ran the configure on freetds again like so './configure –with-tdsver=8.0 –with-unixODBC=/usr' and it went through without a problem.
> BUT
> If I run a make on it I get:
> connectparams.c:90: error static declaration of 'SQLGetPrivateProfileString' follows non-static declaration.
> /usr/include/odbcinst.h.170: error previous declaration of 'SQLPrivateProfileString' was here
>
> Any ideas - the make just fails now and I am again stuck
>
> --- On Sat, 4/7/09, freetds-request at lists.ibiblio.org <freetds-request at lists.ibiblio.org> wrote:
>
>
> From: freetds-request at lists.ibiblio.org <freetds-request at lists.ibiblio.org>
> Subject: FreeTDS Digest, Vol 78, Issue 2
> To: freetds at lists.ibiblio.org
> Date: Saturday, 4 July, 2009, 6:20 PM
>
>
> Send FreeTDS mailing list submissions to
>     freetds at lists.ibiblio.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>     http://lists.ibiblio.org/mailman/listinfo/freetds
> or, via email, send a message with subject or body 'help' to
>     freetds-request at lists.ibiblio.org
>
> You can reach the person managing the list at
>     freetds-owner at lists.ibiblio.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of FreeTDS digest..."
>
>
> Today's Topics:
>
>    1. sql.h not found problem (RUSSELL DILKS)
>    2. Re: sql.h not found problem (Clint Hopper)
>    3. Re: sql.h not found problem (Frediano Ziglio)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 3 Jul 2009 17:45:03 +0000 (GMT)
> From: RUSSELL DILKS <russelldilks at btinternet.com>
> Subject: [freetds] sql.h not found problem
> To: freetds at lists.ibiblio.org
> Message-ID: <819835.25287.qm at web87007.mail.ird.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
>
> Hi Folks,
> I have a red hat enterprise server which I need to get to talk to an MS Sql server.
> I downloaded the freetds 0.8 package but when I run configure with ./configure --with-tdsver=8.0 --with-unixodbc I get the erro that it cannot find sql.h
> ?
> I have done a search for sql.h on the system and it cannot find it ?? I guess I must be missing a library or something - I am pretty new to this - but I really am stumped.
> ?
> I have searched extensively for the answer and cannot get anywhere.
> ?
> Can anyone help me out.
> ?
> Thanks
>
> ------------------------------
>
> Message: 2
> Date: Fri, 3 Jul 2009 13:00:37 -0500
> From: Clint Hopper <clint.w.hopper at gmail.com>
> Subject: Re: [freetds] sql.h not found problem
> To: FreeTDS Development Group <freetds at lists.ibiblio.org>
> Message-ID:
>     <f4476dc40907031100v214f49eaw1e94255b14041353 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Your missing a lib -dev package..I can't remember which one.
>
> On 7/3/09, RUSSELL DILKS <russelldilks at btinternet.com> wrote:
>> Hi Folks,
>> I have a red hat enterprise server which I need to get to talk to an MS Sql
>> server.
>> I downloaded the freetds 0.8 package but when I run configure with
>> ./configure --with-tdsver=8.0 --with-unixodbc I get the erro that it cannot
>> find sql.h
>>
>> I have done a search for sql.h on the system and it cannot find it ?? I
>> guess I must be missing a library or something - I am pretty new to this -
>> but I really am stumped.
>>
>> I have searched extensively for the answer and cannot get anywhere.
>>
>> Can anyone help me out.
>>
>> Thanks
>> _______________________________________________
>> FreeTDS mailing list
>> FreeTDS at lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
>
> --
> Sent from my mobile device
>
> Clint Hopper
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 4 Jul 2009 09:39:32 +0200
> From: Frediano Ziglio <freddy77 at gmail.com>
> Subject: Re: [freetds] sql.h not found problem
> To: FreeTDS Development Group <freetds at lists.ibiblio.org>
> Message-ID:
>     <aa1b71110907040039o30109972u5c8c00e8cf569b31 at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> unixodbc-devel
>
> freddy77
>
> 2009/7/3 Clint Hopper <clint.w.hopper at gmail.com>:
>> Your missing a lib -dev package..I can't remember which one.
>>
>> On 7/3/09, RUSSELL DILKS <russelldilks at btinternet.com> wrote:
>>> Hi Folks,
>>> I have a red hat enterprise server which I need to get to talk to an MS Sql
>>> server.
>>> I downloaded the freetds 0.8 package but when I run configure with
>>> ./configure --with-tdsver=8.0 --with-unixodbc I get the erro that it cannot
>>> find sql.h
>>>
>>> I have done a search for sql.h on the system and it cannot find it ?? I
>>> guess I must be missing a library or something - I am pretty new to this -
>>> but I really am stumped.
>>>
>>> I have searched extensively for the answer and cannot get anywhere.
>>>
>>> Can anyone help me out.
>>>
>>> Thanks
>>> _______________________________________________
>>> FreeTDS mailing list
>>> FreeTDS at lists.ibiblio.org
>>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>>
>>
>> --
>> Sent from my mobile device
>>
>> Clint Hopper
>> _______________________________________________
>> FreeTDS mailing list
>> FreeTDS at lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
>
>
> ------------------------------
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
>
> End of FreeTDS Digest, Vol 78, Issue 2
> **************************************
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


More information about the FreeTDS mailing list