openfst-1.6.5交叉编译失败

时间:2018-04-11 03:04:26

标签: linux gcc

我一直在研究openfst-1.6.5的交叉编译。我的交叉编译器是gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu

每次我按照以下方式执行订单时:

./configure --prefix=`pwd` --enable-static --enable-shared --enable-far --enable-ngram-fsts --build=armv8 --host=aarch64-linux-gnu
make -j 4

结果总是如下:

/data/jiachen/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libfstfar.so.8, needed by ./.libs/libfstfarscript.so/, datanot/ jiachenfound/ gcc(-trylinaro -using6.3.1 --2017.02rpath- x86_64_aarch64or- linux--rpathgnu-/linkbin)/
...//.liblibs//gcclibfstfarscript.so/:aarch64 -undefinedlinux -referencegnu /to6.3.1 /`.fst.:/:.IsSTList.(/std.:.:/__cxx11.:.:/basic_stringaarch64<-charlinux,- gnustd/:bin:/char_traitsld<:char >warning,:  stdlibfstfar.so.8:,: allocatorneeded< charby>  .>/ .constlibs&/)libfstfarscript.so',
.not/ .foundlibs /(libfstfarscript.sotry:  usingundefined  -referencerpath  toor  `-fstrpath:-:linkIsSTTable)(
std.:/:.__cxx11libs:/:libfstfarscript.sobasic_string:< charundefined,  referencestd :to: char_traits`<fstchar:>:,IsSTList (stdstd::::allocator__cxx11<:char:>basic_string <>char ,const &std):':
char_traits<char>, std::allocator<char> > const&)'
./.libs/libfstfarscript.so: undefined reference to `fst::IsSTTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[4]: *** [farcreate] Error 1
make[4]: *** [farprintstrings] Error 1
/data/jiachen/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libfstfar.so.8, needed by ./.libs/libfstfarscript.so, not found (try using -rpath or -rpath-link)
./.libs/libfstfarscript.so: undefined reference to `fst::IsSTList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
./.libs/libfstfarscript.so: undefined reference to `fst::IsSTTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[4]: *** [farcompilestrings] Error 1
/data/jiachen/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libfstfar.so.8, needed by ./.libs/libfstfarscript.so, not found (try using -rpath or -rpath-link)
./.libs/libfstfarscript.so: undefined reference to `fst::IsSTList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
./.libs/libfstfarscript.so: undefined reference to `fst::IsSTTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
/data/jiachen/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libfstfar.so.8, needed by ./.libs/libfstfarscript.so, not found (try using -rpath or -rpath-link)
./.libs/libfstfarscript.so: undefined reference to `fst::IsSTList(std::__cxx11::basic_string<char, stdmake[4]: :*** [farinfo] Error 1:
char_traits<char>, std::allocator<char> > const&)'
./.libs/libfstfarscript.so: undefined reference to `fst::IsSTTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[4]: *** [farisomorphic] Error 1
/data/jiachen/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libfstfar.so.8, needed by ./.libs/libfstfarscript.so, not found (try using -rpath or -rpath-link)
./.libs/libfstfarscript.so: undefined reference to `fst::IsSTList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
./.libs/libfstfarscript.so: undefined reference to `fst::IsSTTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[4]: *** [farextract] Error 1
make[4]: Leaving directory `/data/jiachen/kaldi-aarch64/tools/openfst-1.6.5/src/extensions/far'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/data/jiachen/kaldi-aarch64/tools/openfst-1.6.5/src/extensions'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/data/jiachen/kaldi-aarch64/tools/openfst-1.6.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/jiachen/kaldi-aarch64/tools/openfst-1.6.5'
make: *** [all] Error 2

远程扩展交叉编译失败。我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

在编译kaldi时遇到相同的问题。我必须从MakeFile中的行--enable-far中删除OPENFST_CONFIGURE选项。来源:here