我正在尝试使用Dockerfile构建Fiware Orion上下文代理:
https://hub.docker.com/r/fiware/orion/
第一步,我尝试将s390x ClefOS的FROM映像替换为等效的Centos,即https://hub.docker.com/_/clefos:
FROM s390x/clefos:7.6.1810
这花费了很长时间,而且看起来还可以,但最终出现以下错误。有任何想法吗?有人成功在IBM Z上构建了Orion版本的docker映像吗? (s390x)
更新:我已经在Dockerfile的yum install命令中添加了这四个库,它们已经正确安装,但是问题仍然存在。似乎这不仅仅是缺少那些boost_ *库的问题,而且还需要通过一些配置修复来“ ld”找到它们。
[ 97%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/mongoRegistrationCreate.cpp.o
[ 97%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/mongoRegistrationDelete.cpp.o
[ 97%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/connectionOperations.cpp.o
[ 97%] [ 98%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/mongoSubCache.cpp.o
Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/safeMongo.cpp.o
[ 98%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/compoundResponses.cpp.o
[ 98%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/location.cpp.o
[ 99%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/compoundValueBson.cpp.o
[ 99%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/dateExpiration.cpp.o
Linking CXX static library libmongoBackend.a
make[3]: Leaving directory `/opt/libmicrohttpd-0.9.48/mongo-cxx-driver-legacy-1.1.2/fiware-orion/BUILD_RELEASE'
[ 99%] Built target mongoBackend
make[3]: Entering directory `/opt/libmicrohttpd-0.9.48/mongo-cxx-driver-legacy-1.1.2/fiware-orion/BUILD_RELEASE'
Scanning dependencies of target contextBroker
make[3]: Leaving directory `/opt/libmicrohttpd-0.9.48/mongo-cxx-driver-legacy-1.1.2/fiware-orion/BUILD_RELEASE'
make[3]: Entering directory `/opt/libmicrohttpd-0.9.48/mongo-cxx-driver-legacy-1.1.2/fiware-orion/BUILD_RELEASE'
[100%] Building CXX object src/app/contextBroker/CMakeFiles/contextBroker.dir/contextBroker.cpp.o
[100%] Building CXX object src/app/contextBroker/CMakeFiles/contextBroker.dir/orionRestServices.cpp.o
Linking CXX executable contextBroker
/usr/bin/ld: cannot find -lboost_thread-mt
/usr/bin/ld: cannot find -lboost_filesystem-mt
/usr/bin/ld: cannot find -lboost_system-mt
/usr/bin/ld: cannot find -lboost_regex-mt
collect2: error: ld returned 1 exit status
make[3]: *** [src/app/contextBroker/contextBroker] Error 1
make[3]: Leaving directory `/opt/libmicrohttpd-0.9.48/mongo-cxx-driver-legacy-1.1.2/fiware-orion/BUILD_RELEASE'
make[2]: *** [src/app/contextBroker/CMakeFiles/contextBroker.dir/all] Error 2
make[2]: Leaving directory `/opt/libmicrohttpd-0.9.48/mongo-cxx-driver-legacy-1.1.2/fiware-orion/BUILD_RELEASE'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/libmicrohttpd-0.9.48/mongo-cxx-driver-legacy-1.1.2/fiware-orion/BUILD_RELEASE'
make: *** [release] Error 2
The command '/bin/sh -c adduser --comment "${ORION_USER}" ${ORION_USER} && 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 && curl -kOL http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.48.tar.gz && tar xvf libmicrohttpd-0.9.48.tar.gz && cd libmicrohttpd-0.9.48 && ./configure --disable-messages --disable-postprocessor --disable-dauth && make && make install && ldconfig && curl -kOL https://github.com/mongodb/mongo-cxx-driver/archive/legacy-1.1.2.tar.gz && tar xfz legacy-1.1.2.tar.gz && cd mongo-cxx-driver-legacy-1.1.2 && scons --use-sasl-client --ssl && scons install --prefix=/usr/local --use-sasl-client --ssl && curl -kOL https://github.com/miloyip/rapidjson/archive/v1.0.2.tar.gz && tar xfz v1.0.2.tar.gz && mv rapidjson-1.0.2/include/rapidjson/ /usr/local/include && git clone https://github.com/telefonicaid/fiware-orion && cd fiware-orion && git checkout ${GIT_REV_ORION} && make && make install && strip /usr/bin/contextBroker && mkdir -p /var/log/contextBroker && mkdir -p /var/run/contextBroker && chown ${ORION_USER} /var/log/contextBroker && chown ${ORION_USER} /var/run/contextBroker && cd /opt && if [ ${CLEAN_DEV_TOOLS} -eq 0 ] ; then yum clean all && exit 0 ; fi && rm -rf /opt/libmicrohttpd-0.9.48.tar.gz /usr/local/include/microhttpd.h /usr/local/lib/libmicrohttpd.* /opt/libmicrohttpd-0.9.48 /opt/legacy-1.1.2.tar.gz /opt/mongo-cxx-driver-legacy-1.1.2 /usr/local/include/mongo /usr/local/lib/libmongoclient.a /opt/rapidjson-1.0.2 /opt/v1.0.2.tar.gz /usr/local/include/rapidjson /opt/fiware-orion /usr/share/cracklib /usr/share/i18n /usr/{lib,lib64}/gconv && yum -y erase git perl* rsync cmake libarchive gcc-c++ cloog-ppl cpp gcc glibc-devel glibc-headers kernel-headers libgomp libstdc++-devel mpfr ppl scons boost-devel libcurl-devel gnutls-devel libgcrypt-devel clang llvm llvm-libs CUnit-devel CUnit autoconf automake m4 libidn-devel boost-wave boost-serialization boost-python boost-iostreams boost boost-date-time boost-test boost-graph boost-signals boost-program-options boost-math openssh openssh-clients libedit hwdata dbus-glib fipscheck* *devel sysvinit-tools && rpm -qa groff | xargs -r rpm -e --nodeps && yum clean all && rm -rf /var/lib/yum/yumdb && rm -rf /var/lib/yum/history && rpm -vv --rebuilddb && find /usr/share/locale -mindepth 1 -maxdepth 1 ! -name 'en_US' ! -name 'locale.alias' | xargs -r rm -r && bash -c 'localedef --list-archive | grep -v -e "en_US" | xargs localedef --delete-from-archive' && /bin/cp -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl && build-locale-archive && rm -f /var/log/*log' returned a non-zero code: 2
答案 0 :(得分:0)
通过
/usr/bin/ld: cannot find -lboost_thread-mt
/usr/bin/ld: cannot find -lboost_filesystem-mt
/usr/bin/ld: cannot find -lboost_system-mt
/usr/bin/ld: cannot find -lboost_regex-mt
我猜想缺少一些必需的依赖项。解决方案是将它们安装为Dockefile脚本的一部分。但是,不确定如何在s390x / clefos中执行此操作(在CentOS中,是使用yum
安装包含依赖项的软件包的问题,而Dockerfile会这样做)。