Updated FreeTDS binaries?

Discusions not-related to our Components

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 797
Joined: 18.11.2018, 17:37
Location: Hungary

Updated FreeTDS binaries?

Post by aehimself »

Hello,

As far as I can see, Zeos has bundled a FreeTDS library version 0.95.78.0 but according to their website the latest is now 1.1.40.0. Unfortunately though, they only provide source and no pre-compiled binaries. I prefer my machine clean and not to install an other compiler and different dependencies if I don't have to.
So my question is... where can I download pre-compiled 32 & 64 bit Windows binaries for FreeTDS? :)

Thanks for the help!
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Updated FreeTDS binaries?

Post by marsupilami »

Hey :)
aehimself wrote: 24.05.2020, 20:51 As far as I can see, Zeos has bundled a FreeTDS library version 0.95.78.0
I hope we don't bundle that one? It shouldn't be in the ZIP-Files. But we do have some things in SVN. Maybe we should remove those things. I am not sure what they were used for in the past.
aehimself wrote: 24.05.2020, 20:51but according to their website the latest is now 1.1.40.0. Unfortunately though, they only provide source and no pre-compiled binaries. I prefer my machine clean and not to install an other compiler and different dependencies if I don't have to.
So my question is... where can I download pre-compiled 32 & 64 bit Windows binaries for FreeTDS? :)
You can download a more recent version (1.1.6) from our files section: https://sourceforge.net/projects/zeoslib/files/3rd party/FreeTDS/.
Or you can take a page from our Wiki and kompile them yourself: https://sourceforge.net/p/zeoslib/wiki/Building FreeTDS with libiconv on Windows 32 Bits/. The instructions should work for 32 bits and 64 bits.

Maybe you should setup a virtual machine for this kind of things? ;)

If there was a simple way to get notified of new versions we could try to ask Jenkins to do these things. Unfortunately I have no idea on how to do that. :(

Best regards,

Jan
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 797
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Updated FreeTDS binaries?

Post by aehimself »

marsupilami wrote: 26.05.2020, 17:34I hope we don't bundle that one? It shouldn't be in the ZIP-Files. But we do have some things in SVN. Maybe we should remove those things. I am not sure what they were used for in the past.
My mistake. I'm not using the .ZIP versions anymore, I'm pulling everything from Git (and by that, SVN). But there, yes, you do have that old version :)
marsupilami wrote: 26.05.2020, 17:34You can download a more recent version (1.1.6) from our files section: https://sourceforge.net/projects/zeoslib/files/3rd party/FreeTDS/.
Thanks, exactly what I needed :) Small note though. If you name the library "libsybdb-5.dll" it should be added to Zeos to look for this file, no? The latest 7.3 still fails to connect without specifying the library location, as it's only looking for "sybdb.dll" only.
I might have to create a virtual machine and compile it for myself - your bundle has no version information which is something I'd need for an automatic update mechanism.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Updated FreeTDS binaries?

Post by marsupilami »

aehimself wrote: 27.05.2020, 09:17 If you name the library "libsybdb-5.dll" it should be added to Zeos to look for this file, no? The latest 7.3 still fails to connect without specifying the library location, as it's only looking for "sybdb.dll" only.
I don't decide about library naming. The build system decides that for me. So while it is libsybdb-5.dll in my build procedure, it still may be sybdb.dll when building with Visual Studio or the native MingW.
I am no fan of the library name lists in Zeos. This feature keeps us from telling the user why a library failed to load because we cannot detect the difference between "file not found" and other errors.
So I decided to just distribute the files and exepct the users to know that they should put the library name in the corresponding property in TZConnection.
aehimself wrote: 27.05.2020, 09:17I might have to create a virtual machine and compile it for myself - your bundle has no version information which is something I'd need for an automatic update mechanism.
I think about updating the wiki article later on because I want it to be more detailed. Maybe this will help ypu too. If you find a way to include version information in the generated library please let me know - if it is easy to do we could update the build instructions and distribute builds with this information.

I did some research today wether it is possible to do automated builds of new versions. Unfortunately it seems that new versions are not tagged in the git repo. So I don't know how to check wether there is a new version available...
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Updated FreeTDS binaries?

Post by marsupilami »

I updated the build instructions and renamed the page to reflect that the instructions are now more general. I will post the updated files in the files section later on. The new link for the wiki page is https://sourceforge.net/p/zeoslib/wiki/Building FreeTDS with libiconv on Windows/.

You also might want to check out the AppVeyor builds: https://ci.appveyor.com/project/FreeTDS/freetds/history

Unfortunately they are not released versions but built automatically. If you don't need support for anything besides ISO8859_1 and UTF8 it might be more simple to just build using cmake and visual studio. This will generate files which rely on the visual studio runtime and possibly also have the version information you need.
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 797
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Updated FreeTDS binaries?

Post by aehimself »

marsupilami wrote: 28.05.2020, 09:52You also might want to check out the AppVeyor builds:
Yes, I found this page but could not see where can I download them. Now I found that they are named "Artifacts". I really had enough of these unique terms, making things so damn hard to find :(
Unfortunately though, when I attempt to use the VS2017 version, Zeos simply says "Can not find library"... I guess it's an issue with dependency. Will have to find a way to know what other files I need. Maybe statically linking the .DLL to a temp project...?
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Updated FreeTDS binaries?

Post by marsupilami »

aehimself wrote: 02.06.2020, 09:04
marsupilami wrote: 28.05.2020, 09:52You also might want to check out the AppVeyor builds:
Yes, I found this page but could not see where can I download them. Now I found that they are named "Artifacts". I really had enough of these unique terms, making things so damn hard to find :(
Yep - but Jenkins does the same. In the end it also could build pdf files or images or just run tests without keeping any artifacts. ;)
aehimself wrote: 02.06.2020, 09:04Unfortunately though, when I attempt to use the VS2017 version, Zeos simply says "Can not find library"... I guess it's an issue with dependency. Will have to find a way to know what other files I need.
If Zeos cannot find the library then something is strange - usually it complains about finding the library but not being able to load it. To check what else is needed for a library I tend to use the Dependency Walker.
aehimself wrote: 02.06.2020, 09:04 Maybe statically linking the .DLL to a temp project...?
Zeos does not support static linking - even though sometimes I wish it was. Also DLLs are not meant to be statically linked. *.a or *.o or other files tend to get used for this. ;)

A side note about the Visual Studio builds: I assume that they also are limited in supported character sets: It only supports ISO-8859-1, US-ASCII, or UTF-8 - which should be enough on any Unicode Delphi anyway. I switched to using mingw because building libiconv with Visual Studio is not supported (anymore). I am not sure wether it is possible to mix libiconv builds from mingw and Visual Studio builds of FreTDS in any way though...
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Updated FreeTDS binaries?

Post by marsupilami »

One more note: Whenever there is a commit to the FreeTDS 1.1 branch, the version number is incremented. Example: On May 16, 2020 there were three commits to that branch. They had version numbers 1.1.37 to 1.1.39. So each one of these commits has an official version number. And maybe gets copied automatically to the website.

So - it can make sense to just download the latest artifacts for the current stable branch from appveyor. They will have an official version number. Unfortunately also the Visual Studio builds don't have the version information compiled into the library.
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 797
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Updated FreeTDS binaries?

Post by aehimself »

I wish we would start to break free from this utter VS runtime crap...! At the moment I can not use any build from AppVeyor, as all (2013, 2015 and 2017) are missing at least 11 dependencies.

It's like... to use this eraser you have to get this exact set of room furniture.

I'll try to build it myself as you suggested. These things are just getting me mad :)

P.s.: Dependency Walker. It's a great piece of work, thank you for letting me know that it exists!
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Updated FreeTDS binaries?

Post by marsupilami »

marsupilami wrote: 12.06.2020, 18:52 One more note: Whenever there is a commit to the FreeTDS 1.1 branch, the version number is incremented.
Given this information, it should not be too hard, to automatically build and publish new versions of FreeTDS. The question is - is it worth the effort?
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 797
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Updated FreeTDS binaries?

Post by aehimself »

I think I owe an update to the future reader. It seems that the build I downloaded previously had some issues, because grabbing one about a week ago (those damn invalid pointer operation issues!) worked just perfectly.

So yes, feel free to use the link above (https://ci.appveyor.com/project/FreeTDS/freetds) just be aware that it's an automatic build and it may contain breaking bugs.

Again, thank you for the assistance, Jan!
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Post Reply