-
Notifications
You must be signed in to change notification settings - Fork 12
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
macOS 10.14.5 Ddlopen Error #1
Comments
seems have to build the libamiibo under OSX. -target_link_libraries(luamiibo crypto) |
Sorry for the late response, the included libluamiibo.so is built for Linux. I was able to build the library on Mac OS X Catalina with these steps:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa43c3f..b75b0fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 2.8.4)
project(nfc3d C)
+find_package(OpenSSL REQUIRED)
include_directories(include)
if(CMAKE_COMPILER_IS_GNUCC)
@@ -31,7 +32,7 @@ set(ZEROTEST_FILES
src/zerotest.c
)
add_executable(zerotest ${ZEROTEST_FILES})
-target_link_libraries(zerotest crypto)
+target_link_libraries(zerotest OpenSSL::Crypto)
#[[ TODO: fix this
#set(NINTEST_FILES
@@ -39,7 +40,7 @@ target_link_libraries(zerotest crypto)
# src/nintest.c
#)
#add_executable(nintest ${NINTEST_FILES})
-#target_link_libraries(nintest crypto)
+#target_link_libraries(nintest OpenSSL::Crypto)
#]]
set(AMIITOOL_FILES
@@ -47,7 +48,7 @@ set(AMIITOOL_FILES
src/amiitool.c
)
add_executable(amiitool ${AMIITOOL_FILES})
-target_link_libraries(amiitool crypto)
+target_link_libraries(amiitool OpenSSL::Crypto)
# Lua library
@@ -57,12 +58,12 @@ set (LUAMIIBO_FILES
src/amiibo_lua.c
)
+add_link_options(-undefined dynamic_lookup)
add_library(luamiibo SHARED ${LUAMIIBO_FILES})
# Location of Proxmark's lua library
-set(PROXMARK_LIBLUA "~/Documents/proxmark3/liblua")
+set(PROXMARK_LIBLUA "/Users/jchambers/git/proxmark3-amiimicyou/liblua")
set_property(TARGET luamiibo PROPERTY POSITION_INDEPENDENT_CODE ON)
-# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -undefined dynamic_lookup")
target_include_directories(luamiibo PRIVATE ${PROXMARK_LIBLUA})
-target_link_libraries(luamiibo crypto)
+target_link_libraries(luamiibo OpenSSL::Crypto) Make sure to fix your Then instead of running $ rm -rf build && mkdir build && cd build
$ cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib ..
$ make It should finish successfully and generate diff --git a/client/lualibs/amiibolib.lua b/client/lualibs/amiibolib.lua
index a91091a..66aa53c 100644
--- a/client/lualibs/amiibolib.lua
+++ b/client/lualibs/amiibolib.lua
@@ -1,4 +1,4 @@
-local luamiibo_open, err = package.loadlib("./libluamiibo.so", "luaopen_luamiibo")
+local luamiibo_open, err = package.loadlib("./libluamiibo.dylib", "luaopen_luamiibo")
if err then
print(err)
diff --git a/client/scripts/amiibo.lua b/client/scripts/amiibo.lua
index c520ef8..3de40d2 100644
--- a/client/scripts/amiibo.lua
+++ b/client/scripts/amiibo.lua
@@ -4,7 +4,7 @@ local Amiibo = require('amiibolib')
local reader = require('read14a')
local bin = require('bin')
local emu = require('emulator')
-local luamiibo_open, err = package.loadlib("./libluamiibo.so", "luaopen_luamiibo")
+local luamiibo_open, err = package.loadlib("./libluamiibo.dylib", "luaopen_luamiibo")
if err then
print(err) |
I was able to compile and flash but I am getting the following error when trying to run the script.
`client $ ./proxmark3 /dev/cu.usbmodem14401
Prox/RFID mark3 RFID instrument
bootrom: /-suspect 2019-06-29 01:41:14
os: /-suspect 2019-06-29 01:41:15
LF FPGA image built for 2s30vq100 on 2015/03/06 at 07:38:04
HF FPGA image built for 2s30vq100 on 2015/11/ 2 at 9: 8: 8
uC: AT91SAM7S512 Rev B
Embedded Processor: ARM7TDMI
Nonvolatile Program Memory Size: 512K bytes. Used: 192397 bytes (37). Free: 331891 bytes (63).
Second Nonvolatile Program Memory Size: None
Internal SRAM Size: 64K bytes
Architecture Identifier: AT91SAM7Sxx Series
Nonvolatile Program Memory Type: Embedded Flash Memory
proxmark3> script run amiibo help
--- Executing: amiibo.lua, args 'help'
dlopen(./libluamiibo.so, 6): no suitable image found. Did find:
./libluamiibo.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
/Users/jeremyforan/Downloads/proxmark3-amiimicyou-master/client/libluamiibo.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
dlopen(./libluamiibo.so, 6): no suitable image found. Did find:
./libluamiibo.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
/Users/jeremyforan/Downloads/proxmark3-amiimicyou-master/client/libluamiibo.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
-----Finished
proxmark3> `
The text was updated successfully, but these errors were encountered: