Skip to content

Use of sqlite_orm in library causes sqlite3_mutex_enter to deference NULL and cause segmentation fault #1375

Answered by tpanajott
tpanajott asked this question in Q&A
Discussion options

You must be logged in to vote

Well then, it seems the issue has been that when compiling with add_library(.... SHARED ..... in CMake it will import SQLite multiple times, changing this to add_library(.... STATIC ..... will solve this issue. It would be nice if this is solvable in SQLite ORM but I'm not sure of how as I am surely no expert in CMake. Perhaps if SQLite ORM imported SQLite as PRIVATE? I'm not sure but it seems I've solved it for my use case anyways.

Replies: 4 comments 28 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
18 replies
@tpanajott
Comment options

@codinghaven
Comment options

@tpanajott
Comment options

@tpanajott
Comment options

@tpanajott
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@matz1
Comment options

@fnc12
Comment options

fnc12 May 2, 2025
Maintainer

@matz1
Comment options

@fnc12
Comment options

fnc12 May 3, 2025
Maintainer

@matz1
Comment options

Answer selected by tpanajott
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #1374 on January 22, 2025 20:01.