Well, step1 is to check, that the the file libqsqlite.so is in qt:plugins/slqplugins. If not, find it in one of the release archives. step2 is to check, if your qt: assign is set up correctly. It should point to the root of your qt installation. step3 is to check, if you have libsqlite3.so in your Sys:SObjs/ folder, and that it is the correct version. I think there are at this point quite a lot of different versions of that one floating around, and not every one of them will work with qt. I think I included one version in the Qt installation, that should work no matter what. Get that one and throw it in Sys:SObjs/ (while renaming any other existing version that might lye there). The version I am using is datestamped 22nd of March 2010.
EDIT: And for precisely that reason it is important to check out (just run, once) one of the sql examples from the Qt package to see, if the problem is somehow specifically Brewtarget or a general Qt setup issue on your system. Do you have OS4.1 Final installed? Dunno if that would change certain things, since I have never had the chance to experience it.
I have both of libqsqlite.so and libsqlite3.so at the correct places. Regarding the latter, I'm using the one that comes with OS4 (I think it was first introduces in Update 3). Is that one no good? I don't have OS4.1 FE, so that shouldn't be a problem. Thanks for the tip, I'll try replacing it with the one you included in the Qt archive. I'll try running the example programs too.
This is just like television, only you can see much further.
I checked out both libsqlite3.so files, and they are identical to the one I have, which came with the OS. All the SQL examples in Qt seems to work, which means the there is something in Brewtarget which prevents it from detecting any sql plugins on OS4. https://gitorious.org/brewtarget/brewt ... c57:src/database.cpp#L179
This is just like television, only you can see much further.
Well, one thing is: does it use cmake? Because that tends to make certain things easier and certain other things disasteously incomprehensible. Other build isues might be to structure code and build processes in ways, that are in theory consistent with how Qt works, but somehow not along the the lines of what it was intended to do. In which case it will most likely not have been taken into account by the amiga port. I've seen lots of those things happen over rime. Qthreads issues tend to be the most tricky, Because AmigaOS and pthreads on os4 tend to not always do exactly what other systems might do under the same conditions. With the added bonus, that you are now dealing with asynchronous code, so you don't have any idea whatsoever of what order things are actually happening in, let alone where your error messages are actually comming from (if you even get any).
I don't use CMake to built brewtarget, but a plain old makefile. I just noticed a few linker warnings during the rebult: Quote:
ld: warning: libintl.so, needed by /qt/lib/libQtCore.so, not found (try using -rpath or -rpath-link) ld: warning: libssl.so.1.0.0, needed by /qt/lib/libQtNetwork.so, not found (try using -rpath or -rpath-link) ld: warning: libcrypto.so.1.0.0, needed by /qt/lib/libQtNetwork.so, not found (try using -rpath or -rpath-link) ld: warning: libsqlite3.so, needed by /qt/lib/libQtSql.so, not found (try using -rpath or -rpath-link)
As far as error messages, I get none. I just don't have any available sql plugins.
This is just like television, only you can see much further.
@alfkil Drats! I thought those were only linker warnings, and the sobjs are loaded at the program startup. I tried copying the missing files to sdk:local/newlib/lib, but it made no difference. I know you ported CMake, but it crashes on my system (it gets into an endless loop), so I opted to use a makefile.
Edit: aha! Memory is a good thing, the more the better. Anywaya, for this problem, the reason the link fails, is that you have not added every dependency of every link object to the link line in your makefile. Ie. If libqtsql.so depends on libsqlite3.so, your link should look smth like this, that is with every nondependant object last:
Otherwise the connection is not made, and your code will fail.
Edited by alfkil on 2015/1/21 19:09:32 Edited by alfkil on 2015/1/21 19:10:30 Edited by alfkil on 2015/1/21 19:10:48 Edited by alfkil on 2015/1/21 19:13:21 Edited by alfkil on 2015/1/21 19:13:50
This is just like television, only you can see much further.
CMake: have you set it up according to my instructions?
Another good option - perhaps the best - is to make a project file (.pro) and use qmake. There is probably a reason, though, for the authors not using qmake, so be prepared for this. You can find info on how to make qt project files at qt-project.org. Or just check out the example projects, it is very steaightforward.
In my experience, it is not irrelevant. I think there are instances of the linker needing to actually make the connection to rhe relevant symbols, although the details elude my memory. Anyways, just the indication, that the linker warnings still appear although thw relevant objects are in the lib directory, imdicates, that there is something wrong at the linker level.
Probably the problem is, that you forgot to add the rwlevant dependencies to you link. Ie.
ln <whatever> -l QtSql -l sqlite3
This is all handled automatically by the build process if you use qmake or cmake. Which is one of the many reasons to stick to those.
to the link flags in my Makefiles, and the warnings above went away. I still don't have any SQL drivers, so these warnings aren't seem to be related. Is there any way to monitor where Qt tries to load its SQL plugins from?
edit: I fired up snoopy to see what's going on. This is what I get when Qt tries to open the SQL plugins: Quote:
...which is of course wrong. So something with path handling. Hmm.
It should of course be looking for Qt:plugins/sqldrivers. Maybe your Qt: assign is not set properly? Sometimes I have seen weird backtrack strategies for paths; which mean that a certain app works when somewhere in the Qt: directory but not when moved outside. Did you use the installer to install Qt or did you do it manually? If it doesn`t find the Trolltech config file, it could be a sign of something like that. Otherwise I have no clue at the moment.