openvswitch / ovs-issues

Issue tracker repo for Open vSwitch
10 stars 3 forks source link

/usr/bin/ld: final link failed: Nonrepresentable section on output #159

Closed greenpau closed 6 years ago

greenpau commented 6 years ago

@blp , RPM build fails due to ovs-sphinx-theme (. After fixing it, the build fails for an unknown reason.

writing output... [100%] tutorials/ovs-conntrack
writing additional files... genindex search
copying images... [100%] howto/sflow.png
copying static files... done
dumping search index... done
dumping object inventory... done
build succeeded.
sphinx-build  -b man -W -n -d ./Documentation/_build/doctrees  ./Documentation ./Documentation/_build/man && touch docs-check
Making output directory...
Running Sphinx v1.1.3
Cannot find 'ovs-sphinx-theme' package. Falling back to default theme.
loading pickled environment... done
building [man]: all manpages
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
writing... ovs-sim.1 { } ovs-test.8 { } ovs-vlan-test.8 { } ovsdb-server.7 { } ovsdb.5 { } ovsdb.7 { }
build succeeded.
mv tests/testsuite.tmp tests/testsuite
make[2]: Leaving directory `/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.WLwYWS (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.WLwYWS (%build)

The above I fixed with pip install ovs-sphinx-theme.

Then, the build succeeds

updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
writing... ovs-sim.1 { } ovs-test.8 { } ovs-vlan-test.8 { } ovsdb-server.7 { } ovsdb.5 { } ovsdb.7 { }
build succeeded.
make[2]: Leaving directory `/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.eFXxAj (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.eFXxAj (%build)

When I run /var/tmp/rpm-tmp.eFXxAj manually, I get:

/usr/bin/ld: lib/.libs/libopenvswitch.a(route-table.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(classifier.o): relocation R_X86_64_32 against symbol `free@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ccmap.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(conntrack.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(dpif-netdev-perf.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(fat-rwlock.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/make[2]: libopenvswitch.a(*** [utilities/ovs-vsctl] Error 1hindex.o
): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(hmapx.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ovs-numa.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(dpdk-stub.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(conntrack-icmp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(conntrack-other.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ovsdb-data.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ovsdb-error.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ovsdb-map-op.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ovsdb-set-op.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ovsdb-condition.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ovsdb-parser.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ovsdb-session.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(ovsdb-types.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.libs/libopenvswitch.a(backtrace.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-testcontroller] Error 1
make[2]: Leaving directory `/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make: *** [all] Error 2
blp commented 6 years ago

@greenpau RPM build errors aren't my area so you should ask someone else.

I don't think any Red Hat people follow the bug tracker so you'd probably get better results on the mailing lists.