Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS 1.1 Release Candidate 2 - compiler warnings

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Mike Jetzer <mjetzer.cdc AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS 1.1 Release Candidate 2 - compiler warnings
  • Date: Fri, 15 Feb 2019 14:35:34 -0600

Hopefully the compiler error will be corrected:

gmake[4]: Entering directory `/tmp/freetds-1.1rc2/src/odbc'
CC connectparams.lo
connectparams.c:94:12: error: static declaration of
'SQLGetPrivateProfileString' follows non-static declaration
static int SQLGetPrivateProfileString(LPCSTR pszSection, LPCSTR pszEntry,
LPCSTR pszDefault, LPSTR pRetBuffer, int nRetBuffer,
^
In file included from ../../include/freetds/odbc.h:33:0,
from connectparams.c:30:
/usr/local/unixODBC-2.3.7/include/odbcinst.h:205:14: note: previous
declaration of 'SQLGetPrivateProfileString' was here
int INSTAPI SQLGetPrivateProfileString( LPCSTR lpszSection,
^
gmake[4]: [connectparams.lo] Error 1 (ignored)



We do not have the RHEL-provided version of unixODBC installed, having
instead compiled our own in /usr/local/unixODBC-2.3.7.

We invoked configure as

./configure --prefix=/usr/local/freetds-1.1rc2 \
--with-unixodbc=/usr/local/unixODBC-2.3.7


The "configure" output for freetds-1.1rc2 notes

checking for SQLGetPrivateProfileString in -lodbcinst... no


Looking at config.log, I see that

configure:19411: gcc -m32 -o conftest -g -O2 -DUNIXODBC -DHAVE_UNISTD_H
-DHAVE_PWD_H -HAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=4
-I/usr/local/unixODBC-2.3.7/include conftest.c -lodbcinst -lpthread >&5


So it looks like the failure occurs because configure is not adding an "-L"
with the unixODBC library directory.

Also in config.log, I see that odbc_config is properly reporting the
--lib-prefix correctly:

ODBC_CONFIG='/usr/local/unixODBC-2.3.7/bin/odbc_config'
ODBC_FALSE='#'
ODBC_INC='-I/usr/local/unixODBC-2.3.7/include'
ODBC_LDFLAGS='-L/usr/local/unixODBC-2.3.7/lib -lodbc'


I don't know enough about autoconf to debug this any farther.


We are currently using freetds-1.00.97. When running that version's
configure --with-unixodbc=/usr/local/unixODBC-2.3.7, I see that configure
reports

checking for SQLGetPrivateProfileString in -lodbcinst... yes

and that config.log shows

configure:19259: checking for SQLGetPrivateProfileString in -lodbcinst
configure:19284: gcc -m32 -o conftest -g -O2 -DUNIXODBC -DHAVE_UNISTD_H
-DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=4
-I/usr/local/unixODBC-2.3.7/include -L/usr/local/unixODBC-2.3.7/lib
conftest.c -lodbcinst -lpthread >&5


I see that the "configure" in freetds-1.00.97 put the unixODBC library
directory directly in LDFLAGS, rather than having a separate ODBC_LDFLAGS,
as noted in config.log:

LDFLAGS=' -L/usr/local/unixODBC-2.3.7/lib'



On Fri, Feb 15, 2019 at 1:39 PM Frediano Ziglio <freddy77 AT gmail.com> wrote:

> Hi,
> thanks, not an issue, just normal warnings, I don't plan to remove
> them for version 1.1.
> Some fixes are part of a large series I'm slowly integrating
>
> Regards,
> Frediano
>
> Il giorno lun 11 feb 2019 alle ore 09:18 Sebastien FLAESCH
> <sf AT 4js.com> ha scritto:
> >
> > Attached, compiler warnings with gcc 8.2.0 ...
> >
> > Seb
> >
> > On 2/9/19 7:58 PM, Frediano Ziglio wrote:
> > > Hi,
> > > just another updated release candidate.
> > >
> > > Changes since previous release candidate:
> > > - Project files for OpenVMS upgraded. Thanks to Craig for the quick
> update;
> > > - Updated documentation on protocol version and other minor changes;
> > > - Cleaned some code for old protocols;
> > > - Resolved some minor issues with CI and tests;
> > > - CMake build (like autotools) now default to TDS protocol version
> "auto";
> > > - Improved TDS protocol detection in case of failure.
> > >
> > > General release changes (as in NEWS file):
> > >
> > >
> > > Summary of Changes in release 1.1
> > > --------------------------------------------
> > > User visible (not in a particular order):
> > > - Changed default TDS protocol version during configure to "auto".
> > > Versions 4.2 and 7.0 are no longer accepted for default, you may
> > > still specify an explicit version to connect to obsolete servers
> > > ("auto" won't attempt these versions);
> > > - allows to disable TLS 1.0 support;
> > > - pool server allows to specify different username/password for server
> > > and clients allowing to hide internal server logins;
> > > - tsql utility now send final partial query to server to avoid to have
> > > to specify a final "GO" line to terminate commands;
> > > - better support for Microsoft cluster, client will attempt multiple
> > > connection to server at the same time if DNS reply multiple IPs;
> > > - MONEY/SMALLMONEY types are now formated with 4 decimal digits to
> > > avoid truncation;
> > > - MARS support is now compiled by default;
> > > - pool server is now compiled by default;
> > > - Fixed SQL_ATTR_LOGIN_TIMEOUT for ODBC;
> > > - Fixed large integer numbers for ODBC RPC constants;
> > > - Fixed encrypted logins if "auto" protocol version is used;
> > > - Support CS_TIMEOUT and CS_LOGIN_TIMEOUT properties under CTLibrary;
> > > - Added a dbacolname function in DBLibrary, similar to dbcolname but
> > > for compute columns (mainly for Sybase now, Microsoft removed
> > > support for compute columns);
> > > - NTLMv2 is now on by default.
> > >
> > > Implementation:
> > > - Improved UTF-8 performances;
> > > - Use more stdint.h style definitions (like uint32_t);
> > > - Use bool type instead of int;
> > > - pool server compile under Windows too (not as capable as Unix
> > > version);
> > > - CMake build is now able to do an installation;
> > > - Added a src/utils directory to collect all common code not strictly
> > > related to replacements or TDS;
> > > - Simplified makefiles;
> > > - Support CP1252 encoding in internal trivial iconv;
> > > - Better ODBC detection. Allows to specify a directory with
> > > --with-iodbc to specify custom iOBDC.
> > >
> > >
> > > Kind Regards,
> > > Frediano
> > > _______________________________________________
> > > FreeTDS mailing list
> > > FreeTDS AT lists.ibiblio.org
> > > https://lists.ibiblio.org/mailman/listinfo/freetds
> > >
> >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > https://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> https://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page