hansode / worklogs

0 stars 0 forks source link

openvswitch-2.3.1 on centos7 build failed #32

Closed hansode closed 9 years ago

hansode commented 9 years ago
02:59:54 /bin/sh ./libtool  --tag=CC   --mode=link gcc -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wno-format-zero-length -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wmissing-prototypes -Wmissing-field-initializers  -g -O2    -o utilities/ovs-ofctl utilities/ovs-ofctl.o ofproto/libofproto.la lib/libopenvswitch.la -lpthread -lrt -lm 
02:59:54 libtool: link: gcc -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wno-format-zero-length -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wmissing-prototypes -Wmissing-field-initializers -g -O2 -o utilities/ovs-appctl utilities/ovs-appctl.o  lib/.libs/libopenvswitch.a -lssl -lcrypto -lpthread -lrt -lm
02:59:54 libtool: link: gcc -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wno-format-zero-length -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wmissing-prototypes -Wmissing-field-initializers -g -O2 -o utilities/ovs-dpctl utilities/ovs-dpctl.o  lib/.libs/libopenvswitch.a -lssl -lcrypto -lpthread -lrt -lm
02:59:55 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x10): undefined reference to `get_dh1024'
02:59:55 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x28): undefined reference to `get_dh2048'
02:59:55 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x40): undefined reference to `get_dh4096'
02:59:55 collect2: error: ld returned 1 exit status
02:59:55 make[2]: *** [utilities/ovs-appctl] Error 1
02:59:55 make[2]: *** Waiting for unfinished jobs....
02:59:55 libtool: link: gcc -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wno-format-zero-length -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wmissing-prototypes -Wmissing-field-initializers -g -O2 -o utilities/ovs-ofctl utilities/ovs-ofctl.o  ofproto/.libs/libofproto.a /var/lib/jenkins/rpmbuild/BUILD/openvswitch-2.3.0/lib/.libs/libsflow.a lib/.libs/libopenvswitch.a -lssl -lcrypto -lpthread -lrt -lm
02:59:55 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x10): undefined reference to `get_dh1024'
02:59:55 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x28): undefined reference to `get_dh2048'
02:59:55 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x40): undefined reference to `get_dh4096'
02:59:55 collect2: error: ld returned 1 exit status
02:59:55 make[2]: *** [utilities/ovs-dpctl] Error 1
02:59:55 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x10): undefined reference to `get_dh1024'
02:59:55 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x28): undefined reference to `get_dh2048'
02:59:55 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x40): undefined reference to `get_dh4096'
02:59:55 collect2: error: ld returned 1 exit status
02:59:55 make[2]: *** [utilities/ovs-ofctl] Error 1
02:59:55 make[2]: Leaving directory `/var/lib/jenkins/rpmbuild/BUILD/openvswitch-2.3.0'
02:59:55 make[1]: Leaving directory `/var/lib/jenkins/rpmbuild/BUILD/openvswitch-2.3.0'
02:59:55 
02:59:55 
02:59:55 RPM build errors:
02:59:55 make[1]: *** [all-recursive] Error 1
02:59:55 make: *** [all] Error 2
02:59:55 error: Bad exit status from /var/tmp/rpm-tmp.EW8wTd (%build)
02:59:55     Bad exit status from /var/tmp/rpm-tmp.EW8wTd (%build)
hansode commented 9 years ago

Have you installed the openssl-devel RPM?

hansode commented 9 years ago
10:24:01 + sudo yum '--disablerepo=*' --enablerepo=base install -y openssl-devel
10:24:01 Loaded plugins: fastestmirror
10:24:01 Loading mirror speeds from cached hostfile
10:24:01 Package 1:openssl-devel-1.0.1e-34.el7.x86_64 already installed and latest version
10:24:01 Nothing to do
hansode commented 9 years ago
10:27:47 + sudo yum update -y openssl-devel
10:27:48 Loaded plugins: fastestmirror
10:27:48 Loading mirror speeds from cached hostfile
10:27:48 Resolving Dependencies
10:27:48 --> Running transaction check
10:27:48 ---> Package openssl-devel.x86_64 1:1.0.1e-34.el7 will be updated
10:27:48 ---> Package openssl-devel.x86_64 1:1.0.1e-34.el7_0.7 will be an update
10:27:48 --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.7 for package: 1:openssl-devel-1.0.1e-34.el7_0.7.x86_64
10:27:48 --> Running transaction check
10:27:48 ---> Package openssl-libs.x86_64 1:1.0.1e-34.el7 will be updated
10:27:48 ---> Package openssl-libs.x86_64 1:1.0.1e-34.el7_0.7 will be an update
10:27:49 --> Finished Dependency Resolution
10:27:49 
10:27:49 Dependencies Resolved
10:27:49 
10:27:49 ================================================================================
10:27:49  Package             Arch         Version                   Repository     Size
10:27:49 ================================================================================
10:27:49 Updating:
10:27:49  openssl-devel       x86_64       1:1.0.1e-34.el7_0.7       updates       1.2 M
10:27:49 Updating for dependencies:
10:27:49  openssl-libs        x86_64       1:1.0.1e-34.el7_0.7       updates       942 k
10:27:49 
10:27:49 Transaction Summary
10:27:49 ================================================================================
10:27:49 Upgrade  1 Package (+1 Dependent package)
10:27:49 
10:27:49 Total download size: 2.1 M
10:27:49 Downloading packages:
10:27:49 Delta RPMs reduced 2.1 M of updates to 448 k (79% saved)
10:27:49 Finishing delta rebuilds of 2 package(s) (2.1 M)
10:27:51 --------------------------------------------------------------------------------
10:27:51 Total                                              227 kB/s | 448 kB  00:01     
10:27:51 Running transaction check
10:27:51 Running transaction test
10:27:51 Transaction test succeeded
10:27:51 Running transaction
10:27:51   Updating   : 1:openssl-libs-1.0.1e-34.el7_0.7.x86_64                      1/4 
10:27:51   Updating   : 1:openssl-devel-1.0.1e-34.el7_0.7.x86_64                     2/4 
10:27:52   Cleanup    : 1:openssl-devel-1.0.1e-34.el7.x86_64                         3/4 
10:27:52   Cleanup    : 1:openssl-libs-1.0.1e-34.el7.x86_64                          4/4 
10:27:52   Verifying  : 1:openssl-devel-1.0.1e-34.el7_0.7.x86_64                     1/4 
10:27:52   Verifying  : 1:openssl-libs-1.0.1e-34.el7_0.7.x86_64                      2/4 
10:27:52   Verifying  : 1:openssl-devel-1.0.1e-34.el7.x86_64                         3/4 
10:27:52   Verifying  : 1:openssl-libs-1.0.1e-34.el7.x86_64                          4/4 
10:27:52 
10:27:52 Updated:
10:27:52   openssl-devel.x86_64 1:1.0.1e-34.el7_0.7                                      
10:27:52 
10:27:52 Dependency Updated:
10:27:52   openssl-libs.x86_64 1:1.0.1e-34.el7_0.7                                       
10:27:52 
10:27:52 Complete!
hansode commented 9 years ago
10:29:29 libtool: link: gcc -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wno-format-zero-length -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wmissing-prototypes -Wmissing-field-initializers -g -O2 -o utilities/ovs-dpctl utilities/ovs-dpctl.o  lib/.libs/libopenvswitch.a -lssl -lcrypto -lpthread -lrt -lm
10:29:30 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x10): undefined reference to `get_dh1024'
10:29:30 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x28): undefined reference to `get_dh2048'
10:29:30 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x40): undefined reference to `get_dh4096'
10:29:30 collect2: error: ld returned 1 exit status
10:29:30 make[2]: *** [utilities/ovs-appctl] Error 1
10:29:30 make[2]: *** Waiting for unfinished jobs....
10:29:30 libtool: link: gcc -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wno-format-zero-length -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wmissing-prototypes -Wmissing-field-initializers -g -O2 -o utilities/ovs-ofctl utilities/ovs-ofctl.o  ofproto/.libs/libofproto.a /var/lib/jenkins/rpmbuild/BUILD/openvswitch-2.3.1/lib/.libs/libsflow.a lib/.libs/libopenvswitch.a -lssl -lcrypto -lpthread -lrt -lm
10:29:30 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x10): undefined reference to `get_dh1024'
10:29:30 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x28): undefined reference to `get_dh2048'
10:29:30 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x40): undefined reference to `get_dh4096'
10:29:30 collect2: error: ld returned 1 exit status
10:29:30 make[2]: *** [utilities/ovs-dpctl] Error 1
10:29:30 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x10): undefined reference to `get_dh1024'
10:29:30 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x28): undefined reference to `get_dh2048'
10:29:30 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x40): undefined reference to `get_dh4096'
10:29:30 collect2: error: ld returned 1 exit status
10:29:30 make[2]: *** [utilities/ovs-ofctl] Error 1
10:29:30 make[2]: Leaving directory `/var/lib/jenkins/rpmbuild/BUILD/openvswitch-2.3.1'
10:29:30 make[1]: Leaving directory `/var/lib/jenkins/rpmbuild/BUILD/openvswitch-2.3.1'
10:29:30 
10:29:30 
10:29:30 RPM build errors:
10:29:30 make[1]: *** [all-recursive] Error 1
10:29:30 make: *** [all] Error 2
10:29:30 error: Bad exit status from /var/tmp/rpm-tmp.pniWKx (%build)
10:29:30     Bad exit status from /var/tmp/rpm-tmp.pniWKx (%build)
hansode commented 9 years ago

中途半端に base 固定している影響か? updatesを積極利用した環境に置いては、同現象が再現しなかった。

hansode commented 9 years ago

中途半端に base 固定している影響か? updatesを積極利用した環境に置いては、同現象が再現しなかった。

失敗していた環境にてyum update -yの後にビルドしてみると、同じく失敗。。。

hansode commented 9 years ago

kernelの差?

失敗:

$ uname -r
3.10.0-123.el7.x86_64

成功:

$ uname -r
3.10.0-123.20.1.el7.x86_64
hansode commented 9 years ago
$ rpm -qa | grep kernel
kernel-headers-3.10.0-123.20.1.el7.x86_64
kernel-tools-libs-3.10.0-123.20.1.el7.x86_64
kernel-3.10.0-123.20.1.el7.x86_64
kernel-tools-3.10.0-123.20.1.el7.x86_64
kernel-devel-3.10.0-123.20.1.el7.x86_64
kernel-3.10.0-123.el7.x86_64
hansode commented 9 years ago

試しに成功したカーネルバージョンで合わせてみる。

-bash-4.2$ uname -r
3.10.0-123.20.1.el7.x86_64
hansode commented 9 years ago

カーネルバージョンではなかった。

17:02:43 libtool: link: gcc -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wno-format-zero-length -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wmissing-prototypes -Wmissing-field-initializers -g -O2 -o utilities/ovs-dpctl utilities/ovs-dpctl.o  lib/.libs/libopenvswitch.a -lssl -lcrypto -lpthread -lrt -lm
17:02:43 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x10): undefined reference to `get_dh1024'
17:02:43 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x28): undefined reference to `get_dh2048'
17:02:43 lib/.libs/libopenvswitch.a(stream-ssl.o):(.data+0x40): undefined reference to `get_dh4096'
17:02:43 collect2: error: ld returned 1 exit status
hansode commented 9 years ago
$ rpm -qa openssl*
openssl-libs-1.0.1e-34.el7.x86_64
openssl-devel-1.0.1e-34.el7.x86_64

openssl-develだけ注目していたが、実はopensslがインストールされてなかった。

hansode commented 9 years ago

opensslパッケージをインストールすると、ビルド成功。

hansode commented 9 years ago

https://github.com/openvswitch/ovs/blob/master/rhel/openvswitch.spec.in#L26

BuildRequires: openssl-devel
hansode commented 9 years ago

https://github.com/openvswitch/ovs/blob/master/rhel/openvswitch-fedora.spec.in#L34

BuildRequires: systemd-units openssl openssl-devel
hansode commented 9 years ago

https://github.com/openvswitch/ovs/commit/4465062f14d74dae8e030b9b6fd2d073cfdead65