Skip to content

Install "mod_spatialite.dylib" fails #2371

Closed

Description

@ludwa6

Details for the issue

What did you do?

Following instructions in this tutorial, i tried to install the extension "mod_spatialite.dylib" for Mac 64 that is distributed via this Github repo in my DB Browser for SQLite (versions down below).
Went Preferences -> Extensions, clicked the "Add extension" button, navigated to the mod_spatialite.dylib file just downloaded to my desktop, and clicked "Save" button.

What did you expect to see?

Expected to get some message confirming that the extension was installed successfulky.

What did you see instead?

Dialog popped up w/ following message in red:

Error loading extension:
dlopen(/Users/walterludwick/Desktop/mod_spatialite.dylib.dyylib, 10): image
not found

NB: seems strange: that redundant .dylib extension is not in the path/file i selected... But so it was parsed by the machine.

Also: I ran the SQL script "SELECT spatialite_version();", thinking maybe spatialite was already installed, but no... DB4S returned the message:

Execution finished with errors.
Result: no such function: spatialite_version
At line 1:
SELECT spatialite_version();

Useful extra information

MacBook Pro running HighSierra (10.13.6)
DB4S Version 3.12.0, Built for x86_64-little_endian-lp64, running on x86_64
Qt Version 5.12.8, SQLCipher Version 4.4.0 community (based on SQLite 3.31.0)

Activity

  1. chrisjlocke commented on Aug 14, 2020

    @chrisjlocke
    Member

    Did you type the error or copy it?
    Its reporting 'mod_spatialite.dylib.dyylib' - there is a typo there... dylib, not dyylib.
    Now, it might be a typo in DB4S. You've specified 'mod_spatialite.dylib' and its trying to append '.dyylib' on the end. Eurk.
    As a demo, rename the file to 'mod_spatialite.dyylib' and see if that works...
    (I can't test this, as I've got Windows, and that uses a completely different set of files...)

  2. MKleusberg commented on Aug 14, 2020

    @MKleusberg
    Member

    That extra '.dylib' is added by SQLite whenever loading the original file fails. So no need to worry about that. See https://sqlite.org/c3ref/load_extension.html:

    If the file cannot be loaded directly, attempts are made to load with various operating-system specific extensions added. So for example, if "samplelib" cannot be loaded, then names like "samplelib.so" or "samplelib.dylib" or "samplelib.dll" might be tried also.

    So the question that remains is why the original file couldn't be loaded. I assume you already checked if the path and the permissions are correct?

  3. ludwa6 commented on Aug 14, 2020

    @ludwa6
    Author

    Did you type the error or copy it?
    Its reporting 'mod_spatialite.dylib.dyylib' - there is a typo there... dylib, not dyylib.
    Now, it might be a typo in DB4S. You've specified 'mod_spatialite.dylib' and its trying to append '.dyylib' on the end. Eurk.
    As a demo, rename the file to 'mod_spatialite.dyylib' and see if that works...
    (I can't test this, as I've got Windows, and that uses a completely different set of files...)

    Good eye, Chris... But i just ran the process again, and the error msg (which i can't copy/paste for some reason) is like the above, only w/o the yy typo :-)

  4. ludwa6 commented on Aug 14, 2020

    @ludwa6
    Author

    So the question that remains is why the original file couldn't be loaded. I assume you already checked if the path and the permissions are correct?

    The path is correct (it was auto-entered by drilldown to the file on my desktop), and as to permissions... It's on my own machine, i'm the admin, and it never challenged me for a password, so... I don't really see how this could be an issue.

  5. chrisjlocke commented on Aug 14, 2020

    @chrisjlocke
    Member

    So to confirm, its trying to find 'mod_spatialite.dylib.dylib' ?
    Does it work if you go to the 'Tools' menu, then select 'Open Extension' ?

  6. ludwa6 commented on Aug 14, 2020

    @ludwa6
    Author
  7. mgrojo commented on Aug 14, 2020

    @mgrojo
    Member
  8. justinclift commented on Aug 15, 2020

    @justinclift
    Member

    As a diagnostic step, starting DB4S from the command line could be useful here.

    With that (on macOS and *nix systems), it'll print out more informative ~diagnostic messages as it encounters weirdness. In theory (!) it may also show why it's unhappy with the original mod_spatialite.dylib file, and then tries to find the mod_spatialite.dylib.dylib one.

  9. ludwa6 commented on Aug 15, 2020

    @ludwa6
    Author

    OK, thanks guys for the diagnostic tips. So to TEST, i opened a console window, launched DB4S from terminal, went into the app and tried again to install the extension. RESULT = same error message. REPORT: Went back to console -because none of this stuff is meaningful to me at all- i just copied the whole screed from first mention of DB4S to last (49 mentions in all).... And here is that full screed (nearly 2k lines; sorry, but i can't tell what's relevant from what's not) copied below:

    https://pastebin.com/6KVdJW8N

  10. mgrojo commented on Aug 15, 2020

    @mgrojo
    Member
  11. justinclift commented on Aug 15, 2020

    @justinclift
    Member

    @ludwa6 I just chucked that paste into a quoted section, as it makes things a bit easier to look through. Hope that's ok. 😄

  12. justinclift commented on Aug 15, 2020

    @justinclift
    Member

    Hmmm, that paste seems to be output from the system console, rather than the terminal window you launched DB4S from?

    Instead of that, is there anything displayed in the terminal window? That'll probably be where diagnostic stuff from DB4S will be shown. 😄

  13. ludwa6 commented on Aug 15, 2020

    @ludwa6
    Author

    is there anything displayed in the terminal window? That'll probably be where diagnostic stuff from DB4S will be shown.

    No... Terminal just launches the app; there is no feedback on this operation but either a new command line prompt (means the operation was successful) or else an error message.

    Is there someplace else i can look for DB4S-specific logfiles? What is this "Log dock window" that @mgrojo mentioned earlier in this thread? Only log feature i see in DB4S is the SQL Log, but that only gives feedback on SQL commands i run in the app.

  14. chrisjlocke commented on Aug 15, 2020

    @chrisjlocke
    Member

    What is this "Log dock window" ... Only log feature i see in DB4S is the SQL Log

    The one and the same .... This is purely the SQL statements run and any SQL errors...

  15. justinclift commented on Aug 15, 2020

    @justinclift
    Member

    No... Terminal just launches the app; there is no feedback on this operation but either a new command line prompt (means the operation was successful) or else an error message.

    That sounded weird to me, so I just tried the same thing on our macOS build server. Yeah, you're right. No output on the terminal line, though I didn't try loading any .dylib files. 😦

    @zhm @bmcbride Any ideas on how to figure out what's going wrong with this?

  16. mgrojo commented on Aug 15, 2020

    @mgrojo
    Member
  17. justinclift commented on Aug 15, 2020

    @justinclift
    Member

    @chrisjlocke Errr... Aren't pastebin things cleared out after some time?

  18. chrisjlocke commented on Aug 15, 2020

    @chrisjlocke
    Member

    Not when the expiration is set to 'When Trump does something nice'. 😉

    image

  19. ludwa6 commented on Aug 16, 2020

    @ludwa6
    Author

    SOLVED: because i could think of nothing else, i downloaded another copy of the extension from same source, rebooted the app and loaded the extension successfully.

    Sorry guys, for taxing your brains with what was in fact a problem on my end; i should have thought to try this before, but since the file my DB4S instance was choking on appeared intact (same size, icon, etc. as the functional one i've just downloaded), i never suspected this as a problem. Lesson learned, the hard way!

  20. chrisjlocke commented on Aug 16, 2020

    @chrisjlocke
    Member

    Thanks for taking the time letting us know how you solved it - something else to try if it happens to someone else.
    Glad you got it working in the end! 😄

  21. ludwa6 commented on Aug 16, 2020

    @ludwa6
    Author

    Thank YOU, @chrisjlocke & company -gotta say, you guys are amazingly responsive to user issues (one more reason to love DB4S :-)

  22. chrisjlocke commented on Aug 16, 2020

    @chrisjlocke
    Member

    No problem. Don't forget you owe us USD 67 for each download, USD 85 for each support ticket and an hourly charge of USD 32 for me to mow my lawn. Or something.

    Only joking! 😄

  23. ludwa6 commented on Aug 17, 2020

    @ludwa6
    Author

    No problem. Don't forget you owe us USD 67 for each download, USD 85 for each support ticket and an hourly charge of USD 32 for me to mow my lawn. Or something.

    Heh... "Or something," it will have to be. Best i can offer you today, @chrisjlocke , is a little song of hope ... But soon enough (like: soon as US election season is over) i should be able to pay your quoted USD fees with a few euro-centimes, i'll wager! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions