>Date: Sun, 08 Sep 2013 22:26:07 +0200
>From: Ivan Brezina <firstname.lastname@example.org>
>Subject: Re: [Tora-develop] Questions? new build tool chain,
> cross-compiling, ODBC support
>Content-Type: text/plain; charset="iso-8859-1"
>On 09/08/2013 03:21 PM, Zippy Dufus wrote:
>> Hello again,
>> After a two year hiatus, I now need to
use my favorite database tool
>> TOra again. But you changed the toolchain, arrrrrrgh! (-;
>Well autohell tool are hard to maintain. ksh93 and m4 are tool archaic
>and even-thought it is not really multi-platform.
>CMAKE is simply better.
>> No matter. I pulled the last SVN revision (4600) on the old tool
>> chain and managed to cross-compile a mingw64 Windows 64bit build on a
>> Fedora19 virtual machine with qt-4.8 and qscintilla 2.7.3 snapshot.
>> [chest thumping!] Too bad that I don't have the bleeding edge TOra
>What is your target platform? Where you compile sources and where do you
>want to use them?
I, myself, run Fedora19 and have always compiled and used latest version of the code from the repository.
Occasionally, I find myself forced to work on a Windows platform hence my effort long ago to compile
a Windows release. Back at that time, the official Tora Windows build may or may not run
on particular Windows machines depending what DLLs where installed. I was not interested in
figuring out the problem(s) and then having to have to grovel to IT managers for Windows updates.
The Mingw build avoids this issue. This build can be easily "sneaked" on to a Windows workstation
as it avoids the flourish and fanfare of a proper Windows installation.
However, I have distributed my Windows build to many co-workers who generally liked it.
>Few months ago we had problems when SF migrated your repository and kept
>the original one open for commits. We had to sync these manually.
>The latest source codes can be obtained from:
>https://svn.code.sf.net/p/tora/code/branches/tora2_1_x - Tora2
>branch. Latest commit 4758
>https://svn.code.sf.net/p/tora/code/trunk/tora - Tora3 branch (no
>release yet) Latest commit 4813
>For both you have to re-checkout sources. (svn update does not work)
I checked out the most recent
(Tora3) for building on Linux. For Windows, I have a "frozen" 4600 version
on my build virtual machine but I will try the 4758 revision for fun. When/(if) I figure out cmake with mingw64, I will resume building the most
>Personally I never used cross-compile for Tora. On Windows I use Visual
>Studio Express (with the debugger of course).
>Did you try to compile for Windows directly on Windows? MSVC Express is
>"freely" download-able and CMAKE directly generated project files.
>This approach is described in README.WINDOWS file (Tora3 version)
I hate MS! ... just kidding, sort of! (-;
I originally did the mingw32 build for amusement and to play with this toolchain
when it first appeared on Fedora12.
>> Additionally, this build includes ODBC support now that F19 ships the
>> qt odbc mingw64 dll. However, it took some research to determine that
>> all I needed to do was add "set QT_PLUGIN_PATH=%TORA_DIR%\plugins" to
>> my tora64.bat
>So you're using QODBC (Qt ODBC wrapper) to connect to MS SQL server no
>Linux (on Windows)?
>> I now need ODBC because I will be working with MSSQL Server. My Linux
>> 4600 build also works fine with ODBC using the FreeTDS driver.
>> 1. Is the code base stable enough for me to starting hacking? I'm
>> using revision 4817 and I am getting the error below. Maybe I am
>> missing something in my environment?
>I would say it's
very stable. But so far it works only with Oracle. Some
>core components were rewritten, especially: threading, locking and
>Partially Tora3 alse supports MySQL - through QMYSQL QT wrapper.
>> 1. I know nothing of cmake (yet). Do you think it will be possible
>> to use it to cross-compile to Windows? Any hints where to start?
>I think cmake supports Xcompilation, but I never used that. I use
>Xcompile it only for kernels and other low level stuff.
>Moreover MSVC has very good compiler and debugger.
From a quick Google search, I am pretty sure that it does. Now I have another challenge!
>> 1. With the ODBC connection, all the tools except the SQL Editor tool
>> and Project Manager are disabled. Is there a easy way to enable
>> them with little or no code
changes? I am "imagining" that I
>> could use the brilliant Edit SQL feature and override certain
>> queries which support my workflows with their native MSSQL
>> equivalents. Would the TOra programming know the difference if
>> the result set was identical? The Schema Browser is of particular
>> interest if only to review table layouts. Does this sound feasible?
>Yes. But unfortunately the "Project Manager" (aka TemplateEditor) is not
>so far supported in Tora3 version.
>I had to put a lot of code into folder "obsolete" to make
>working. So you have to recompile Tora each time you modify the SQL :(
So is the "Template Editor" the same feature as "Edit SQL"? That would be a shame
to deprecate this because I just tweaked the SQL template that generates the
schema extraction so it explicitly says NULL on the column definition of the
CREATE TABLE statement. MSSQL requires this else the column is NOT NULL
by default. I used this tool to port 102 table definitions from Oracle to MSSQL.
>In your opinion which option is more feasible for MSSQL support on
>- use QSql through QODBC through FreeTDS
>- use FreeTDS directly without any wrappers
I can't answer this yet. I am still mystified how the ODBC connectivity actually works.
I've created (Linux) a .odbc.ini file and I know that the ODBC connection uses it. On Windows,
once I have set up a odbc connection, the QSql sees this. So all if fine for my workflows.
>For Oracle the OCI is used directly. It is very laborious. But on the
>other hand, is supports lot of Oracle's specific features
>and there are no problems with QT's internal locking. (See QSQLDatabase
>> Keep up the excellent work! You have made a lot of my co-workers
>> happy over the years too.
>> [ 36%] Generating qrc_tora.cxx
>> Scanning dependencies of target tora
>> [ 36%] Building CXX object src/CMakeFiles/tora.dir/core/main.cpp.o
>> In file included from
>> from /home/tora/Linux/Tora3/tora/src/core/main.cpp:44:
>> /home/tora/Linux/Tora3/tora/src/core/toconnection.h:277:26: error:
>> 'QMenu' has not been declared
>> void connectionsMenu(QMenu*);
>Should be fixed now.
I'll try another build later this week.
PS - sorry for the original double post and any
peculiar formatting in this reply. The Yahoo email client is giving me grief!