SQLiteSupport module currently broken
I am trying to use the SQLiteSupport module that ships with UE4, but I cannot get it to work. As far as I can tell, the module is currently completely broken. There are two apparent issues, both of which are detailed here: https://forums.unrealengine.com/showthread.php?60275-4-7-SQLiteSupport-Bug
I have no idea what causes these problems, but they are reproducable, and I am not the only one with the issue. Another user in the thread linked above is reporting the same behavior. I observe the bug in every pre-compiled launcher versions of the engine from 4.6.2 all the way to 4.7.2, as well as when compiling the engine from source. I am using Microsoft's Visual Studio compiler version "18.00.31101". I also notice that in the build log from building the UE4 project, there is no output relating to building the SQLiteSupport module, and no DLL is generated for this module.
(comments are locked)
|
Hi sirrus233, yes, you're right about no 1. It was a GitHub PR and we've missed it. SQLiteDatabaseConnection.h is a public interface and it shouldn't have SQLiteSupportPrivatePCH.h inclusion. The right approach is to replace it with SQLiteSupport.h. This will be fixed in next release. Unfortunatelly I cannot reproduce your second error. Have you included SQLiteSupport to Public/PrivateDependencyModuleNames in YourModule.Build.cs file? Thanks, Jarek answered Mar 06 '15 at 09:32 AM ![]() Thank you Jarek for your answer. I can reproduce the second error. Actually I had to do nothing more than use the SQLiteSupport module for it to happen. I´ve included SQLiteSupport to Public/PrivateDependencyModuleNames in MyModule.Build.cs file. We only get the error when compiling after making changes. Once you get the error you can compile again and it will compile just fine. Anyway the lib file is never generated. Thanks for looking into this, Jarek. I have included SQLiteSupport to both my public and private dependency lists, but still the issue persists. When you attempted to reproduce the bug, did you do so on a version of the engine that was already built? I have never been able to get the module to work, but I am also a very new user of the engine. According to Storngrir in the forum post, things seemed to be working as recently as version 4.7.0 (breaking after the 4.7.1 hotfix). Since the SQLiteSupport module code hasn't changed in 3 months, and since we are not seeing any lib files or DLLs get created, it seems likely that the bug may be in the build system, in which case it is feasible that you wouldn't be able to reproduce it with an already installed version of UE4. Could you maybe try downloading a clean install from the launcher and then trying to reproduce once more? Also, if you check in the engine's Binaries directory, do you see a DLL for this module? Also getting that second issue. Not sure why it looks like the library file is not there. Is it meant to be there by default? Is there some way it's meant to be created? Have you included the SQLite code as per the instructions in ThirdParty\sqlite\README.txt?
(obviously if you aren't on Windows you'd just need to build the library using whatever alternative dev environment you are using.) I have indeed, it threw a different error before I did that, which very helpfully pointed to that readme file. Great, I'm pleased to see that the warning is functional. Just to double check, did you actually build the library or just include the source in the indicated location? I placed the source in the indicated location, then built the sln project (The on next to the readme) in the appropriate configuration. It created the .lib files in the lib directory, which solved the initial error I was getting, but now I get the error above:
Presumably because that file does indeed not exist. Oh, hang on, I misread that. If it isn't finding the SQLiteSupport lib now, can you do a search and see if the file exists elsewhere? I actually think that LibraryPath is getting set correctly - at least insofar as I believe it is actually looking in Program Files\Unreal Engine\4.7\Engine\Source\ThirdParty\sqlite\libs, because the error message pointing the the readme correctly appears when sqlite has not been compiled, and correctly vanishes when it has. Yeah, sorry, I misread. I edited my previous comment - can you try looking for the UE4Editor-SQLiteSupport lib and seeing if it is being built but in the wrong location? I've searched the entire directory structure, in both the downloaded engine, and a version of the engine compiled from source. The lib is nowhere to be found. It doesn't appear to exist anywhere. So it looks like building of UE4Editor-SQLiteSupport is failing, because no output file is being produced. Very strange that it is failing without giving an error in the build log though. When I compiled the engine from source, I looked through the build log for any mention of that lib, and found nothing. It looks like maybe the building of SQLiteSupport isn't failing, but rather it is never attempted at all. Yeah, you are right I think. Unfortunately I'm running out of ideas at this point and I do suspect it is to do with the hypothesis below, that is to say that the missing folder is connected to the library not being built at all. Strange, because I thought #including the right header and referencing the module in the build script is all you need to trigger compilation of a module... I agree, I don't think your build script is to blame. I checked to make sure that the UE4Editor-Database lib was getting compiled (it was), and compared that build script to the one you wrote, as well as a couple others. Although my knowledge of the build system is extremely limited (maybe slightly less so, after all this debugging!) I don't see anything out of the ordinary. Since Storngrir claims this was working prior to 4.7.1, I tried digging through the commit history between the initial 4.7 release and the 4.7.1 hotfix, looking for any bugs that might have been introduced into the build system, but I wasn't able to find anything (admittedly, I didn't dig as deep as I could have). I still don't understand how the build system locates the build.cs files to use, but possibly that system is missing your module? I want to add a quick note here. I didn't mention it in my original post because I wasn't sure if it was a bug or not. The readme file and visual studio sln file for building sqlite should be present in the directory Engine/Source/ThirdParty/sqlite. However, when UE4 is downloaded from the launcher, this directory isn't created. The entire directory doesn't exist at all. When I first started trying to use this module, I had a similar experience to Ineni, where I got a build error pointing me to that readme file. However, I had a very hard time finding it (eventually doing so by looking through the source on Github). If it is intentionally left out of the downloaded version (perhaps because you cannot include the sqlite source? But still, why not include the readme and sln?) then a message to this effect in the error message could be helpful for future users. If the sqlite directory IS supposed to be there - then perhaps this is related to the present bug. That's a good point sirrus, I also had to copy the sqlite folder from the github version, it would make sense that they'd be related. Although I can't get it working from the source version either... Hmm, it looks like there is something wrong with the launcher version. I'll get it myself and try to debug there. I'm working on Perforce versions, so there can be our difference. And yes -- UE4Editor-SQLiteSupport.lib and dll are building on my machines. Thanks, Jarek Thanks for that Jarek. I managed to get one of the SQLite plugins to work so I'll use that for now, but it'd be cool the be able to use the official version :) I've just upgraded to 4.7.2, now the UE4Editor-SQLiteSupport.lib library is being built and it's working as expected! I'm still using GitHub source built engine. Weird, I've been using 4.7.2 this whole time, albeit the launcher version. Jarek, is there any more news regarding this bug? Sorry for the long response, but recently I hadn't had time to look into it. Here's the problem: SQLiteSupport is an optional module that just wraps sqlite to our database abstraction. In order to use it one needs to compile the module with linking statically sqlite library. To do this you need to have a source code version. On the other hand the Launcher version is the binary version of UE4. So to use SQLite, download the sources of UE4 and compile your project with SQLiteSupport according to the steps in README with the source version. Sorry about the confusion and I guess we need to emit a proper error in binary builds that says so. Jarek Is SQLSupport supposed to generate when you build the sqlite project? I only get sqlite.lib. When you build sqlite project, it generates the SQLite lib. The SQLiteSupport module will only be built a) if you include it as a dependency in your project and b) if it finds the SQLite lib (SQLiteSupport looks for the SQLite lib as a prerequisite), but it will automatically build if both those conditions are true when you build the project that lists SQLiteSupport as a dependency. Ah, I see. Probably a dumb question but how do I include it as a dependency once I have the source all setup? Now, two weeks later, we have come full circle to the original problem :) In my project, both of those conditions were true. SQLiteSupport was listed as a dependency, and the sqlite lib had been downloaded and built. I still received the linker error in the original post. From what Jarek said, using a version of UE4 built from source is mandatory for the use of this module, so that might have been my problem (I think I tried that, but I may be misremembering). However, we had another guy commenting that he was getting the same issue, despite having the library build, and he claimed to be using the source version. Can someone verify that they can reproduce the issue, and that this fix works? I won't be able to try it until I get home from work. Okay, this definitely doesn't work. I am still getting the linker error, exactly as before. Here is what I'm doing:
This fails just as it always has for me. Has somebody else tested this method and confirm it works? Am I leaving out a step?
Alright, I'll sync it myself and verify. Btw. thanks a lot for your involvement! :) Hmm, works here. What's your current head hash? My is 5d0665efb95342d2e28aa10d324dada0908bb6cd That is mine as well. It's the commit with the 4.7.3-release tag. It might be worth attaching a sample project that Jarek can use to repro, if you have a few minutes to create such a thing Sirrus. @Jarek - Would you like me to make the PrivatePCH and 'more informative error when trying to build SQLiteSupport' changes and submit another PR? Or have you already handled those internally? Woah! I just recompiled everything, including the engine, and now I see the SQLiteSupport library being built. I don't know what I did differently though. Maybe it's the fact that I rebuilt the engine after opening the solution file for my project, rather than the solution file generated for building the engine standalone? In other words, my steps changed to:
7. Rebuild the engine.
Yes that is the key thing here, if you just build the engine solution on its own it doesn't know that your project has SQLiteSupport as a dependency (because your project isn't being referenced) and won't compile that module as a result. Hi sirrus233, Thank you for the solution.I followed all the steps. It worked for me. Now I wanted to integrate the sqlite plugin to my project : https://github.com/KhArtNJava/SQLite3UE4 But I am facing the launching failure issue: https://answers.unrealengine.com/questions/272093/error-code-1073741819-while-launching-the-game.html can you please help me out from this? @twiddle I've already changed the include from privatePCH to SQLiteSupport.h in SQLiteDatabaseConnection.h, but I haven't had time to put the error to use sources if someone is trying to use it in Rocket builds. That'd be great if you want to help! If I might make a recommendation for this pull request - perhaps the README for the module could be updated with more information? Knowing that the launcher version of UE4 cannot build the module, and also that the engine must be recompiled once the user has added SQLiteSupport as a project dependency would both be very helpful to know. Thank you very much for your help Jarek and Twiddle. I'm using sqlite in my project this very moment :)
(comments are locked)
|
We hope this plugin can help you.
(comments are locked)
|
Follow this question
Once you sign in you will be able to subscribe for any updates here
I am having the same problem - when compiling the engine, it fails to build UE4Editor-SQLiteSupport.lib.
So when I compile my project, it gives a linker error.
I am confused about how to indicate to compile UE4Editor-SQLiteSupport.lib when compiling the engine.
To be clear - I have compiled both Debug and Release versions of sqlite.lib, they are in ThirdParty/sqlite/lib/x64/Release and ThirdParty/sqlite/lib/x64/Debug.
Similar to how to specify SQLiteSupport in the project, is there a step to indicate SQLiteSupport during engine build?
Thanks for any help
Hi OptimisticMonkey,
I wanted to let you know that I am looking into the issue that you described. I hope to have some information for you early next week. In the meantime, what version of the Engine are you using?
Tim
Thanks Tim - That is awesome. I am using 4.10.
Hi OptimisticMonkey,
I apologize for the delay in getting the information that you need. The person who worked most closely with this module is no longer with the company, so I am trying to coordinate with another developer to try to find out what is happening.
Tim
Hi Tim,
Any update on this?
RB
Hi RB,
Unfortunately I don't have any information yet. This time of year it can sometimes be difficult to coordinate available time with developers.
Tim
RB, Essentially if you want the SQLite support to be built into the engine rather than being built when a project requires them, you should be able to just add a dependency on the SQLite modules to one of the engine modules.
I tried it this morning with 4.11 and everything worked fine. After downloading and building SQLite libs, I added a dependency to one of our sample game module's build.cs file:
and then built the game project without any issues.
Thanks Robert - Did u download the precompiled sqlite or compile the "amalgation" they provide?
I compiled it myself
Taking a quick guess here - If you are just building the engine on its own you could try adding SQLiteSupport as a dependency to an existing module in the engine. If you're building the engine on its own, ie not compiling a project, just the core engine itself, by default, you won't have a dependency on SQLitesupport (being an optional module, the engine deliberately omits a dependency on it) so it wont be built. There's an earlier discussion between myself and a few other users in the comment thread here, but its sorta buried, so I figured you might have missed it: To test this out, you need to put "SQLiteSupport" in Public/PrivateDependencyModuleNames in Core.Build.cs, or another engine module.