0

I was able to successfully build avahi per the instructions, but the next step in the quick start of running "ant test-browse" results in a symbol lookup error, and I'm confused about how to proceed with troubleshooting this problem. I did find the following post that showed a similar problem, but wasn't able to make any progress (it seems the thread was never publicly resolved anyway). Here is the error output that I see:

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
jonderry
  • 23,013
  • 32
  • 104
  • 171

1 Answers1

0

Finally found a workaround: export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libavahi-common.so:/usr/lib/x86_64-linux-gnu/libavahi-client.so

If anyone can shed light on why this manual hacking is required, I would love suggestions on why the standard build process did not work for me (this is on Ubuntu).

jonderry
  • 23,013
  • 32
  • 104
  • 171