-
Notifications
You must be signed in to change notification settings - Fork 266
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
May Orion build on CentOS 8? #3764
Comments
I got Orion Context Broker running on Some comments about the installation:
I attach a portion of dockerile (not tested yet as dockerfile) with the modifications needed adduser --comment "${ORION_USER}" ${ORION_USER} && \
# Install dependencies
yum -y install epel-release && \
yum -y install \
boost-devel \
bzip2 \
cmake \
gnutls-devel \
libgcrypt-devel \
libcurl-devel \
openssl-devel \
libuuid-devel \
make \
nc \
git \
gcc-c++ \
# scons \
tar \
which \
cyrus-sasl-devel && \
# Install libmicrohttpd from source
cd /opt && \
curl -kOL http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.70.tar.gz && \
tar xvf libmicrohttpd-0.9.70.tar.gz && \
cd libmicrohttpd-0.9.70 && \
./configure --disable-messages --disable-postprocessor --disable-dauth && \
make && \
make install && \
ldconfig && \
# Install mongodb driver from source
cd /opt && \
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.16.0/mongo-c-driver-1.16.0.tar.gz && \
tar xfvz mongo-c-driver-1.16.0.tar.gz && \
cd mongo-c-driver-1.16.0 && \
mkdir cmake-build && \
cd cmake-build && \
cmake3 -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .. && \
make && \
sudo make install && \
# Coppy generated dynamic libraries to make them available from Orion
cd src && \
cp libmongoc/libmongoc-1.0.so.0 /lib64/libmongoc-1.0.so.0 && \
cp libbson/libbson-1.0.so.0 /lib64/libbson-1.0.so.0 && \
# Install rapidjson from source
cd /opt && \
curl -kOL https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz && \
tar xfz v1.1.0.tar.gz && \
mv rapidjson-1.1.0/include/rapidjson/ /usr/local/include && \
# Install git (not used in dockerfile)
yum -y install git
# Install orion from source - replaced env variables
cd /opt && \
git clone https://github.com/telefonicaid/fiware-orion.git && \
cd fiware-orion/ && \
git checkout task/3132_driver_migration_first_stage && \
sed -i '87s/.*/set (CMAKE_CXX_FLAGS "-Wall -Wno-unknown-pragmas -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -Werror -Wno-deprecated-declarations -fno-var-tracking-assignments -Wno-format-truncation -Wno-stringop-truncation -Wno-maybe-uninitialized")/' CMakeLists.txt && \
make && \
make install && \
|
Could you run the so built contextBroker (e.g. |
Orion's response: "orion" : {
"version" : "2.5.0-next",
"uptime" : "0 d, 0 h, 0 m, 21 s",
"git_hash" : "4af8845493d3ba984493f489151f5a24595d7419",
"compile_time" : "Tue Feb 16 06:28:12 EST 2021",
"compiled_by" : "root",
"compiled_in" : "localhost.localdomain",
"release_date" : "Tue Feb 16 06:28:12 EST 2021",
"doc" : "https://fiware-orion.rtfd.io/",
"libversions": {
"boost": "1_66",
"libcurl": "libcurl/7.61.1 OpenSSL/1.1.1g zlib/1.2.11 brotli/1.0.6 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.2.0) libssh/0.9.4/openssl/zlib nghttp2/1.33.0",
"libmicrohttpd": "0.9.70",
"openssl": "1.1",
"rapidjson": "1.1.0",
"mongodriver": "legacy-1.1.2"
}
}
} |
PR #3790 (to be landed soon in PR #3622) has modified the building so now the Mongo C libraries are statically linked so this can be removed from the receipt above:
|
gcc and cmake versions used to compile Orion Context Broker on Centos8
|
Some snippets for legacy driver support Installing scons wget http://repo.okay.com.mx/centos/8/x86_64/release/scons-2.3.0-2.el8.noarch.rpm
yum localinstall scons-2.3.0-2.el8.noarch.rpm Building mongo-cxx-driver lastest version (1.1.3) cd /opt && \
curl -kOL https://github.com/mongodb/mongo-cxx-driver/archive/legacy-1.1.3.tar.gz && \
tar xfz legacy-1.1.3.tar.gz && \
cd mongo-cxx-driver-legacy-1.1.3 && \
# Apply patch to make driver compatible with OpenSSL 1.1.x
# https://github.com/mongodb/mongo-cxx-driver/pull/615
wget https://patch-diff.githubusercontent.com/raw/mongodb/mongo-cxx-driver/pull/615.patch
git apply 615.patch
# Modify SConstruct file to disable warnings
sed -i '873s/.*/ "-Winvalid-pch","-Wno-nonnull-compare","-Wno-format-truncation"] )/' SConstruct && \
scons --use-sasl-client --ssl |
Done in PR #3622 |
It would be a good idea to evaluate this, doing a pass-through of the building procedure at https://fiware-orion.readthedocs.io/en/master/admin/build_source/index.html and see how it goes.
The text was updated successfully, but these errors were encountered: