Skip to content
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

zmq.h not found #119

Open
hsmyers opened this issue Jan 23, 2024 · 7 comments
Open

zmq.h not found #119

hsmyers opened this issue Jan 23, 2024 · 7 comments

Comments

@hsmyers
Copy link

hsmyers commented Jan 23, 2024

After executing "ros install common-lisp-jupyter," I was presented with a host of error text that boiled down to "zmq.h not found." This running under Windows 11 (bleeding edge) with a fresh install of roswell via scoop. I was not aware that roswell would install a duplicate version of sbcl, but don't see that as a problem. I saw that some time back, you were (I think) able to solve this for a Mac installation, but I did not see anything that seemed a good fit. Help?

@yitzchak
Copy link
Owner

You need to have ZeroMQ installed per the installation requirements: https://yitzchak.github.io/common-lisp-jupyter/install#requirements

I don't use Windows regularly so I am not an expert in this, but there is an example of this being done in the GitHub workflow via Conda. There are other ways to do this if you are using a different package manager.

- name: Install Windows dependencies
if: matrix.os == 'windows-latest'
run: |
conda install -c conda-forge m2w64-gcc m2w64-zeromq
echo "C:\\Program Files\\Steel Bank Common Lisp\\2.0.0\\" >> $GITHUB_PATH
echo "SBCL_HOME=C:\\Program Files\\Steel Bank Common Lisp\\2.0.0\\" >> $GITHUB_ENV

@hsmyers
Copy link
Author

hsmyers commented Jan 23, 2024

I've no experience using conda. I suppose that's because I don't use Python. You mentioned others? I have scoop and chocolatey (choco), and whatever comes from windows, wget I think

@snunez1
Copy link

snunez1 commented Jan 24, 2024

Windows user here. It works, but it's painful (as mentioned, primary/only author doesn't use MS Windows). Having recently setup everything for a CL notebook, again, the working formula, for me, is to keep everything in the MSYS2 environment. Python, ZeroMQ, etc. The only exception is conda -- I used the MS Windows install and then put it in my bash shell path along with with this snippet in .bashrc:

# This should really be avoided, as it brings in it's own gcc compiler toolchain.
# See: https://stackoverflow.com/questions/65572789/i-have-installed-msys2-and-anaconda3-then-how-can-i-use-conda-on-msys2
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
eval "$('/c/Users/Nunez/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"

Yes, it probably isn't the most efficient, but seems to be stable. Using a pure-Windows install was, for me, fragile and seemed to break on every CLJ release.

Oh, and the jupyter-lab executable seems to barf on not being able to find zmq.dll. I solve this by placing the executable in the MSYS2 bin directory.

It's probably possible to get all this fixed up 'properly', but I ran out of patience. Let us know how you go.

@yitzchak
Copy link
Owner

Thanks @snunez1

Unfortunately, ZeroMQ is required by the Jupyter protocol. If we had a CL-native implementation of ZeroMQ than we could forgo the CFFI dependency. I have looked into the specs for the protocol and it certainly seems possible using usocket. It would just take time to write from scratch. It would obviously benefit Windows the most. The benefit to Linux and Mac would be less, but it would mean that I could ditch static-vectors, which I really dislike.

@yitzchak
Copy link
Owner

yitzchak commented Feb 4, 2024

I have a very rough proof-of-concept that ditches the CFFI pzmq for a native Lisp ZeroMQ dependency. Much more work to be done before I'll even be able to make a decision whether to go in this direction.

@hsmyers
Copy link
Author

hsmyers commented Feb 4, 2024 via email

@yitzchak
Copy link
Owner

I am still a long way from deciding whether or not to continue in this direction. I haven't tested the native CL ZeroMQ client with the two primary users of common-lisp-jupyter yet (Maxima and CANDO). For those that want to try out my current attempt you will need clones of the following in an ASDF findable location (configure the ASDF registry or put them in ~/quicklisp/local-projects).

  1. https://github.com/yitzchak/nontrivial-gray-streams
  2. https://github.com/yitzchak/nilmq

You'll also need the nilmq branch of common-lisp-jupyter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants