Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with test failed #2

Open
MikeTolkachev opened this issue Dec 28, 2020 · 1 comment
Open

Build with test failed #2

MikeTolkachev opened this issue Dec 28, 2020 · 1 comment

Comments

@MikeTolkachev
Copy link

Build with test failed
but with cmake -DOATPP_BUILD_TESTS=FALSE build complete

Console output

-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PROTOLIB_LIBRARY
    linked by target "module-tests" in directory /tmp/oatpp-protobuf/test

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly

Build script

#!/bin/sh
# install components from repo
apk add git cmake wget unixodbc unixodbc-dev g++ make postgresql-dev protobuf protobuf-dev

# build and install oatpp
cd /tmp

set -- "oatpp" \
    "oatpp-websocket" \
    "oatpp-postgresql" \
    "oatpp-protobuf"
    
for i in "$@"; do
    echo "$i"
    git clone --depth=1 https://github.com/oatpp/$i
    mkdir -p $i/build
    cd $i/build
    cmake .. && make -j $(grep -c '^processor' /proc/cpuinfo) install
    cd ../../
done

cd /
rm -rf /tmp

Dockerfile

FROM alpine:latest AS builder
ADD ./build.sh /tmp
WORKDIR /tmp
RUN /tmp/build.sh
WORKDIR /
@lganzzzo
Copy link
Member

Hey @MikeTolkachev ,

Thanks for the detailed description and for reproduce-scripts.

I've pushed a fix - now your script should work.

Side note:
Make sure to enable type interpretations to be able to use oatpp-protobuf with oatpp-postgresql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants