My Tora Setup

TOra

    This is a really neat toolkit for Oracle but, naturally the Open Source Community has been hard at work and it will work with MySQL. I like that... I have used TOra with Oracle and there might even be a mention of it in one of my 'older' write-ups concerning Oracle. Now I will have one tool for both of the DBs that I like and use. However, I can't just get it somewhere and use it. Must first get the source, compile it, test it and then can use it. Usually the last two steps happen together.

The Source

    Like a whole lot of other GPL software, TOra is available from SourceForge. Its home is at GlobeCom AB but it appears to have been purchased by Quest Software. They, Quest Software, are the owners of Toad which is another DB tool for Oracle but is only usable on Windows. TOra is usable on both. The SourceForge source is downloadable at TOra Download. I only saw one compiled version for SuSE and it was for 2002. Which means that it was for an older kernel. It might work on this setup but I'd rather compile it anyway. More fun.

    Which brings up another point. I am using SuSE professional. One of the main reasons I get the professional is ... it comes with the 'C' compiler and a whole lot of other Nerdy toys. If you got the Personal Version you are out of luck. Unless, you are smart enough to get everything missing, in the Personal Version, that was/is needed, off the Net, but then you wouldn't be reading this ... would you???

    Since the source comes in a big tar file, we need to extract it so that we can run it through the compiler. This won't be just any old place. If you look at the contents of the tar with 'tar ztvf' you will see that it is going to create a top levvel dir of tora-1.3.14.1 or something similar. Depends on whether you got a newer version or not. (Latest at this time: 21 Dec 04) Since this is going to be a system wide app I am going to untar it in my TRinstalls off of /root.

    Ah yes. Looking over the code you see everything for Linux is right up on top. Windows version came later and there is a sub-dir for it. Linux gets top billing in this code. Great. There are a couple of files to read before we go any further... README and INSTALL. Hmmmmm... in the INSTALL it is claimed that we must have a version of Oracle installed. I wonder if it will compile without it? Not unless you use the proper flag when running the configure script. To compile without Oracle use --without-oracle. Alllrighty now. With that switch, the configure script ran without errors. (I'll have to run it again when I install Oracle... hmmmmmm, maybe I should do that now??? Nah! Save that for another write-up. )

    Besides the makefile changes, configure also creates or modifies a whole bunch of files that have a 'moc' extention. This apparently stands for 'meta object code' which has something to do wirh QT which is also used in TOra. So now, according to the INSTALL file I should be able to just run make and then make install and be all set. So I started the compile. First it went through and made/checked all the dependencies and looks like I have everything needed ... at this point. Then it started the compile ... First problem:

tomarkedtext.cpp: In member function `virtual void toMarkedText::editPrint()':
tomarkedtext.cpp:163: warning: `fromPage' is deprecated (declared at 
   /opt/kde3/include/kprinter.h:328)
But we let it continue ... Second Problem:
toresultview.cpp: In member function `virtual void toListView::editPrint()':
toresultview.cpp:705: warning: `fromPage' is deprecated (declared at 
   /opt/kde3/include/kprinter.h:328)
Both of the above are from changes in KDE. The following states that.
Member KPrinter::fromPage () const KDE_DEPRECATED
    Applications should use pageList() instead, which takes into account all options: 
	collate, page order, ranges, page set, ...
So we will need to change the two cpp files and run make again. Make will see that only these two file will need to be re-compiled so it will be a shorter run this time. There were no other complaints.

    Hmmmmmm.... we have errors:

Making dependencies for tomarkedtext.cpp
Compiling tomarkedtext.cpp
tomarkedtext.cpp: In member function `virtual void toMarkedText::editPrint()':
tomarkedtext.cpp:163: error: no match for 'operator<' in 'page < 
   KPrinter::pageList() const()'
/usr/lib/qt3/include/qcstring.h:317: error: candidates are: bool 
   operator<(const QCString&, const QCString&)
/usr/lib/qt3/include/qcstring.h:320: error:                 bool 
   operator<(const QCString&, const char*)
/usr/lib/qt3/include/qcstring.h:323: error:                 bool 
   operator<(const char*, const QCString&)
/usr/lib/qt3/include/qstring.h:350: error:                 bool 
   operator<(QChar, char)
/usr/lib/qt3/include/qstring.h:351: error:                 bool operator<(char, 
   QChar)
/usr/lib/qt3/include/qstring.h:352: error:                 bool 
   operator<(QChar, QChar)
/usr/lib/qt3/include/qstring.h:1013: error:                 bool 
   operator<(const QString&, const QString&)
/usr/lib/qt3/include/qstring.h:1020: error:                 bool 
   operator<(const QString&, const char*)
/usr/lib/qt3/include/qstring.h:1026: error:                 bool 
   operator<(const char*, const QString&)
make: *** [objs/tomarkedtext.o] Error 1
Well now... file in error and I have to go to work. Oh Darn! Have to check it out tonight... if I fell like it.

Analyzing ... the Problem??

  1. Initial observations indicate that TOra and KDE are out of sync, version wise. The version of KDE that I am using is 3.3 and I'm sure that TOra is expecting 3.2 or older.
  2. First we need to examine TOra to see just what it is expecting from the KDE printer code.
  3. Ah, what TOra is expecting is the starting page.
  4. In this particular case we can not just substitute pageList for fromPage and get the whole mess to work. Deprecated does not mean that it is no longer used. Just that it will be dropped in future.
  5. So, let's put fromPage back in, recompile, ignore the warning and continue on.

The install

    Installation is accomplished via make. We simply execute make with one argument... install. From the Makefile we find that the install locations are:

# Where to install tora
INSTALLPREFIX=$(ROOT)/usr/local

# Where to install tora binary
INSTALLBIN=$(ROOT)/usr/local/bin

# Where to install tora plugins
INSTALLLIB=$(ROOT)/usr/local/lib
This, theoretically, will have installed TOra. It should now be executable.

Success

    Yep. We did it. I can now use TOra, actually tora, and view the MySQL database that I created in CustomerDBCreationI.html. And further references to the use of TOra on my MySQL database will be found there.

    


Valid HTML 4.01! Click here to validate current page. Best viewed with ANY browser! Valid CSS! Click here to validate current CSS.


Copyright © 2004-2004 All rights reserved.