Also, i think in the past there were security limits in Mac OS X that prevented 
adjusting the dynamic library load path. I think maybe that's why i didn’t use 
them but things seem to be working through the env vars without any user 
changes to the default system security settings on my system, which is Big Sur 
11.3.1.

Nate

> On May 7, 2021, at 8:53 AM, Nathaniel W Griswold <nate@manicmind.earth> wrote:
> 
> Folks,
> 
> One other thing you can do that might work here is to set an environment 
> variable for yourself. I don’t remember the exact details of how libraries 
> are looked up but on my system (mac os) i can do something like:
> 
> 
> % ls /opt/local/lib/libtag_c.*
> /opt/local/lib/libtag_c.0.0.0.dylib   /opt/local/lib/libtag_c.0.dylib         
> /opt/local/lib/libtag_c.dylib
> 
> % export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib
> % racket
> Welcome to Racket v7.9 [cs].
>> (require taglib)
> 
> (success)
> 
> On BSD or linux i guess you can check `man ldconfig` and set something like 
> LD_LIBRARY_PATH, or maybe there’s something a little closer to mac os x’s 
> DYLD_FALLBACK_LIBRARY_PATH which i think works a little better (see 
> https://stackoverflow.com/questions/3146274/is-it-ok-to-use-dyld-library-path-on-mac-os-x-and-whats-the-dynamic-library-s/3172515#3172515
>  )
> 
> Did you already try `export 
> LD_LIBRARY_PATH=“$LD_LIBRARY_PATH:/usr/local/lib/"` ?
> 
> As for what John Clements said, I think in the past i have also set up the 
> config.rktd in the exact same way, but i do not remember the details of the 
> difference between the two methods. It seems to me that the environment 
> variable method might be a little more flexible for chained loads, as it 
> seems that if a c program were to load a dynamic library programmatically it 
> simply would not know what your racket settings were. I guess another benefit 
> is you don’t have to edit the system config.rktd, which doesn’t really seem 
> like it’s meant to be changed unless you are specifying an entirely new 
> PLTCONFIGDIR (or —config, or -G).
> 
> Maybe others can better elucidate pros/cons of 
> 
>> On May 7, 2021, at 7:08 AM, krs...@gmail.com <krsa...@gmail.com> wrote:
>> 
>> I'm so close :)
>> 
>> I installed taglib locally to /home/wise/root/lib, so I *have* the file 
>> exactly as racket is complaining about:
>> /home/wise/root/lib/libtag_c.so.0
>> 
>> I used your config example to edit (as root) /etc/racket/config.rktd
>> I added the "lib-search-dirs" line, so it looks like:
>> ;; generated by unixstyle-install
>> #hash(
>>      (doc-dir . "/usr/local/share/doc/racket")
>>      (lib-dir . "/usr/local/lib/racket")
>>      (share-dir . "/usr/local/share/racket")
>>      (include-dir . "/usr/local/include/racket")
>>      (bin-dir . "/usr/local/bin")
>>      (apps-dir . "/usr/local/share/applications")
>>      (man-dir . "/usr/local/man")
>>      (absolute-installation? . #t)
>>      (build-stamp . "")
>>      (doc-search-url . 
>> "https://download.racket-lang.org/releases/7.9/doc/local-redirect/index.html";)
>>      (catalogs . ("https://download.racket-lang.org/releases/7.9/catalog/";))
>>      (lib-search-dirs . (#f "/home/wise/root/lib"))
>> )
>> 
>> I still get the error:
>> Welcome to Racket v7.9 [cs].
>>> (require taglib)
>> ; ffi-lib: could not load foreign library
>> ;   path: libtag_c.so.0
>> ;   system error: File not found
>> ; [,bt for context]
>> 
>> I'm still poking at it, thanks again for the help.
>> 
>> On Thursday, May 6, 2021 at 11:41:03 PM UTC-4 krs...@gmail.com wrote:
>> Thanks for the help!
>> I was sure that was going to be it but it's not :(
>> 
>> This is what is on my system:
>> /usr/local/lib/libtag_c.so.3.0
>> 
>> racket is looking for libtag_c.so.0
>> 
>> So i'm not sure what to do next.
>> 
>> On Thursday, May 6, 2021 at 7:21:10 PM UTC-4 johnbclements wrote:
>> It looks to me like you probably need to edit your “config.rktd” file: 
>> 
>> https://docs.racket-lang.org/raco/config-file.html?q=config.rktd#%28idx._%28gentag._67._%28lib._scribblings%2Fraco%2Fraco..scrbl%29%29%29
>>  
>> 
>> On my machine (macOS using macports), for instance I have do do this for 
>> every new installation of drracket: 
>> 
>> - edit <config-dir>/config.rktd to contain 
>> (lib-search-dirs . (#f "/opt/local/lib”)) 
>> 
>> Let me know if I misunderstood your situation! 
>> 
>> John Clements 
>> 
>> 
>>> On May 6, 2021, at 3:54 AM, krs...@gmail.com <krs...@gmail.com> wrote: 
>>> 
>>> 
>>> Hi!, 
>>> 
>>> I am doing: (require taglib) and I get: 
>>>> (require taglib) 
>>> ; ffi-lib: could not load foreign library 
>>> ; path: libtag_c.so.0 
>>> ; system error: File not found 
>>> ; [,bt for context] 
>>> 
>>> I am on OpenBSD and that file is at: 
>>> /usr/local/lib/libtag_c.so.3.0 
>>> 
>>> How can I change my search path for C libs to be /usr/local ? 
>>> 
>>> -- 
>>> 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/b8425f0a-6d45-4954-9e32-df51aa5151cbn%40googlegroups.com.
>>>  
>> 
>> 
>> -- 
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/713e783e-db5f-4a19-8e4c-d33a6c842b57n%40googlegroups.com.
> 
> -- 
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/79FA464A-DF94-412B-A11B-2FF70CC150DA%40manicmind.earth.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/BE518EF0-BEDF-414E-B02C-B4F2FA8D3868%40manicmind.earth.

Reply via email to