koth / kcws

Deep Learning Chinese Word Segment
2.08k stars 648 forks source link

bazel build //kcws/cc:seg_backend_api 错误 error: undefined reference to '_Ux86_64_getcontext' #77

Open buptdjd opened 7 years ago

buptdjd commented 7 years ago

kcws/cc/BUILD:151:1: Linking of rule '//kcws/cc:seg_backend_api' failed: gcc failed: error executing command (cd /home/xxx/.cache/bazel/_bazel_xxx/23262c8d7c0b9ee3f2df2240efd23a78/execroot/kcws && \ exec env - \ PATH=/opt/tiger/jdk/jdk1.8/bin:/opt/tiger/go/go1.8.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/tiger/ss_bin:/usr/local/jdk/bin:/usr/sbin/:/opt/tiger/ss_lib/bin:/opt/tiger/cpplib/bin:/opt/tiger/dev_toolkit/bin:/opt/tiger/ss_lib/python_package/lib/python2.7/site-packages/django/bin:/opt/tiger/yarn_deploy/hadoop/bin/:/opt/tiger/hive_deploy/bin:/opt/tiger/yarn_deploy/jdk/bin/:/opt/tiger/hadoop_deploy/jython-2.5.2/bin \ /usr/bin/gcc -o bazel-out/local-fastbuild/bin/kcws/cc/seg_backend_api -pthread '-fuse-ld=gold' -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin -B/usr/bin '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -pass-exit-codes -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/kcws/cc/seg_backend_api-2.params): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. src/stacktrace_libunwind-inl.h:65: error: undefined reference to '_Ux86_64_getcontext' src/stacktrace_libunwind-inl.h:66: error: undefined reference to '_ULx86_64_init_local' src/stacktrace_libunwind-inl.h:78: error: undefined reference to '_ULx86_64_step' src/stacktrace_libunwind-inl.h:70: error: undefined reference to '_ULx86_64_get_reg' src/stacktrace_libunwind-inl.h:78: error: undefined reference to '_ULx86_64_step' collect2: error: ld returned 1 exit status Target //kcws/cc:seg_backend_api failed to build

buptdjd commented 7 years ago

Any one can reply? This problem confuse me for a long time.

koth commented 7 years ago

感觉加了别的链接选项,libunwind这个怎么引入的?

buptdjd commented 7 years ago

@koth,我是直接下载的咱们github上的源代码,然后在linux上编译的,然后按照Readme的步骤,然后出现这种错误,所以不清楚。

mjc14 commented 5 years ago

这个问题后来解决了吗?