Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

ibccurl.so: unknown file type #15

Open
rafalf opened this issue Dec 14, 2020 · 7 comments
Open

ibccurl.so: unknown file type #15

rafalf opened this issue Dec 14, 2020 · 7 comments

Comments

@rafalf
Copy link

rafalf commented Dec 14, 2020

I am seeing the following exception on my Mac while performing local POW

exception: dlopen(/Users/rafalfusik/gitprojects/iotaPerfm/venv/lib/python3.7/site-packages/pow/libccurl.so, 6): no suitable image found.  Did find:
	/Users/ABC/gitprojects/iotaPerfm/venv/lib/python3.7/site-packages/pow/libccurl.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
	/Users/ABC/gitprojects/iotaPerfm/venv/lib/python3.7/site-packages/pow/libccurl.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

what I have installed

  • pip install pyota

  • pip install pyota[ccurl]

  • pip install pyota[pow]

@lzpap
Copy link
Member

lzpap commented Dec 14, 2020

hey @rafalf , yeah, the pip version is for linux. If you want to use it on Mac, you have to recompile the c library libccurl.so. You can do so by following this: https://github.com/iotaledger/ccurl.interface.py#installation

@lzpap
Copy link
Member

lzpap commented Dec 14, 2020

@rafalf essentially you need to clone the repo, run init.sh and then pip install -e .

@rafalf
Copy link
Author

rafalf commented Dec 14, 2020

I ran the init and then installed but then I found out that the image is not getting built

(venv) Rafals-MacBook-Air:ccurl.interface.py ABC$ cd ccurl_repo/ccurl && mkdir -p build && cd build && cmake .. && cmake --build .
CMake Deprecation Warning at deps/libopencl-stub/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Configuring done
-- Generating done
-- Build files have been written to: /Users/rafalfusik/gitprojects/iotaPerfm/ccurl.interface.py/ccurl_repo/ccurl/build
[  6%] Built target OpenCL
[ 36%] Built target ccurl
[ 66%] Built target ccurlstatic
[ 73%] Built target ccurl-cli
[ 80%] Built target ccurld
[ 86%] Built target ccurl-digest
[ 93%] Built target trytes-to-trits
[100%] Built target trytes-to-long
(
cd ../../..
 $(find ./ccurl_repo -name "*.so")

and I get no hits, .so aint getting built

@lzpap
Copy link
Member

lzpap commented Dec 15, 2020

@rafalf is it possible that on mac, cmake builds a .dylib instead of a .so?

@rafalf
Copy link
Author

rafalf commented Dec 15, 2020

@lzpap Yup

(venv) Rafals-MacBook-Air:ccurl.interface.py ABC$ find ./ccurl_repo -name "*.dylib"
./ccurl_repo/ccurl/build/lib/libccurl.dylib

@lzpap
Copy link
Member

lzpap commented Dec 15, 2020

@rafalf just out of curiosity, what happens, when you rename the created file to .so? Does it work? If not, then quite some things should be changed in the repo, it was developed with mainly linux and windows in mind...

@rafalf
Copy link
Author

rafalf commented Dec 15, 2020

Copied a few bits and pieces from the init

mv ./ccurl_repo/ccurl/build/lib/libccurl.dylib ./ccurl_repo/ccurl/build/lib/libccurl.so
LIB=$(find ./ccurl_repo -name "*.so")
WD=$(pwd)
cp $LIB $WD/pow
pip install -e .

Working like a charme @lzpap . thanks mate!

Getting platforms... 
OpenCL Hashing with 32 loops...
OpenCL Hashing with 32 loops...
OpenCL Hashing with 32 loops...
OpenCL Hashing with 32 loops...
Transaction sent to the tangle: 1i MESSAGE LLB8IOKR8TRB0NA9UXVSX7OBGZEHXJ, time elapsed: 00:00:50
Took 00:00:51 to send and receive 1i MESSAGE LLB8IOKR8TRB0NA9UXVSX7OBGZEHXJ

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

No branches or pull requests

2 participants