<kori>what am I supposed to do when dynamic-link returns file not found? <kori>even though the library is in /usr/lib and guile can see the other libraries? <daviid>kori: run your script under strace, it could be because of another lib not being installed <kori>anything I should be looking for? <kori>and I doubt its that. ldd shows the libs are linked correctly <daviid>kori: yes, it will list the exact missing file name <daviid>kori: this is a very welknow and very common problem <daviid>strace -o strace.out guile -s <yourscript> <kori>found some stuffs, thanks daviid <kori>the file seems to be read correctly <daviid>kori: don't know. I would try to strace just that call <kori>ah this is out of my area of knowledge right now <kori>I'll try ffi stuff later I guess <daviid>kori: like this: strace -o strace.out guile -c "(use-modules (system foreign)) (dynamic-link \\"libglib-2.0\\")" <daviid>kori: I used libglib-2.0 as an example which works for me here, replace with libvm <daviid>kori: yes, this proves that it can not find libwm <kori>when it should, since it is there <kori>; ls -l /usr/lib/libwm.so <kori>-rwxr-xr-x 1 root root 18688 Oct 1 19:34 /usr/lib/libwm.so* <daviid>or oe of its dependencies, you have to look carefully the strace, I don't have that much time ... <daviid>kori: what does 'ldd /usr/lib/libwm.so' returns <kori>everything seems to be in order <daviid>kori: this is not my specialty, I hope some else cn jump in. but you have the proof in front of your yeys that it loads libglib for you too, so there is a problem with libwm or a deps on your machine... I would try to compare what packages are installed for libglib and libwm maybe? <kori>daviid: well, I have other programs that depend on libwm to compile, and I just used them about 300 times in the last 5 minutes <kori>however. this is an important note: libwm is usually compiled as an .a file <kori>gcc -lxcb -std=c99 -pedantic -Wall -fPIC -Os -shared libwm.c -o libwm.so <kori>that's what I used to generate libwm.so <kori>thanks for the help once again <daviid>oh, you manually compile install this? maybe you need a C option to generate symbol table or something ... don't know <daviid>I would try to install the distro libwm and libwm-dev, even to drop them later, but to check ... you see, they did the right thing for libglib ... <kori>this isnt even in the repos, just the AUR <daviid>kori: ok, then install that and try again <kori>daviid: I did, but I'll try again with strace I guess <daviid>kori: try to compare what is/are the diff for libglib-2.0 and libwm, original packages from arch then, something is missing for libwm on your box, or in the LD_LIBRARY_PATH ... and prob it is reported in the strace you pasted, with patience ... ***random-nickname is now known as random-nick
<amz3`>kori: did you try to provide the full path to the so file? <amz3`>kori: did you run `ldconfig' to update the cache <jmd>I'm trying to create a module an export a procedure from it. I have put (define-modules (gxi) #:export (proc)) in file A - and in file B I have got (use-module (gxi)) <jmd>But I always get the error "no code for module" (gxi)) <jmd>And yes, I have read the f*888ng manual. <jmd>I thought modules meant that was automatically taken care of. <jmd>I have set GUILE_LOAD_PATH <jmd>random-nick: I fixed it. Tnx <kori>amz3`: 1. didnt, 2. I did <kori>amz3`: does dynamic-link accept a full path? <kori>ERROR: In procedure dynamic-link: file: "/usr/lib/libwm.so", message: "file not <kori>amz3`: I assume I should call it as (dynamic-link "/usr/lib/libwm.so") <amz3`>kori: try this in a terminal 'ldd /usr/lib/libwm.so' and paste the output <kori>same as yesterday, everything is in order. <kori>ldd on each of those libs is also successful <amz3`>kori: did you try with `LD_PRELOAD=/usr/lib/libwm.so guile libwm.scm' <amz3`>kori: look the strace output says: open("/usr/local/lib/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) <kori>; LD_PRELOAD=/usr/lib/libwm.so guile libwm.scm <kori>rlwrap: symbol lookup error: /usr/lib/libwm.so: undefined symbol: conn <kori>amz3`: if you look at the next line <kori>open("/usr/lib/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 5 <kori>the undefined symbol thing might be my best bet <amz3`>where do you see that undefined symbol? <kori>; LD_PRELOAD=/usr/lib/libwm.so /bin/guile libwm.scm <kori>/bin/guile: symbol lookup error: /usr/lib/libwm.so: undefined symbol: conn <amz3`>prolly objdump is the tool to use now, but now sure which option to use <kori>that LD_PRELOAD suggestion was good. its possible that the bug happened when generating libwm.so <kori>I guess I should link the master repo <amz3`>I am not a C expert, but conn is declared as extern in the header <kori>something is not right, though <kori>I tried to compile without -shared <kori>and got "undefined reference to conn, scrn" everywhere <kori>no, I've in fact given up <kori>thanks for the help though <daviid>kori: this has nothing to do with guile, you could email the author of this lib with these bugs you mentioned earlier... <daviid>kori: or fix these conn, scr undefined symbols yourself ... <MoronicAcid>Hi. Does anyone know how to forward guile error messages to a specific port from a C program? <MoronicAcid>Hopefully, this isn't a development IRC. Sorry if these kind of questions don't belong here. <MoronicAcid>P.S. I am not allowed to use standard I/O, if that helps any.