Skip to content

MariaDB issue - Unable to build locally (in Docker) #115

@Mickael-van-der-Beek

Description

@Mickael-van-der-Beek

Hello,

I'm trying to setup a Docker image with lithium installed.

Here is the Dockerfile that I wrote:

FROM debian:stable-20220527-slim

RUN apt-get update -yqq \
	&& apt-get install -yqq curl zip unzip tar \
	&& apt-get install -yqq git gnupg cmake pkg-config \
	&& apt-get install -yqq g++-10 libboost-context-dev libboost-dev libcurl4-openssl-dev libssl-dev libpq-dev  \
	&& apt-get install -yqq postgresql-server-dev-all  \
  && ln -sv /usr/bin/g++-10 /usr/bin/g++

RUN apt-get install -yqq software-properties-common \
  && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 \
  && add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.netcologne.de/mariadb/repo/10.4/ubuntu bionic main' \
  && apt-get update -yqq \
  && apt-get remove -yqq libmysqlclient-dev mysql-server \
  && apt-get install -yqq libmariadb-dev mariadb-server

RUN mkdir -p /opt/app
WORKDIR /opt/app

RUN git clone --recursive https://github.com/matt-42/lithium.git

RUN mkdir -p ./lithium/build \
  && cd lithium \
  && ./vcpkg/bootstrap-vcpkg.sh \
  && ./vcpkg/vcpkg install

RUN cd lithium/build \
  && cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/opt/app/local \
  && make -j12 install

Even with a successfully installed MariaDB driver, I am getting the following error from CMake:

#12 6.812 CMake Error at CMakeLists.txt:25 (find_package):
#12 6.812   Could not find a package configuration file provided by
#12 6.812   "unofficial-libmariadb" with any of the following names:
#12 6.812 
#12 6.812     unofficial-libmariadbConfig.cmake
#12 6.812     unofficial-libmariadb-config.cmake
#12 6.812 
#12 6.812   Add the installation prefix of "unofficial-libmariadb" to CMAKE_PREFIX_PATH
#12 6.812   or set "unofficial-libmariadb_DIR" to a directory containing one of the
#12 6.812   above files.  If "unofficial-libmariadb" provides a separate development
#12 6.812   package or SDK, be sure it has been installed.
#12 6.812 
#12 6.812 
#12 6.813 -- Configuring incomplete, errors occurred!
#12 6.813 See also "/opt/app/lithium/build/CMakeFiles/CMakeOutput.log".
#12 6.813 See also "/opt/app/lithium/build/CMakeFiles/CMakeError.log".

Is there any way to fix it or to completely disable certain databases from being included in the build?

Thank you very much in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions