在alpine linux上编译mesos时出错

jyztefdp  于 2021-06-26  发布在  Mesos
关注(0)|答案(3)|浏览(423)

我正在尝试创建一个mesos0.27.1映像,以便在alpinelinux上进行测试,我已经成功地通过了反复编译。现在我遇到了一个看起来相当低级的错误,我想知道这是否意味着我不能在阿尔卑斯山上使用Mesos。
错误如下:

libtool: compile:  g++ -DPACKAGE_NAME=\"libprocess\" -DPACKAGE_TARNAME=\"libprocess\" -DPACKAGE_VERSION=\"0.0.1\" "-DPACKAGE_STRING=\"libprocess 0.0.1\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libprocess\" -DVERSION=\"0.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_APR_POOLS_H=1 -DHAVE_LIBAPR_1=1 -DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 -DHAVE_SVN_DELTA_H=1 -DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBCURL=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_LIBDL=1 -I. -DBUILD_DIR=\"/usr/src/mesos-0.27.1/3rdparty/libprocess\" -I./include -I./3rdparty/stout/include -isystem 3rdparty/boost-1.53.0 -I3rdparty/libev-4.15 -I3rdparty/picojson-1.3.0 -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS -I3rdparty/glog-0.3.3/src -I3rdparty/ry-http-parser-1c3624a -I/usr/include/subversion-1 -I/usr/include/apr-1 -I/usr/include/apr-1.0 -g1 -O0 -Wno-unused-local-typedefs -std=c++11 -MT libprocess_la-logging.lo -MD -MP -MF .deps/libprocess_la-logging.Tpo -c src/logging.cpp  -fPIC -DPIC -o libprocess_la-logging.o
In file included from ./include/process/time.hpp:18:0,
                 from ./include/process/clock.hpp:18,
                 from ./include/process/delay.hpp:16,
                 from src/logging.cpp:15:
./3rdparty/stout/include/stout/duration.hpp:80:27: error: 'timeval' does not name a type
   explicit Duration(const timeval& t)
                           ^
./3rdparty/stout/include/stout/duration.hpp: In constructor 'Duration::Duration(const int&)':
./3rdparty/stout/include/stout/duration.hpp:82:15: error: request for member 'tv_sec' in 't', which is of non-class type 'const int'
     nanos = t.tv_sec * SECONDS + t.tv_usec * MICROSECONDS;
               ^
./3rdparty/stout/include/stout/duration.hpp:82:36: error: request for member 'tv_usec' in 't', which is of non-class type 'const int'
     nanos = t.tv_sec * SECONDS + t.tv_usec * MICROSECONDS;
                                    ^
./3rdparty/stout/include/stout/duration.hpp: In member function 'timeval Duration::timeval() const':
./3rdparty/stout/include/stout/duration.hpp:95:3: error: return type 'struct timeval' is incomplete
   {
   ^
./3rdparty/stout/include/stout/duration.hpp:96:20: error: aggregate 'timeval t' has incomplete type and cannot be defined
     struct timeval t;
                    ^
Makefile:844: recipe for target 'libprocess_la-logging.lo' failed
make[4]:***[libprocess_la-logging.lo] Error 1
make[4]: Leaving directory '/usr/src/mesos-0.27.1/3rdparty/libprocess'
Makefile:1321: recipe for target 'all-recursive' failed
make[3]:***[all-recursive] Error 1
make[3]: Leaving directory '/usr/src/mesos-0.27.1/3rdparty/libprocess'
Makefile:490: recipe for target 'all-recursive' failed
make[2]:***[all-recursive] Error 1
make[2]: Leaving directory '/usr/src/mesos-0.27.1/3rdparty'
Makefile:443: recipe for target 'all' failed
make[1]:***[all] Error 2
make[1]: Leaving directory '/usr/src/mesos-0.27.1/3rdparty'
Makefile:682: recipe for target 'all-recursive' failed
make:***[all-recursive] Error 1

我现在应该放弃一切希望,放弃这一努力吗?

nxagd54h

nxagd54h1#

我有一个编译的版本。如果你想看看我做了什么,你可以从这里开始:
https://github.com/jimfcarroll/mesos-on-alpine/blob/alpine/alpine/build.sh
你可以这样使用它:
https://github.com/jimfcarroll/mesos-on-alpine/blob/alpine/alpine/readme
它对系统的include文件进行了修改,并且有一个代码补丁,它从我的高山分支mesos中精选出来。您可以查看这些,看看有什么变化。
然而,大约有10-15个测试失败。
其中一些故障与alpine标准命令(如:“cp”和“du”)采用的参数与mesos预期的不同有关。
至少有一个原因是我的补丁消除了与mesos读取fstab相关的功能。
其他的我不太清楚。
我的目标不是得到一个基于阿尔卑斯山的mesos主程序和mesos从程序(尽管如果我能做到的话那会很好),而是构建libmesos。这样我就可以运行一个基于docker阿尔卑斯山的mesos框架,在库构建完成后将它们移动过来。
编辑:我应该注意到,我还没有得到它的工作,以成功地对中间层释放Mesos主和Mesos奴隶,所以把这作为一个起点。我很想看看有没有人能取得更大的进步。

u59ebvdq

u59ebvdq2#

在git的最新代码中,mesos现在应该是在alpinelinux上开箱即用(参见https://issues.apache.org/jira/browse/mesos-5540)--这些更改应该包含在随后的apachemesos版本中。

0vvn1miw

0vvn1miw3#

今天我遇到了这个问题,大卫·c·兰金的回答帮助我解决了这个问题。在/3rdparty/libprocess/3rdparty/stout/include/stout/duration.hpp中,我刚刚添加了 #include <sys/time.h> 在召唤下 #include time.h .
在安装pom(ssl证书不存在,tools.jar找不到)之后,您可能会遇到问题,但是这些问题超出了这个答案的范围。

相关问题