OK ok ok, I did what na...@manicmind.earth said:

wise@dug:/home/wise$ export 
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/wise/root/lib" 
wise@dug:/home/wise$ 
racket                                                        
Welcome to Racket v7.9 [cs].
> (require taglib)
> 


SUCCESS :)

(I think something in the lib-search-dirs stuff isn't doing what it's 
supposed to, maybe if I get motivated i'll investigate more.)

Thanks again! 


On Friday, May 7, 2021 at 11:03:15 AM UTC-4 krs...@gmail.com wrote:

> Thanks for your help all!
> I think you didn't see my last 2 replies.
>
> I compiled taglib locally and set the library include path as seen in the 
> racket REPL output.
> I shouldn't need to do the symlink because my version is now the exact 
> same file name as the REPL says cant be found.
> (I it anyway, and it says same error file doesnt exist)
>
> Also I ran:
> (get-lib-search-dirs)
> '(#<path:/home/wise/.local/share/racket/7.9/lib>
>   #<path:/usr/local/lib/racket>
>   #<path:/home/wise/root/lib>)  <-- LOOK AT THE DIR
>
> The actaul file name that it says it cannot find is in that directory.
> wise@dug:/home/wise$ ls -1 /home/wise/root/lib/                       <-- 
> THIS IS IN MY "lib-search-dirs" 
>                                                                               
>          
>
> libtag.a
> libtag.so.1
> libtag.so.1.18.0
> libtag_c.a
> libtag_c.so.0   <-- THIS IS THE FILE IT SAYS CANNOT BE FOUND
> libtag_c.so.0.0.0
> pkgconfig
>
>
> > (require taglib)
> ; ffi-lib: could not load foreign library
> ;   path: libtag_c.so.0   <-- SAYS IT CANNOT FIND THIS FILE
>
> ;   system error: File not found
>
>
>
> On Friday, May 7, 2021 at 10:29:21 AM UTC-4 rmculp...@gmail.com wrote:
>
>> It looks like there are two issues. One is the shared library's 
>> directory, but the other is that the Racket library is looking for 
>> "libtag_c.so.0", and you have "libtag_c.so.3.0". That is, it's looking for 
>> a version suffix of "0", not "3.0" (see 
>> https://github.com/takikawa/taglib-racket/blob/master/taglib/taglib.rkt#L83
>> ).
>>
>> One fix would be to change the Racket code to try "3.0" also. Maybe 
>> conditioned on the OS, since on Ubuntu I also get the library with suffix 
>> "0".
>>
>> An alternative would be to copy or link /usr/local/lib/libtag_c.so.3.0 to 
>> Racket's lib directory with the file name the Racket code is trying to load:
>>
>>   ln -s /usr/local/lib/libtag_c.so.3.0 
>> ~/.local/share/racket/7.9/lib/libtag_c.so.0
>>
>> Note: that assumes that the library versions are actually compatible; 
>> otherwise, the Racket code is likely to misbehave, even if it loads the 
>> library. Loading the shared library might still fail if the shared library 
>> itself has dependencies that are not in the default OS search path. (In 
>> that case, Nate's point about LD_LIBRARY_PATH might help.)
>>
>> Ryan
>>
>>
>> On Fri, May 7, 2021 at 3:12 PM krs...@gmail.com <krs...@gmail.com> wrote:
>>
>>> I know it sees my custom dir, I ran this in racket:
>>> > (require setup/dirs)
>>> > (get-lib-search-dirs)
>>> '(#<path:/home/wise/.local/share/racket/7.9/lib>
>>>   #<path:/usr/local/lib/racket>
>>>   #<path:/home/wise/root/lib>)
>>>
>>>
>>> On Friday, May 7, 2021 at 8:08:26 AM UTC-4 krs...@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...@googlegroups.com.
>>>
>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/racket-users/59a44f94-5931-46cd-ba3b-039c02a47076n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/racket-users/59a44f94-5931-46cd-ba3b-039c02a47076n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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/b972ce07-719a-4891-ad42-e8a0b6170ffbn%40googlegroups.com.

Reply via email to