mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-10 14:56:31 +00:00
c5da7c8fcd
In the `when isMainModule:` section of wakunode2.nim, the module `./storage/message/waku_message_store` is imported, which in turn imports waku's sqlite module and also the sqlite3_abi module from `vendor/`. Outside of the `when isMainModule:` section, imports from waku's sqlite module are not used in wakunode2. However, importing it at the top-level results in the C code underlying sqlite3_abi to be compiled into whatever executable one is building, and this is a problem if nim-waku is being consumed together with another library, e.g. nim-sqlcipher, which links against a different build of sqlite (sqlcipher being a superset of sqlite). The linker step fails with reports of duplicate symbols for sqlite.