Open Voldemat opened 1 year ago
I believe this is a compat issue moving from v6 -> v7.
This is my Dockerfile:
FROM python:3.9-slim
RUN apt-get update -y --fix-missing \
&& apt-get install -y \
build-essential \
curl \
librocksdb-dev
RUN pip install python-rocksdb
I am on an M1, building using --platform=linux/amd64
, and I get the following error:
#0 40.90 gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.9 -c rocksdb/_rocksdb.cpp -o build/temp.linux-x86_64-3.9/rocksdb/_rocksdb.o -std=c++11 -O3 -Wall -Wextra -Wconversion -fno-strict-aliasing -fno-rtti
#0 40.90 rocksdb/_rocksdb.cpp:797:10: fatal error: rocksdb/utilities/backupable_db.h: No such file or directory
#0 40.90 797 | #include "rocksdb/utilities/backupable_db.h"
#0 40.90 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 40.90 compilation terminated.
#0 40.90 error: command '/usr/bin/gcc' failed with exit code 1
#0 40.90 [end of output]
When I use FROM python:3.9-slim-bullseye
, I do not get this error. Debian version in python:3.9-slim
is bookworm.
Here is the bullseye librocksdb-dev package. Here is the bookworm librocksdb-dev package.
This is a known issue for python-rocksdb: https://github.com/twmht/python-rocksdb/issues/102
I encountered wheel building failure of python-rocksdb package on alpine after installing rocksdb-dev package. Compiler issue:
rocksdb/_rocksdb.cpp:791:10: fatal error: rocksdb/utilities/backupable_db.h: No such file or directory 791 | #include "rocksdb/utilities/backupable_db.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code
I attach dockerfile instructions which can reproduce the issue.