Closed Qriist closed 2 months ago
I noticed that I hadn't updated my Multiple Ciphers build (with the sqlar functions enabled) in a while, so I did that. No issues creating the DLL. I then noticed my ICU version was a couple years old so I tried to update (v71 -> v75).
The latest release of SQLite3 Multiple Ciphers was built against an older ICU version, namely 74.2, but I just checked that the build also succeeds when using ICU 75.1.
It wasn't working so I tried to revert back to the old ICU version. However, during my tinkering I broke something to the point where MC won't build with ICU at all (though the non-ICU version does).
Would you please help me configure whatever I need to reenable building with ICU?
The Visual C++ build files use the environment variable LIBICU_PATH
to point to the root directory of your ICU installation (where subfolders include
and lib
resp lib64
reside). The compiler uses it to find the ICU header files, and the linker uses it fo find the ICU lib files. Maybe you changed the name of the environment variable - but not in all places.
AFAICT from your log only the linker complains about not finding the required ICU entry points, while the compiler finds the header files. Therefore I suspect that the library path for the linker is somehow broken. Maybe it still points to the previous ICU version. Or you copied the library files of the wrong version to the lib
resp lib64
folder.
The latest release of SQLite3 Multiple Ciphers was built against an older ICU version, namely 74.2, but I just checked that the build also succeeds when using ICU 75.1.
Oops, didn't realize I had eclipsed your release. My bad! Thank you for confirming the most recent ICU works.
The Visual C++ build files use the environment variable
LIBICU_PATH
to point to the root directory of your ICU installation (where subfoldersinclude
andlib
resplib64
reside).
Thankfully, that is what I had done.
Therefore I suspect that the library path for the linker is somehow broken.
Well, that got me thinking.
========== Build: 6 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 4:29 PM and took 41.622 seconds ==========
Apparently Visual Studio was in dire need of a PC reboot. That's it, that fixed the compiler issue. Maybe something got locked from a recent compiler update that I didn't notice. ¯_(ツ)_/¯
HOWEVER another oddity cropped up: I have confirmed that I am targeting v75...
...but the ICU dll seems to still request v71.
v75 never gets requested. This persists even after a rebuild following removing the icu-precompiled/icu-71.1-vs2019
sibling directory (which obviously shouldn't matter but I did anyways just to be sure).
Aside from the Windows environment variable, is there another location where I need to set LIBICU_PATH
?
Therefore I suspect that the library path for the linker is somehow broken.
Well, that got me thinking.
========== Build: 6 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Build completed at 4:29 PM and took 41.622 seconds ==========
Good news.
Apparently Visual Studio was in dire need of a PC reboot. That's it, that fixed the compiler issue. Maybe something got locked from a recent compiler update that I didn't notice. ¯(ツ)/¯
Well, especially if environment variables are involved it is often necessary to restart at least Visual Studio or even to reboot the computer, so that changes take effect.
HOWEVER another oddity cropped up: I have confirmed that I am targeting v75... ...but the ICU dll seems to still request v71.
This is a bit strange, because it indicates that the executable you are invoking was not rebuilt properly. How do you invoke the executable?
This persists even after a rebuild following removing the
icu-precompiled/icu-71.1-vs2019
sibling directory (which obviously shouldn't matter but I did anyways just to be sure).
Maybe you'll have to clear Visual Studio's cache (via Build/Clean Solution
from the VS menu) to remove remains from earlier builds.
Aside from the Windows environment variable, is there another location where I need to set
LIBICU_PATH
?
The VS solution has 3 projects, sqlite3mc_dllicu
, sqlite3mc_libicu
, and sqlite3mc_shellicu
, which reference LIBICU_PATH
in the C++ and/or Linker section. Make sure all references are properly set.
tl;dr: finally properly compiled! :D
Well, especially if environment variables are involved it is often necessary to restart at least Visual Studio or even to reboot the computer, so that changes take effect.
Understandable!
This is a bit strange, because it indicates that the executable you are invoking was not rebuilt properly. How do you invoke the executable?
My preferred SQLite GUI is SQLiteStudio. It ships with a vanilla SQLite3.dll
that I drop-replaced with the MC+ICU+SQLAR binary. This worked flawlessly with the previous MC build that I was updating from, with the added advantage of the GUI having a robust error handler to give me visual feedback. SQLiteStudio auto-loads SQLite3.dll
when launched, plus the ICU dlls if given that MC variant. SQLiteStudio does not use the ICU dlls, making this an ideal test scenario to see if I've built MC correctly. That's how I was able to determine MC was still building against v71.
(My most common use-case for MC is any number of headless scripts and libraries I've created. However, since those are deliberately designed to give little-to-no feedback they don't work well for debugging of this type.)
Maybe you'll have to clear Visual Studio's cache (via
Build/Clean Solution
from the VS menu) to remove remains from earlier builds.The VS solution has 3 projects,
sqlite3mc_dllicu
,sqlite3mc_libicu
, andsqlite3mc_shellicu
, which referenceLIBICU_PATH
in the C++ and/or Linker section. Make sure all references are properly set.
I was finally able to properly build against v75 by basically going scorched earth on reseting everything.
LIBICU_PATH
was set correctly in WindowsLIBICU_PATH
anywhere within the project itself)I had taken all of these actions sorta piecemeal over the past day, but not all together in this order. My best guess is that something somewhere got bogged down in cache hell, probably related to the first linker issue I had. My suffering has come to an end. XD
ANYWAYS, thank you very much for taking the time to help troubleshoot my idiotic issues. You've been an amazing help and I'm grateful. :)
Since it was such an obnoxious ordeal for me, here's the latest MC+ICU+SQLAR for anyone else who might get caught in build purgatory. (Also includes non-ICU with SQLAR enabled.) SQLite (MC v1.8.7 + ICU v75 + SQLAR enabled).zip
tl;dr: finally properly compiled! :D
Glad to hear that. 😄
My preferred SQLite GUI is SQLiteStudio. It ships with a vanilla
SQLite3.dll
that I drop-replaced with the MC+ICU+SQLAR binary.
AFAIK SQLiteStudio comes with a SQLite3MC plugin - but it is somewhat dated and does not support ICU.
This worked flawlessly with the previous MC build
Yes, SQLite3MC can be used as a drop-in replacement for SQLite.
I was finally able to properly build against v75 by basically going scorched earth on reseting everything.
- Deleting and re-cloning MC
- Setting the 4 required preprocessors on the ICU builds
- Cleaning the solution
- Closing the solution
- Closing Visual Studio
- Manually replacing the v75 files (again)
- Confirming my
LIBICU_PATH
was set correctly in Windows- Rebooting the PC
- Opening VS and building (Notably, I did not set
LIBICU_PATH
anywhere within the project itself)
Maybe not all steps would have been necessary, but to be on the safe side it is a reasonable approach.
Quite often it is enough to delete the .vs
subfolder to force Visual Studio to rebuild a project really from scratch.
I had taken all of these actions sorta piecemeal over the past day, but not all together in this order. My best guess is that something somewhere got bogged down in cache hell, probably related to the first linker issue I had.
In the past I have experienced similar issues with Visual Studio myself.
My suffering has come to an end. XD
Great. 🎉
ANYWAYS, thank you very much for taking the time to help troubleshoot my idiotic issues. You've been an amazing help and I'm grateful. :)
You are welcome.
(This is definitely human error on my end.)
I noticed that I hadn't updated my Multiple Ciphers build (with the sqlar functions enabled) in a while, so I did that. No issues creating the DLL. I then noticed my ICU version was a couple years old so I tried to update (v71 -> v75).
It wasn't working so I tried to revert back to the old ICU version. However, during my tinkering I broke something to the point where MC won't build with ICU at all (though the non-ICU version does).
Would you please help me configure whatever I need to reenable building with ICU?
most recent log