clj-bots / gpio

GPIO Library for Clojure
Eclipse Public License 1.0
1 stars 0 forks source link

Get CompilerException when trying to load sysfs impl ns #4

Open metasoarous opened 9 years ago

metasoarous commented 9 years ago

I get the following:

user=> (require 'clj-bots.gpio.impl.sysfs)

CompilerException java.lang.RuntimeException: Unable to resolve symbol: when-err in this context, compiling:(net/n01se/clojure_jna/libc_utils.clj:58:5) 

Any idea what this might be related to? I'm wondering if this is what's keeping bonejure from compiling (it's complaining about not finding the impl.sysfs ns).

zeroem commented 9 years ago

Not certain, I'll look into it tonight. Do you have libjna installed? It's required to use JNA.

zeroem commented 9 years ago

Found the issue, there is definitely an error in the library, when-err is used without being imported or referred, See:

https://github.com/Chouser/clojure-jna/blob/master/src/net/n01se/clojure_jna/libc_utils.clj

zeroem commented 9 years ago

AAAAnd there's already a PR to fix it: https://github.com/Chouser/clojure-jna/pull/7

metasoarous commented 9 years ago

Ah! Lovely. I actually didn't have jna installed... We'll have to make sure the project still loads and operates in non-JNA/sysfs mode if the user hasn't installed JNA. Again, looking at core.matrix may be instructive here, as one of the matrix implementations requires BLAS, though core.matrix operates fine without it given you stick to the other implementations.