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

Fix build issues with libdrogon #410

Merged
merged 6 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build and Install prometheus-cpp
run: cd prometheus-cpp && mkdir _build && cd _build && cmake .. -DBUILD_SHARED_LIBS=off -DENABLE_PULL=off -DENABLE_PUSH=off -DENABLE_COMPRESSION=off -DENABLE_TESTING=off -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_POSITION_INDEPENDENT_CODE=ON && make && sudo make install
- name: Download Drogon
run: git clone https://github.com/drogonframework/drogon.git && cd drogon && git checkout tags/v1.7.4 -b v1.7.4
run: git clone https://github.com/drogonframework/drogon.git && cd drogon && git checkout tags/v1.9.1 -b v1.9.1
- name: Build and Install Drogon
run: cd drogon && git submodule init && git submodule update && mkdir _build && cd _build && cmake .. -DBUILD_ORM=OFF -DCMAKE_BUILD_TYPE=Release && make && sudo make install
- run: sudo sysctl -w vm.max_map_count=262144
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Build and Install prometheus-cpp
run: cd prometheus-cpp && git submodule init && git submodule update && mkdir _build && cd _build && cmake .. -DBUILD_SHARED_LIBS=off -DENABLE_PULL=off -DENABLE_PUSH=off -DENABLE_COMPRESSION=off -DENABLE_TESTING=off -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_POSITION_INDEPENDENT_CODE=ON && make && sudo make install
- name: Download Drogon
run: git clone https://github.com/drogonframework/drogon.git && cd drogon && git checkout tags/v1.7.4 -b v1.7.4
run: git clone https://github.com/drogonframework/drogon.git && cd drogon && git checkout tags/v1.9.1 -b v1.9.1
- name: Build and Install Drogon
run: cd drogon && git submodule init && git submodule update && mkdir _build && cd _build && cmake .. -DBUILD_ORM=OFF -DCMAKE_BUILD_TYPE=Release && make && sudo make install
- run: sudo sysctl -w vm.max_map_count=262144
Expand Down
2 changes: 1 addition & 1 deletion builder-support/dockerfiles/Dockerfile.debbuild
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN mv prometheus-cpp*Source prometheus-cpp
RUN cd prometheus-cpp/_build && make install

RUN git clone https://github.com/drogonframework/drogon.git
RUN cd drogon && git checkout tags/v1.7.4 -b v1.7.4
RUN cd drogon && git checkout tags/v1.9.1 -b v1.9.1
RUN cd drogon && git submodule init && git submodule update && mkdir _build && cd _build && cmake .. -DBUILD_REDIS=OFF -DBUILD_ORM=OFF -DCMAKE_BUILD_TYPE=Release && make && make install

RUN tar xvf /sdist/wforce-${BUILDER_VERSION}.tar.bz2
Expand Down
22 changes: 18 additions & 4 deletions builder-support/dockerfiles/Dockerfile.rpmbuild
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,30 @@ RUN tar xvf /sdist/prometheus-cpp*Source.tar.gz
RUN mv prometheus-cpp*Source prometheus-cpp
RUN cd prometheus-cpp/_build && make clean && make install

RUN wget https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.6.3.tar.gz
RUN tar xvf yaml-cpp-0.6.3.tar.gz
RUN cd yaml-cpp-yaml-cpp* && mkdir build && cd build && cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON && make install
RUN wget https://github.com/jbeder/yaml-cpp/archive/0.8.0.tar.gz
RUN tar xvf 0.8.0.tar.gz
RUN cd yaml-cpp* && mkdir build && cd build && cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON && make install

RUN git clone https://github.com/open-source-parsers/jsoncpp
RUN cd jsoncpp && git checkout tags/1.9.4 -b 1.9.4
RUN cd jsoncpp && mkdir _build && cd _build && cmake .. -DBUILD_SHARED_LIBS=OFF && make && make install

@IF [ "$BUILDER_RHEL_FLAVOUR" = "amazon" ]
ARG DROGON_VERSION=v1.7.4
@ENDIF
@IF [ "$BUILDER_RHEL_FLAVOUR" != "amazon" ]
@IF [ "$BUILDER_RHEL_VERSION" = "7" ]
ARG DROGON_VERSION=v1.7.4
@ENDIF
@ENDIF
@IF [ "$BUILDER_RHEL_FLAVOUR" != "amazon" ]
@IF [ "$BUILDER_RHEL_VERSION" != "7" ]
ARG DROGON_VERSION=v1.9.1
@ENDIF
@ENDIF

RUN git clone https://github.com/drogonframework/drogon.git
RUN cd drogon && git checkout tags/v1.7.4 -b v1.7.4
RUN cd drogon && git checkout tags/"$DROGON_VERSION" -b "$DROGON_VERSION"
RUN cd drogon && git submodule init && git submodule update && mkdir _build && cd _build && cmake .. -DBUILD_REDIS=OFF -DBUILD_ORM=OFF -DCMAKE_BUILD_TYPE=Release && make && make install

RUN wget https://github.com/maxmind/libmaxminddb/releases/download/1.7.1/libmaxminddb-1.7.1.tar.gz && tar xvf libmaxminddb-1.7.1.tar.gz
Expand Down
2 changes: 2 additions & 0 deletions builder-support/dockerfiles/Dockerfile.target.amazon-2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@EXEC export BUILDER_RHEL_VERSION=2
@EXEC export BUILDER_RHEL_FLAVOUR=amazon
# First do the source builds
@INCLUDE Dockerfile.target.sdist

Expand Down
2 changes: 2 additions & 0 deletions builder-support/dockerfiles/Dockerfile.target.centos-7
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@EXEC export BUILDER_RHEL_VERSION=7
@EXEC export BUILDER_RHEL_FLAVOUR=centos
# First do the source builds
@INCLUDE Dockerfile.target.sdist

Expand Down
2 changes: 2 additions & 0 deletions builder-support/dockerfiles/Dockerfile.target.ol-8
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@EXEC export BUILDER_RHEL_VERSION=8
@EXEC export BUILDER_RHEL_FLAVOUR=oracle
# First do the source builds
@INCLUDE Dockerfile.target.sdist

Expand Down
2 changes: 2 additions & 0 deletions builder-support/dockerfiles/Dockerfile.target.ol-9
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@EXEC export BUILDER_RHEL_VERSION=9
@EXEC export BUILDER_RHEL_FLAVOUR=oracle
# First do the source builds
@INCLUDE Dockerfile.target.sdist

Expand Down
2 changes: 1 addition & 1 deletion builder-support/dockerfiles/Dockerfile.wforce
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mkdir _build && cd _build && cmake .. -DBUILD_SHARED_LIBS=off -DENABLE_PULL=off
RUN cd prometheus-cpp/_build && cp prometheus-cpp*Source.tar.gz /sdist/

RUN git clone https://github.com/drogonframework/drogon.git
RUN cd drogon && git checkout tags/v1.7.4 -b v1.7.4
RUN cd drogon && git checkout tags/v1.9.1 -b v1.9.1
RUN cd drogon && git submodule init && git submodule update && mkdir _build && cd _build && cmake .. -DBUILD_REDIS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_ORM=OFF && make && make install

ADD CHANGELOG.md configure.ac ext LICENSE Makefile.am README.md NOTICE /wforce/
Expand Down
2 changes: 1 addition & 1 deletion docker/regression/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ RUN cd prometheus-cpp && git checkout tags/v1.0.1 -b v1.0.1
RUN cd prometheus-cpp && mkdir _build && cd _build && cmake .. -DBUILD_SHARED_LIBS=off -DENABLE_PULL=off -DENABLE_PUSH=off -DENABLE_COMPRESSION=off -DENABLE_TESTING=off && make && make install

RUN git clone https://github.com/drogonframework/drogon.git
RUN cd drogon && git checkout tags/v1.7.4 -b v1.7.4
RUN cd drogon && git checkout tags/v1.9.1 -b v1.9.1
RUN cd drogon && git submodule init && git submodule update && mkdir _build && cd _build && cmake .. -DBUILD_REDIS=OFF && make && make install

ADD CHANGELOG.md configure.ac ext LICENSE Makefile.am README.md NOTICE /wforce/
Expand Down
2 changes: 1 addition & 1 deletion docker/wforce_image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ WORKDIR /wforce/
RUN mkdir /wforce/install

RUN git clone https://github.com/drogonframework/drogon.git
RUN cd drogon && git checkout tags/v1.7.4 -b v1.7.4
RUN cd drogon && git checkout tags/v1.9.1 -b v1.9.1
RUN cd drogon && git submodule init && git submodule update && mkdir _build && cd _build && cmake .. -DBUILD_REDIS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_ORM=OFF && make && make install

ADD CHANGELOG.md configure.ac ext LICENSE Makefile.am README.md NOTICE /wforce/
Expand Down
16 changes: 8 additions & 8 deletions ext/json11/json11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class Value : public JsonValue {

// Constructors
explicit Value(const T &value) : m_value(value) {}
explicit Value(T &&value) : m_value(move(value)) {}
explicit Value(T &&value) : m_value(std::move(value)) {}

// Get type tag
Json::Type type() const override {
Expand Down Expand Up @@ -199,23 +199,23 @@ class JsonString final : public Value<Json::STRING, string> {
const string &string_value() const override { return m_value; }
public:
explicit JsonString(const string &value) : Value(value) {}
explicit JsonString(string &&value) : Value(move(value)) {}
explicit JsonString(string &&value) : Value(std::move(value)) {}
};

class JsonArray final : public Value<Json::ARRAY, Json::array> {
const Json::array &array_items() const override { return m_value; }
const Json & operator[](size_t i) const override;
public:
explicit JsonArray(const Json::array &value) : Value(value) {}
explicit JsonArray(Json::array &&value) : Value(move(value)) {}
explicit JsonArray(Json::array &&value) : Value(std::move(value)) {}
};

class JsonObject final : public Value<Json::OBJECT, Json::object> {
const Json::object &object_items() const override { return m_value; }
const Json & operator[](const string &key) const override;
public:
explicit JsonObject(const Json::object &value) : Value(value) {}
explicit JsonObject(Json::object &&value) : Value(move(value)) {}
explicit JsonObject(Json::object &&value) : Value(std::move(value)) {}
};

class JsonNull final : public Value<Json::NUL, NullStruct> {
Expand Down Expand Up @@ -257,12 +257,12 @@ Json::Json(double value) : m_ptr(make_shared<JsonDouble>(value)) {
Json::Json(int value) : m_ptr(make_shared<JsonInt>(value)) {}
Json::Json(bool value) : m_ptr(value ? statics().t : statics().f) {}
Json::Json(const string &value) : m_ptr(make_shared<JsonString>(value)) {}
Json::Json(string &&value) : m_ptr(make_shared<JsonString>(move(value))) {}
Json::Json(string &&value) : m_ptr(make_shared<JsonString>(std::move(value))) {}
Json::Json(const char * value) : m_ptr(make_shared<JsonString>(value)) {}
Json::Json(const Json::array &values) : m_ptr(make_shared<JsonArray>(values)) {}
Json::Json(Json::array &&values) : m_ptr(make_shared<JsonArray>(move(values))) {}
Json::Json(Json::array &&values) : m_ptr(make_shared<JsonArray>(std::move(values))) {}
Json::Json(const Json::object &values) : m_ptr(make_shared<JsonObject>(values)) {}
Json::Json(Json::object &&values) : m_ptr(make_shared<JsonObject>(move(values))) {}
Json::Json(Json::object &&values) : m_ptr(make_shared<JsonObject>(std::move(values))) {}

/* * * * * * * * * * * * * * * * * * * *
* Accessors
Expand Down Expand Up @@ -356,7 +356,7 @@ struct JsonParser final {
* Mark this parse as failed.
*/
Json fail(string &&msg) {
return fail(move(msg), Json());
return fail(std::move(msg), Json());
}

template <typename T>
Expand Down
6 changes: 3 additions & 3 deletions m4/pdns_check_prometheus_cpp.m4
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ AC_DEFUN([PDNS_CHECK_LIBPROMETHEUS], [
# then use that information and don't search promdirs
AC_CHECK_TOOL([PKG_CONFIG], [pkg-config])
if test x"$PKG_CONFIG" != x""; then
LIBPROMETHEUS_LDFLAGS=`$PKG_CONFIG libprometheus-cpp-core --libs-only-L 2>/dev/null`
LIBPROMETHEUS_LDFLAGS=`$PKG_CONFIG prometheus-cpp-core --libs-only-L 2>/dev/null`
if test $? = 0; then
LIBPROMETHEUS_LIBS=`$PKG_CONFIG libprometheus-cpp-core --libs-only-l 2>/dev/null`
LIBPROMETHEUS_INCLUDES=`$PKG_CONFIG libprometheus-cpp-core --cflags-only-I 2>/dev/null`
LIBPROMETHEUS_LIBS=`$PKG_CONFIG prometheus-cpp-core --libs-only-l 2>/dev/null`
LIBPROMETHEUS_INCLUDES=`$PKG_CONFIG prometheus-cpp-core --cflags-only-I 2>/dev/null`
found=true
fi
fi
Expand Down
Loading