Eric, Have you updated your Ubuntu after the initial upgrade to 17.04? You have libc version 2.17. I imagine it should be closer to 2.24, although I am looking at the x86_64 architecture. There was a glibc bug, and we saw what looks like the same problem back in April, see *Build failure with latest VPP* on the mailing list archive. I thought it was in 2.22 and fixed in 2.23. See if you can get a newer libc and make the problem disappear. I also found some workaround with -pie but that seemed to be needed only with the miscreant libc. Hope this helps.
Burt On Fri, Sep 1, 2017 at 12:36 AM, Eric Chen <eri...@marvell.com> wrote: > Hi Damjan, > > > > Following your suggestion, I upgrade my Ubuntu to Zesty (17.04), > > > > gcc version 6.3.0 20170406 (Ubuntu/Linaro 6.3.0-12ubuntu2) > > > > the previous issue gone, > > > > however did you meet below issue before: > > it happens both when I build dpaa2(over dpdk) and marvell (over > marvell-dpdk). > > I checked dpdk when build lib, there is no –FPIC option, > > So how to fix it? > > > > > > /usr/bin/ld: > /home/ericxh/work/git_work/dpdk/build//lib/librte_pmd_ena.a(ena_ethdev.o): > relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol > `__stack_chk_guard@@GLIBC_2.17' can not be used when making a shared > object; recompile with -fPIC > > /usr/bin/ld: /home/ericxh/work/git_work/dpdk/build//lib/librte_pmd_ > ena.a(ena_ethdev.o)(.text+0x44): unresolvable R_AARCH64_ADR_PREL_PG_HI21 > relocation against symbol `__stack_chk_guard@@GLIBC_2.17' > > /usr/bin/ld: final link failed: Bad value > > collect2: error: ld returned 1 exit status > > > > > > Thanks > > Eric > > > > *From:* Damjan Marion [mailto:dmarion.li...@gmail.com] > *Sent:* 2017年8月27日 3:11 > *To:* Eric Chen <eri...@marvell.com> > *Cc:* Dave Barach <dbar...@cisco.com>; Sergio Gonzalez Monroy < > sergio.gonzalez.mon...@intel.com>; vpp-dev <vpp-dev@lists.fd.io> > *Subject:* Re: [vpp-dev] [EXT] Re: compiling error natively on an am64 > box for fd.io_vpp > > > > Hi Eric, > > > > Same code compiles perfectly fine on ARM64 with newer gcc version. > > > > If you are starting new development cycle it makes sense to me that you > pick up latest ubuntu release, > > specially when new hardware is involved instead of trying to chase this > kind of bugs. > > > > Do you have any strong reason to stay on ubuntu 16.04? Both 17.04 and > upcoming 17.10 are working fine on arm64 and > > compiling of VPP works without issues. > > > > Thanks, > > > > Damjan > > > > > > On 26 Aug 2017, at 15:23, Eric Chen <eri...@marvell.com> wrote: > > > > Dave, > > > > Thanks for your answer. > > I tried below variation, it doesn’t help. > > > > Btw, there is not only one place reporting “error: unable to generate > reloads for:”, > > > > I will try to checkout the version of 17.01.1, > > since with the same native compiler, I succeeded to build fd.io_odp4vpp > (which is based on fd.io 17.01.1). > > > > will keep you posted. > > > > Thanks > > Eric > > > > *From:* Dave Barach (dbarach) [mailto:dbar...@cisco.com > <dbar...@cisco.com>] > *Sent:* 2017年8月26日 20:08 > *To:* Eric Chen <eri...@marvell.com>; Sergio Gonzalez Monroy < > sergio.gonzalez.mon...@intel.com>; vpp-dev <vpp-dev@lists.fd.io> > *Subject:* RE: [vpp-dev] [EXT] Re: compiling error natively on an am64 > box for fd.io_vpp > > > > Just so everyone knows, the function in question is almost too simple for > its own good: > > > > always_inline uword > > vlib_process_suspend_time_is_zero (f64 dt) > > { > > return dt < 10e-6; > > } > > > > What happens if you try this variation? > > > > always_inline int > > vlib_process_suspend_time_is_zero (f64 dt) > > { > > if (dt < 10e-6) > > return 1; > > return 0; > > } > > > > This does look like a gcc bug, but it may not be hard to work around... > > > > Thanks… Dave > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io > <vpp-dev-boun...@lists.fd.io>] *On Behalf Of *Eric Chen > *Sent:* Friday, August 25, 2017 11:02 PM > *To:* Eric Chen <eri...@marvell.com>; Sergio Gonzalez Monroy < > sergio.gonzalez.mon...@intel.com>; vpp-dev <vpp-dev@lists.fd.io> > *Subject:* Re: [vpp-dev] [EXT] Re: compiling error natively on an am64 > box for fd.io_vpp > > > > Hi Sergio, > > > > I upgrading to Ubuntu 16.04, > > > > Succedd to Nativly build fd.io_odp4vpp (w / odp-linux), > > However when buidl fd.io_vpp (w/ dpdk), it reported below error, > > (almost the same <platform.mk>, only difference is over dpdk or odp-linux) > > > > Anyone met before? Seem a bug of gcc. > > > > In file included from /home/ericxh/work/git_work/fd. > io_vpp/build-data/../src/vlib/error_funcs.h:43:0, > > from /home/ericxh/work/git_work/fd. > io_vpp/build-data/../src/vlib/vlib.h:70, > > from /home/ericxh/work/git_work/fd. > io_vpp/build-data/../src/vnet/l2/l2_fib.c:19: > > /home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vlib/node_funcs.h: > In function ‘vlib_process_suspend_time_is_zero’: > > /home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vlib/node_funcs.h:442:1: > error: unable to generate reloads for: > > } > > ^ > > (insn 11 37 12 2 (set (reg:CCFPE 66 cc) > > (compare:CCFPE (reg:DF 79) > > (reg:DF 80))) /home/ericxh/work/git_work/fd. > io_vpp/build-data/../src/vlib/node_funcs.h:441 395 {*cmpedf} > > (expr_list:REG_DEAD (reg:DF 80) > > (expr_list:REG_DEAD (reg:DF 79) > > (nil)))) > > /home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vlib/node_funcs.h:442:1: > internal compiler error: in curr_insn_transform, at lra-constraints.c:3509 > > Please submit a full bug report, > > with preprocessed source if appropriate. > > See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions. > > Makefile:6111: recipe for target 'vnet/l2/l2_fib.lo' failed > > make[4]: *** [vnet/l2/l2_fib.lo] Error 1 > > make[4]: *** Waiting for unfinished jobs.... > > > > > > > > ericxh@linaro-developer:~/work/git_work/fd.io_vpp$ gcc -v > > Using built-in specs. > > COLLECT_GCC=gcc > > COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/5/lto-wrapper > > Target: aarch64-linux-gnu > > Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro > 5.3.1-14ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs > --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr > --program-suffix=-5 --enable-shared --enable-linker-build-id > --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix > --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu > --enable-libstdcxx-debug --enable-libstdcxx-time=yes > --with-default-libstdcxx-abi=new --enable-gnu-unique-object > --disable-libquadmath --enable-plugin --with-system-zlib > --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo > --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-arm64/jre > --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-arm64 > --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-arm64 > --with-arch-directory=aarch64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar > --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror > --enable-checking=release --build=aarch64-linux-gnu > --host=aarch64-linux-gnu --target=aarch64-linux-gnu > > Thread model: posix > > gcc version 5.3.1 20160413 (Ubuntu/Linaro 5.3.1-14ubuntu2) > > > > > > > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io > <vpp-dev-boun...@lists.fd.io>] *On Behalf Of *Eric Chen > *Sent:* 2017年8月25日 21:20 > *To:* Sergio Gonzalez Monroy <sergio.gonzalez.mon...@intel.com>; vpp-dev < > vpp-dev@lists.fd.io> > *Subject:* Re: [vpp-dev] [EXT] Re: compiling error natively on an am64 > box for fd.io_vpp > > > > HI Sergio > > > > Thanks a lot. > > > > I look at the log, and search “APIGEN: “, indeed not find “ipsec.api.h” > is generated. > > > > So I change the <platform>.mk, try to remove “ --without-libssl”, > > > > Then “ipsec.api.h” is generated, but I do not understand why > “--without-libssl” can not work, there should be some dependency between > different options. > > > > Anyway, Thank you for the help. > > > > > > Eric > > *From:* Sergio Gonzalez Monroy [mailto:sergio.gonzalez.mon...@intel.com > <sergio.gonzalez.mon...@intel.com>] > *Sent:* 2017年8月25日 19:56 > *To:* Eric Chen <eri...@marvell.com>; vpp-dev <vpp-dev@lists.fd.io> > *Subject:* [EXT] Re: [vpp-dev] compiling error natively on an am64 box > for fd.io_vpp > > > > External Email > ------------------------------ > > Hi Eric, > > The ipsec.api.h file should be auto generated, did you have any other > error before that one? > > Thanks, > Sergio > > On 25/08/2017 12:03, Eric Chen wrote: > > Hi > > > > I am building fd.io w/ dpdk natively on an am64 box, however encounters > below error, > > I didn’t find ipsec.api.h under the package, > > Shouldn’t have such a basic problem, what did I miss? > > Could anyone help me out? > > > > > > CC vnet/policer/xlate.lo > > In file included from /home/ericxh/work/git_work/fd. > io_vpp/build-data/../src/vnet/vnet_msg_enum.h:24:0, > > from /home/ericxh/work/git_work/fd. > io_vpp/build-data/../src/vnet/interface_api.c:30: > > /home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vnet/vnet_all_api_h.h:47:34: > fatal error: vnet/ipsec/ipsec.api.h: No such file or directory > > compilation terminated. > > > > > > Thanks > > Eric > > > > _______________________________________________ > > vpp-dev mailing list > > vpp-dev@lists.fd.io > > https://lists.fd.io/mailman/listinfo/vpp-dev > > > > _______________________________________________ > vpp-dev mailing list > vpp-dev@lists.fd.io > https://lists.fd.io/mailman/listinfo/vpp-dev > > > > _______________________________________________ > vpp-dev mailing list > vpp-dev@lists.fd.io > https://lists.fd.io/mailman/listinfo/vpp-dev >
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev