running the wrong sqlite3

39 views
Skip to first unread message

James Platt

unread,
Aug 19, 2019, 3:43:46 PM8/19/19
to Racket Users
I'm having an issue where I can't seem to get Racket to run the right version of sqlite3. At least, I'm assuming that's the problem because the syntax error below occurs in an older version but not the current version of sqlite3. My Terminal command path has the correct version. What can I do to make sure Racket is using the right version?


Here's the full error message.

RUNNING reset_dbs.rkt
rows are: '(#hash((data . #hasheq((base_dir . "/tmp/biomantica"))) (name . "filesystem")))
SQL:
INSERT INTO config ( name, data ) VALUES ($1,$2) ON CONFLICT DO NOTHING
vals:
'("filesystem" "{\"base_dir\":\"/tmp/biomantica\"}")
query-exec: near "ON": syntax error
error code: 1
context...:
/Applications/Racket/collects/db/private/sqlite3/connection.rkt:457:0: handle-status*
/Applications/Racket/collects/db/private/sqlite3/connection.rkt:413:8
/Applications/Racket/collects/db/private/sqlite3/connection.rkt:216:4: prepare1* method in connection%
/Applications/Racket/collects/db/private/generic/../../../racket/private/more-scheme.rkt:261:28
[repeats 1 more time]
/Applications/Racket/collects/db/private/generic/functions.rkt:90:0: compose-statement
/Applications/Racket/collects/db/private/generic/functions.rkt:148:0: query-exec
/Users/fingal/code/bmtc_dev/app/db/tests/db_test_utils.rkt:103:8: for-loop
"/Users/fingal/code/bmtc_dev/app/network/reset_dbs.rkt": [running body]
temp37_0
for-loop
run-module-instance!125
perform-require!78

John Clements

unread,
Aug 19, 2019, 9:24:29 PM8/19/19
to James Platt, Racket Users
Perhaps you need to configure your lib-search-dir setting?

https://docs.racket-lang.org/raco/config-file.html?q=lib-search-dir#%28idx._%28gentag._65._%28lib._scribblings%2Fraco%2Fraco..scrbl%29%29%29

John
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/C399A6BF-6FDE-49AD-9053-08F0F3FBD49A%40biomantica.com.



James Platt

unread,
Aug 20, 2019, 11:30:52 AM8/20/19
to Racket Users, John Clements

On Aug 19, 2019, at 9:24 PM, John Clements wrote:

> Perhaps you need to configure your lib-search-dir setting?
>
> https://docs.racket-lang.org/raco/config-file.html?q=lib-search-dir#%28idx._%28gentag._65._%28lib._scribblings%2Fraco%2Fraco..scrbl%29%29%29

Thanks for the help but I think that's not the issue because (get-lib-search-dirs) returns exactly the same thing on a machine where this is working perfectly as on the machine where it isn't. The machine where it is not working is a virtual machine with a stock install of macOS High Sierra and a relatively fresh install of Racket. This VM is meant for development and testing. This particular clone of the reference VM has been used for a little while but it should still be close to the reference. So, on the one hand, it's surprising that this is happening here, with something so close to stock configuration. On the other hand, the machine where it is working has been beaten into submission to run all kinds of development tools over a period of years.

John Clements

unread,
Aug 20, 2019, 12:49:32 PM8/20/19
to James Platt, Racket Users
In that case, perhaps you can watch the calls to dlopen with strace? See

https://stackoverflow.com/questions/5103443/how-to-check-what-shared-libraries-are-loaded-at-run-time-for-a-given-process

for something that might be helpful.

John
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/91E6919B-7066-4550-B394-0FA66886A6B0%40biomantica.com.



Jens Axel Søgaard

unread,
Aug 20, 2019, 2:59:32 PM8/20/19
to John Clements, James Platt, Racket Users
And if you are on macOS:

mbp:metapict soegaard$ export DYLD_PRINT_LIBRARIES=1
mbp:metapict soegaard$ export DYLD_PRINT_LIBRARIES_POST_LAUNCH=1
mbp:metapict soegaard$ export DYLD_PRINT_RPATHS=1

/Jens Axel




--
--
Jens Axel Søgaard

Reply all
Reply to author
Forward
0 new messages