【问题标题】:Why does Avahi "ant test-browse" fail with "libavahi4j.so: undefined symbol: avahi_malloc"?为什么 Avahi “ant test-browse” 失败并显示 “libavahi4j.so: undefined symbol: avahi_malloc”?
【发布时间】:2014-05-30 01:43:45
【问题描述】:

我能够按照instructions 成功构建 avahi,但是在快速开始运行“ant test-browse”的下一步会导致符号查找错误,我对如何继续进行故障排除感到困惑这个问题。我确实发现以下post 显示了类似的问题,但无法取得任何进展(似乎该线程无论如何都没有公开解决)。这是我看到的错误输出:

myUser@ubuntu:~/Downloads/avahi4j-0.1$ ant test-browse
Buildfile: /home/myUser/Downloads/avahi4j-0.1/build.xml

init:

compile:
    [javac] /home/myUser/Downloads/avahi4j-0.1/build.xml:109: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

jar:

jnilib:
     [exec] make: Entering directory `/home/myUser/Downloads/avahi4j-0.1/src'
     [exec] make: Nothing to be done for `all'.
     [exec] make: Leaving directory `/home/myUser/Downloads/avahi4j-0.1/src'

test-browse:
     [java] Avahi4J v0.1-0
     [java] /usr/lib/jvm/java-7-oracle/jre/bin/java: symbol lookup error: /home/myUser/Downloads/avahi4j-0.1/libavahi4j.so: undefined symbol: avahi_malloc

BUILD FAILED
/home/myUser/Downloads/avahi4j-0.1/build.xml:185: Java returned: 127

Total time: 0 seconds

【问题讨论】:

    标签: java c++ c ant avahi


    【解决方案1】:

    终于找到了解决办法:export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libavahi-common.so:/usr/lib/x86_64-linux-gnu/libavahi-client.so

    如果有人能阐明为什么需要这种手动黑客攻击,我希望能就为什么标准构建过程对我不起作用(这是在 Ubuntu 上)提出建议。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-05-08
      • 2011-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-15
      • 1970-01-01
      相关资源
      最近更新 更多