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

64-bit #15

Open
SirNerdBear opened this issue Apr 13, 2023 · 4 comments
Open

64-bit #15

SirNerdBear opened this issue Apr 13, 2023 · 4 comments

Comments

@SirNerdBear
Copy link

I was able to compile the C version on my Pi running 64-bit OS. But the dynamic library used by Python is precompiled and 32-bit. Is there a makefile for building librm0004_display.so?

@rownie66
Copy link

Hello @SirNerdBear ,

I think I have the same issue, also running a 64-bit raspberry pi OS. When I try to load this library I get the following error:

Traceback (most recent call last):
  File "/home/XXX/./mydisplay2.py", line 16, in <module>
    UCTRONICS = cdll.LoadLibrary('/opt/SKU_RM0004/python/librm0004_display.so')  #The directory where the dynamic link library is located
  File "/usr/lib/python3.9/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /opt/SKU_RM0004/python/librm0004_display.so: wrong ELF class: ELFCLASS32

Do you found a solution in the meantime and would like to help me?

@rownie66
Copy link

I found a solution:

  1. Install CMake on your 64-Bit Raspberry Pi
    apt install cmake
  2. Create a folder build in the repository root folder (SKU_RM0004) and navigate to it
    git clone https://github.com/UCTRONICS/SKU_RM0004.git
    cd SKU_RM0004
    mkdir build
    cd build
  3. Generate build files with cmake (you need to be in the build folder)
    cmake ..
  4. Build the library using the previously generated Makefile in the build/ folder
    make

@srussell1979
Copy link

So kinda related, I can not keep the display working after a reboot. I have followed the instructions to the letter, and have not been able to get the screen to work after a restart. I am VERY new at this so I might be doing something wrong. I have 64bit pi lite running on my pi4

@wolflu05
Copy link

I'm not sure if this is related, this issue is about the python bindings with the dynamic linked library as far as I see which is only available for 32bit in the repo. @rownie66 described how to compile the dynamic linked library for 64 bit. #3 might help you.

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

4 participants