pok3r-custom / pok3r_re_firmware

Reverse engineering project for the POK3R and related keyboards.
219 stars 17 forks source link

pok3rtool fails to compile on macOS #13

Closed drewcassidy closed 6 years ago

drewcassidy commented 6 years ago

attempting to compile this with cmake on macOS has resulted in failures due to the requirement of openSSL.

CMake Error at libchaos/cmake/FindLibs.cmake:17 (MESSAGE):
  OpenSSL (libcrypto/libssl) support is required (REQUIRE_CRYPTO)
Call Stack (most recent call first):
  libchaos/CMakeLists.txt:37 (INCLUDE)
dragonfax commented 6 years ago

install openssl with brew?

I compiled an old version of this on my mac. but it was easily a year ago, and I can't remember what version or what hoops I had to jump through.

drewcassidy commented 6 years ago

I did do brew install openssl

Apple has since switched away from using openSSL themselves, so I think any implementation that previously relied on the built in version has trouble now. I don't understand enough about how homebrew and cmake work to figure this out though. I tried editing PATH and passing different flags to cmake with no luck

ChaoticEnigma commented 6 years ago

So, openssl in homebrew is keg-only (not linked into system path), so there is no way cmake will find it without help. Try setting CMAKE_PREFIX_PATH to tell cmake where to look for it.

Like: $ CMAKE_PREFIX_PATH=/usr/local/opt/openssl cmake ../pok3r_re_firmware (i think you only need this the first time you run cmake)

Seems I didn't have this issue before because cmake was finding another openssl installed by macports. This should either go into documentation for libchaos, or the openssl dependency should be extracted on osx.

ChaoticEnigma commented 6 years ago

Should I assume this is resolved?

drewcassidy commented 6 years ago

ok uh... it no longer fails but I have no idea where to find the output

nevermind didnt realize it just made a makefile. I'm getting a different error though which I'll open a different issue for