2

I am trying to link a custom version of sqlite3 when building python, but there is an error when compiling python :

/usr/bin/install: cannot stat 'Modules/_sqlite3.cpython-313-x86_64-linux-gnu.so': No such file or directory make: *** [Makefile:2325: sharedinstall] Error 1

It does not pick up the custom sqlite despite pointing out to it with th following environment variables:

export CPPFLAGS="-I/opt/sqlite/include"
export CFLAGS="-I/opt/sqlite/include"
export C_INCLUDE_PATH="/opt/sqlite/include:${C_INCLUDE_PATH}"

export LDFLAGS="-L/opt/sqlite/lib"
export LIBRARY_PATH="/opt/sqlite/lib:${LIBRARY_PATH}"
export LD_LIBRARY_PATH="/opt/sqlite/lib:${LD_LIBRARY_PATH}"
export PKG_CONFIG_PATH="/opt/sqlite/lib/pkgconfig:${PKG_CONFIG_PATH}"

How can I ensure that the custom sqlite is used and not the system version?

Edit: Here is the github link for the shell scripts that I am using to build sqlite and link it to python.

https://github.com/sherwin684/custom_sqlite_python

5
  • Show us what you did. How can we reproduce that result? Is there a GitHub repo URL you'd care to link to? Help us to help you. Is there some bit of documentation that relates to "link a custom version of sqlite3" that you relied on? Commented 2 days ago
  • I have added the github links to the scripts that I am using for this. There is however no official documentation that I came across for this topic though. This blog, even though its a bit old, is what I am trying to achieve. charlesleifer.com/blog/… Commented 2 days ago
  • when you compiled CPython is the default sqlite3 enabled? Commented 2 days ago
  • Yes it is enabled when compiling CPython Commented 2 days ago
  • try to do the following checks: locate sqlite3.h and libsqlite3.so and check of they are in the right path. Inspect the config.log generated by CPython for more details about the failure Commented 2 days ago

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.