-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fresh build on OSX complains about avahi-client being missing #14
Comments
It is supposed to be optional - please provide more details. |
@chevdor use |
However you can install |
@soundstorm Patches are welcome ;) The proper solution would be to write the small piece of code to replace avahi with bonjour/zeroconf on mac. Unfortunately I don't have a mac myself so any support for mac would have to be contributed by others and I would welcome that very much 👍 |
Thanks @soundstorm that worked a treat! In summary:
|
Notes from the macOS Big Sur battlefield. brew install automake
./autogen.sh
./configure --disable-avahi You need Mac ports (https://ports.macports.org) to do this step: sudo port install rpcgen-mt After using Got: vxi11core_clnt.c:18:2: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Werror,-Wimplicit-function-declaration]
memset((char *)&clnt_res, 0, sizeof(clnt_res)); added this to #include <string.h>
#include <unistd.h> then Last step, gcc /usr/local/lib/liblxi.dylib scpi.c It compiled! But when I try to run it: [1] 16707 segmentation fault ./a.out It does that on this line: device = lxi_connect("192.168.X.X", 0, "gpib0,22", timeout, VXI11); It crashes during the connection attempt is performed (I can see Agilent E5810A ethernet light flashing). |
I find it surprising you experienced these issues and I did not, despite using the same OS only a month earlier with no commits to master in the meantime. Sounds like the library compilation was successful in the end. From there I compiled and ran I suggest you compare your |
Aaaaand it works! Recipe that worked on Big Sur: Thanks @soundstorm @hraftery 🙏 ./autogen.sh
./configure --disable-avahi
nano src/Makefile.am // replace `rpcgen` with `/opt/local/bin/rpcgen-mt`
make
make install
cd ./test
gcc /usr/local/lib/liblxi.dylib scpi.c
./a.out
KEITHLEY INSTRUMENTS INC.,MODEL 2000,0598354,A05 /A02 What happened? I don't know, just tried it from scratch today and it went fine. It's not like I was able to build this thing right away, tried couple of solutions and one of the experiment must have caused this weird crash. Next step? Build the lib for |
FYI - in the next release autotools is replaced with meson and the need for rpcgen is also gone. |
The doc however mentions that avahi is optional.
The text was updated successfully, but these errors were encountered: