Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Library doesn't work/load on M1 Mac: no LC_RPATH's found #53

Open
kwadkore opened this issue Oct 9, 2024 · 3 comments
Open

Library doesn't work/load on M1 Mac: no LC_RPATH's found #53

kwadkore opened this issue Oct 9, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@kwadkore
Copy link

kwadkore commented Oct 9, 2024

Description

I followed the installation instructions to add the library to my project (using bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-go/main/install.sh), and it failed with the error message below. I then tried to use the test in the README (go test github.com/objectbox/objectbox-go/...) and it failed for the same reason.

Basic info

Please complete the following information:

  • ObjectBox version (are you using the latest version?): Latest = 1.8.1
  • Reproducibility: Always
  • Device: M1 Pro Mac
  • OS: Sonoma 14.6.1

How to reproduce

Steps to reproduce the behavior:

  1. Follow installation instructions:
  2. bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-go/main/install.sh)
  3. Download test code: git clone https://github.com/objectbox/objectbox-go.git
  4. CD into directory
  5. Run test: go test ./...
  6. See error

Expected behavior

Test passes

Code

Use test code

Logs, stack traces

dyld[60013]: Library not loaded: @rpath/libobjectbox.dylib
Referenced from: <00598A4B-D353-7E86-FAF8-D76E2483B2BB> /private/var/folders/2k/5zy5qzq126sgs39w4cp1sb7m0000gn/T/go-build2815972867/b179/performance.test
Reason: no LC_RPATH's found

@kwadkore kwadkore added the bug Something isn't working label Oct 9, 2024
@greenrobot-team
Copy link
Member

Thanks for reporting! Based on a quick web search this LC_RPATH issue appears to be an issue since macOS Sonoma (macOS 14).

I'm not sure how the ObjectBox Go library works, but as a workaround have you tried to put the ObjectBox library into the execution directory (or where the ObjectBox Go library expects it)?

@kwadkore
Copy link
Author

Where exactly does the library expect it? I followed the setup instructions, which should presumably put things in the expected locations.

I ran the install.sh script in the directory of the project I intended to use Objectbox with and ran into this issue, so then I followed the instructions to try the provided Objectbox test code and ran into the same issue.

@greenrobot-team
Copy link
Member

It should work if the library is in the same folder as the executable. You can manually download it using the

bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-c/main/download.sh)

command (do not install it system-wide when asked).

This is just a potential workaround, we need to look at and fix this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants