fulldecent / corelocationcli

Command line program to print location information from CoreLocation
MIT License
217 stars 29 forks source link

library no loaded libswiftconcats.dylib #28

Closed juancampuzano closed 2 years ago

juancampuzano commented 4 years ago

I am having a problem running the executable and it is as follows:

library no loaded libswiftconcats.dylib

According to the following link, the problem is due to the fact that the library is not included. In such a way according to the following link I propose to place it in the project to package the library in the project.

fulldecent commented 4 years ago

Thank for looking into this. How have you installed the app? And have you tried the Brew approach?

juancampuzano commented 4 years ago

I used this link on the releases section. But also, I built the project using Xcode but the same result happen.

Error information: username-imac:Downloads username$ ./CoreLocationCLI dyld: Library not loaded: @rpath/libswiftContacts.dylib Referenced from: /Users/username/Downloads/./CoreLocationCLI Reason: image not found Abort trap: 6

rr0ss0rr commented 4 years ago

FYI, I have mine installed via brew and not having any issues

juancampuzano commented 4 years ago

Screen Shot 2020-04-13 at 5 06 44 PM I tried brew install with the same result.

rr0ss0rr commented 4 years ago

I just did a reinstall and it does work. You shouldn't have to do the chmod and are you in the /usr/local/bin directory when you ran ./CorelocationCLI ?

brew cask reinstall CoreLocationCLI

==> Downloading https://github.com/fulldecent/corelocationcli/releases/download/3.1.0/CoreLocationCLI.zip
Already downloaded: /Users/richard/Library/Caches/Homebrew/downloads/cd6f74d1a860b14cdaee91e6b3033a99f293a45de4dbffc86a2813276698670b--CoreLocationCLI.zip
==> Verifying SHA-256 checksum for Cask 'corelocationcli'.
==> Uninstalling Cask corelocationcli
==> Unlinking Binary '/usr/local/bin/CoreLocationCLI'.
==> Purging files for version 3.1.0 of Cask corelocationcli
==> Installing Cask corelocationcli
==> Linking Binary 'CoreLocationCLI' to '/usr/local/bin/CoreLocationCLI'.
🍺  corelocationcli was successfully installed!

------------------------------------------------------------------------------------------------------------------------- 2020-04-13 18:29:05
richard@MacBook-Richard:~/bin$ /usr/local/bin/CoreLocationCLI
12.123456 -34.123456
juancampuzano commented 4 years ago

Yes, I was in /usr/local/bindirectory when I ran the ./CorelocationCLI. I have two computers, in my mackbook it works fine but in my iMac it did not work... I will reinstall and run again and let you know the results.

juancampuzano commented 4 years ago

Screen Shot 2020-04-14 at 10 37 31 AM Screen Shot 2020-04-14 at 10 37 46 AM

I did the same procedure that you said without chmod command and the same error also appears. This is another computer with the same operating system.

rr0ss0rr commented 4 years ago

try: brew update brew upgrade

other than that, I'm at a loss

juancampuzano commented 4 years ago

It did not work!

rr0ss0rr commented 4 years ago

Do you have xcode installed?

juancampuzano commented 4 years ago

Yes, I have XCode installed. I think the solution must be embedded in all necessary dependencies in the project. I'm trying to do it but I'm having a hard time.

rr0ss0rr commented 4 years ago

can you remove the link to xcode from $PATH and see if that works? or create a new user and see if it works there?

fulldecent commented 4 years ago

Good point. Here is a version that simplifies the dependencies. https://github.com/fulldecent/corelocationcli/pull/29 I'm not sure why we required SPM before, but I am build that branch a lot simpler.

juancampuzano commented 4 years ago

can you remove the link to xcode from $PATH and see if that works? or create a new user and see if it works there?

I don't think this is the problem, I was checking with otool and I see that LC_RPATH is referencing a folder that doesn't exist on that machine.

The lib /usr/lib/swift is not present on either of my two machine with the High Sierra operating system.

Load command 21 cmd LC_RPATH cmdsize 32 path /usr/lib/swift (offset 12)

JayBrown commented 4 years ago

Yeah, I bundled the latest CoreLocationCLI with another program, and I got feedback from a user with the same problem:

dyld: Library not loaded: @rpath/libswiftContacts.dylib
Referenced from: /Users/USER/Library/Application Support/local.lcars.cck/bin/CoreLocationCLI
Reason: image not found
Abort trap: 6

High Sierra.

fulldecent commented 2 years ago

Released new major version today. Please open new issue if still broken as this is a way newer version of macOS and may be a different underlying thing