freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83
- From: Zhouhua Li <zhouhua.li AT gmail.com>
- To: ikorot AT earthlink.net, FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83
- Date: Thu, 29 Jul 2010 14:51:04 -0400
I have to correct what I said about client solutions. Ct-lib and
db-lib did get built. Only ODBC failed. (To answer your question, I
have to retrace what I did. I was trying to build two versions of
FreeTDS at the same time. So there was a little confusion.)
However I thinks the failure of ODBC is irrelevant to my question
since I only want to use libtds. I have my own client, like ODBC, that
uses the library.
Anyway, here's the answer to your question. Configure runs fine. It
fails from make. Here's the error:
Creating library file: .libs/libtdsodbc.dll.a
Cannot export SQLColAttributeW: symbol not defined
Cannot export SQLColumnPrivilegesW: symbol not defined
Cannot export SQLColumnsW: symbol not defined
Cannot export SQLConnectW: symbol not defined
Cannot export SQLDescribeColW: symbol not defined
Cannot export SQLDriverConnectW: symbol not defined
Cannot export SQLErrorW: symbol not defined
Cannot export SQLExecDirectW: symbol not defined
Cannot export SQLForeignKeysW: symbol not defined
Cannot export SQLGetConnectAttrW: symbol not defined
Cannot export SQLGetConnectOptionW: symbol not defined
Cannot export SQLGetCursorNameW: symbol not defined
Cannot export SQLGetDescFieldW: symbol not defined
Cannot export SQLGetDescRecW: symbol not defined
Cannot export SQLGetDiagFieldW: symbol not defined
Cannot export SQLGetDiagRecW: symbol not defined
Cannot export SQLGetInfoW: symbol not defined
Cannot export SQLGetStmtAttrW: symbol not defined
Cannot export SQLNativeSqlW: symbol not defined
Cannot export SQLPrepareW: symbol not defined
Cannot export SQLPrimaryKeysW: symbol not defined
Cannot export SQLProcedureColumnsW: symbol not defined
Cannot export SQLProceduresW: symbol not defined
Cannot export SQLSetConnectAttrW: symbol not defined
Cannot export SQLSetConnectOptionW: symbol not defined
Cannot export SQLSetCursorNameW: symbol not defined
Cannot export SQLSetDescFieldW: symbol not defined
Cannot export SQLSetStmtAttrW: symbol not defined
Cannot export SQLSpecialColumnsW: symbol not defined
Cannot export SQLStatisticsW: symbol not defined
Cannot export SQLTablePrivilegesW: symbol not defined
Cannot export SQLTablesW: symbol not defined
collect2: ld returned 1 exit status
make[3]: *** [libtdsodbc.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
On Thu, Jul 29, 2010 at 2:19 PM, <ikorot AT earthlink.net> wrote:
> You said that there was an error building libtdsodbc.so.
> Was it from configure or make? What the error said?
>
>
> -----Original Message-----
>>From: Zhouhua Li <zhouhua.li AT gmail.com>
>>Sent: Jul 29, 2010 11:10 AM
>>To: ikorot AT earthlink.net
>>Cc: FreeTDS Development Group <freetds AT lists.ibiblio.org>
>>Subject: Re: [freetds] tsql:Adaptive Server connection failed with MinGW
>>Build of FreeTDS 0.83
>>
>>I have some code on Linux using libtds that connects to the same
>>machine and same port. It works perfectly. Now my goal is to make the
>>same code work on Window.
>>
>>
>>On Thu, Jul 29, 2010 at 2:00 PM, <ikorot AT earthlink.net> wrote:
>>> Hi,
>>> Are you sure that SQL Server listens on the 1433?
>>> AFAIR, this is the default port, which can be changed during install....
>>>
>>>
>>> -----Original Message-----
>>>>From: Zhouhua Li <zhouhua.li AT gmail.com>
>>>>Sent: Jul 29, 2010 7:32 AM
>>>>To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
>>>>Cc: ikorot AT earthlink.net
>>>>Subject: Re: [freetds] tsql:Adaptive Server connection failed with MinGW
>>>>Build of FreeTDS 0.83
>>>>
>>>>Sorry I did not make it clear in my previous emails.
>>>>
>>>>I used MinGW for Windows and MSYS combination to run the configure
>>>>scripts that comes with FreeTDS and make the build. I did not create
>>>>my own project file. The configure/make scripts only successfully
>>>>built the libtds.a but failed on other client solutions such as odbc,
>>>>ct_lib and db_lib. However libtds.a is all I need. I then proceed to
>>>>run make in /src/apps subdirectory to build tsql utility program that
>>>>comes with the FreeTDS package so that I can make sure libtds.a works
>>>>fine.
>>>>
>>>>The command I used to run tsql is along the lines as follows:
>>>>
>>>>TDSDUMP=dump3.log tsql -S SQL8 -D base_test -U
>>>>'MyCompanyDomain\myaccount' - P mypassword -I /c/f2/freetds.conf
>>>>
>>>>The configure file freetds.conf reads like this:
>>>>
>>>>[global]
>>>> # TDS protocol version
>>>>; tds version = 7.0
>>>>
>>>> # Whether to write a TDSDUMP file for diagnostic purposes
>>>> # (setting this to /tmp is insecure on a multi-user system)
>>>>; dump file = /c/f2/src/apps/dump3.log
>>>>; debug flags = 0xffff
>>>>
>>>> # Command and connection timeouts
>>>>; timeout = 10
>>>>; connect timeout = 10
>>>>
>>>> # If you get out-of-memory errors, it may mean that your client
>>>> # is trying to allocate a huge buffer for a TEXT field.
>>>> # Try setting 'text size' to a more reasonable limit
>>>> text size = 64512
>>>>
>>>># A typical Microsoft server
>>>>[SQL8]
>>>> host = SQL8.MyCompany.COM
>>>> port = 1433
>>>> tds version = 7.0
>>>>
>>>>
>>>>
>>>>
>>>>On Thu, Jul 29, 2010 at 3:15 AM, Frediano Ziglio <freddy77 AT gmail.com>
>>>>wrote:
>>>>> Recently I did some tests with cross compiled version for Windows and
>>>>> I can say ODBC tests works correctly as expected. In this case I used
>>>>> MingW for Linux, configure script and Makefiles we provided. I imagine
>>>>> you build some kind of project file for MingW for Windows or just used
>>>>> configure scripts? If you wrote a project file did you follow
>>>>> instructions at README.Windows ??
>>>>>
>>>>> Regards
>>>>> Frediano Ziglio
>>>>>
>>>>> 2010/7/29 <ikorot AT earthlink.net>:
>>>>>> Hi, Zhouhua,
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>>>From: Zhouhua Li <zhouhua.li AT gmail.com>
>>>>>>>Sent: Jul 28, 2010 2:22 PM
>>>>>>>To: ikorot AT earthlink.net, FreeTDS Development Group
>>>>>>><freetds AT lists.ibiblio.org>
>>>>>>>Subject: Re: [freetds] tsql:Adaptive Server connection failed with
>>>>>>>MinGW Build of FreeTDS 0.83
>>>>>>>
>>>>>>>Yes, I can ping/telnet to the machine/port without problem.
>>>>>>
>>>>>> OK.
>>>>>>
>>>>>>>All
>>>>>>>machines sit in an intranet so there is no firewall between them.
>>>>>>
>>>>>> OK.
>>>>>>
>>>>>>> I
>>>>>>>only managed to build libtds.lib and tsql, not any client solutions.
>>>>>>>It's my understanding tsql only needs libtds.lib. Please correct me if
>>>>>>>I'm wrong. Finally the database I'm trying to connect to is Microsoft
>>>>>>>SQL Server not Sybase.
>>>>>>
>>>>>> What is you configure options?
>>>>>> Can you post some code that you are using to connect to the DB?
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>>>
>>>>>>>Thank you.
>>>>>>>
>>>>>>>Zhouhua
>>>>>>>
>>>>>>>
>>>>>>>On Wed, Jul 28, 2010 at 4:20 PM, <ikorot AT earthlink.net> wrote:
>>>>>>>> Hi, Zhouhua,
>>>>>>>>
>>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>>>From: Zhouhua Li <zhouhua.li AT gmail.com>
>>>>>>>>>Sent: Jul 28, 2010 6:42 AM
>>>>>>>>>To: freetds AT lists.ibiblio.org
>>>>>>>>>Subject: [freetds] tsql:Adaptive Server connection failed with MinGW
>>>>>>>>>Build of FreeTDS 0.83
>>>>>>>>>
>>>>>>>>>There was a discussion about a similar topic a few months ago. I can
>>>>>>>>>not see what the conclusion is and wonder if somebody can help me. I
>>>>>>>>>played with different TDS protocol versions, 7.0 and 8.0, when
>>>>>>>>>issuing
>>>>>>>>>tsql command. The error and log messages are similar.
>>>>>>>>>
>>>>>>>>>>>>> Facts:
>>>>>>>>>
>>>>>>>>>Compiler: MinGW + Msys, gcc version 4.2.1
>>>>>>>>>Database: MS SQL Server 2005
>>>>>>>>>
>>>>>>>>>>>>> Error from tsql command:
>>>>>>>>>
>>>>>>>>>Msg 20017, Level 9, State -1, Server OpenClient, Line -1
>>>>>>>>>Unexpected EOF from the server
>>>>>>>>>Msg 20002, Level 9, State -1, Server OpenClient, Line -1
>>>>>>>>>Adaptive Server Connection failed
>>>>>>>>>There was a problem connecting to the server
>>>>>>>>>
>>>>>>>>>>>>> log file:
>>>>>>>>>
>>>>>>>>>log.c:196:Starting log file for FreeTDS 0.83.dev.20100720
>>>>>>>>> on 2010-07-27 22:37:44 with debug flags 0x4fff.
>>>>>>>>>iconv.c:337:tds_iconv_open(003D43A8, 1252)
>>>>>>>>>iconv.c:312:Using trivial iconv
>>>>>>>>>iconv.c:197:local name for ISO-8859-1 is ISO-8859-1
>>>>>>>>>iconv.c:197:local name for UTF-8 is UTF-8
>>>>>>>>>iconv.c:197:local name for UCS-2LE is UCS-2LE
>>>>>>>>>iconv.c:197:local name for UCS-2BE is UCS-2BE
>>>>>>>>>iconv.c:365:setting up conversions for client charset "1252"
>>>>>>>>>iconv.c:367:preparing iconv for "1252" <-> "UCS-2LE" conversion
>>>>>>>>>iconv.c:443:tds_iconv_info_init: client charset name "1252"
>>>>>>>>>unrecognized
>>>>>>>>>net.c:225:Connecting to 10.1.0.163 port 1433 (TDS version 7.0)
>>>>>>>>>net.c:281:tds_open_socket: connect(2) returned "WSAEWOULDBLOCK:
>>>>>>>>>Resource temporarily unavailable."
>>>>>>>>>net.c:321:tds_open_socket() succeeded
>>>>>>>>>util.c:156:Changed query state from DEAD to IDLE
>>>>>>>>>login.c:771:quietly sending TDS 7+ login packet
>>>>>>>>>token.c:328:tds_process_login_tokens()
>>>>>>>>>util.c:331:tdserror(003D42A8, 003D43A8, 20017, 0)
>>>>>>>>>util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
>>>>>>>>>util.c:384:tdserror: returning TDS_INT_CANCEL(2)
>>>>>>>>>util.c:156:Changed query state from IDLE to DEAD
>>>>>>>>>token.c:337:looking for login token, got 0()
>>>>>>>>>token.c:122:tds_process_default_tokens() marker is 0()
>>>>>>>>>token.c:125:leaving tds_process_default_tokens() connection dead
>>>>>>>>>login.c:462:login packet accepted
>>>>>>>>>util.c:331:tdserror(003D42A8, 003D43A8, 20002, 0)
>>>>>>>>>util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
>>>>>>>>>util.c:384:tdserror: returning TDS_INT_CANCEL(2)
>>>>>>>>>mem.c:615:tds_free_all_results()
>>>>>>>>
>>>>>>>> Are you able to connect to the machine/port with telnet?
>>>>>>>> Do you running any firewall on the Adaptive Server machine?
>>>>>>>> What client solution are you using: ODBC, ct-lib or db-lib?
>>>>>>>>
>>>>>>>> For an Sybase Adaptive Server you can use TDS 5.0 protocol, but
>>>>>>>> thats not
>>>>>>>> really important here. You need to have a connection.
>>>>>>>>
>>>>>>>> Thank you.
>>>>>>>>
>>>>>>>>>_______________________________________________
>>>>>>>>>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
>>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>
>>>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
ikorot, 07/28/2010
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
Frediano Ziglio, 07/29/2010
- Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83, Zhouhua Li, 07/29/2010
- <Possible follow-up(s)>
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
ikorot, 07/29/2010
- Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83, Zhouhua Li, 07/29/2010
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
ikorot, 07/29/2010
- Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83, Zhouhua Li, 07/29/2010
- Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83, ikorot, 07/29/2010
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
Frediano Ziglio, 07/29/2010
Archive powered by MHonArc 2.6.24.