dedbox / racket-zmq

Comprehensive Racket FFI bindings for ZeroMQ
Mozilla Public License 2.0
3 stars 0 forks source link

For default-lib-dir, pre-install expects a list of "path" objects #1

Open pcoutin opened 9 years ago

pcoutin commented 9 years ago

I got the following message while trying to raco install:

raco setup: pre-installing: <pkgs>/racket-zmq
path-list-string->path-list: contract violation
  expected: (listof path?)
  given: '(".")
  context...:
   path-list-string->path-list
   /usr/share/racket/racket/pkgs/make/setup-extension.rkt:101:0: 

It'd make more sense for it to be in "/usr/lib64" for me (since I'm on Slackware 64)

For whatever reason, "." (corresponding to the default-lib-dir on the pre-install function) was making it break somehow, in code that only runs when the PLT_EXTENSION_LIB_PATHS variable is defined.

Oh. So (path?) only returns true for something like (path? (string->path "/")), not (path? "/") in Racket 6.2. Wha.

I just set it to (string->path "/usr/lib64"), it could be set to (string->path ".").

pcoutin commented 9 years ago

I still had this error

raco setup:   extension-installer: can't find needed include files and/or library; try setting the environment variable PLT_EXTENSION_LIB_PATHS
raco setup: error: during making for <pkgs>/racket-zmq
raco setup:   racket-zmq/unsafe/define.rkt:7:9: cannot open module file
raco setup:     module path: zmq/ext
raco setup:     path: /home/bloodbird/proj/racket-zmq/ext.rkt
raco setup:     system error: No such file or directory; errno=2
raco setup:     compiling: <pkgs>/racket-zmq/unsafe/define.rkt

even after settting PLT_EXTENSION_LIB_PATHS and LD_LIBRARY_PATH to /usr/lib64 The only thing that worked so far was cp /usr/lib64/libzmq.so.1.1 /usr/lib/libzmq.so more messages of it 'working'

make: making /home/bloodbird/proj/racket-zmq/compiled/native/x86_64-linux/3m/ext.c because /home/bloodbird/proj/racket-zmq/compiled/native/x86_64-linux/3m/ext.c does not exist
xform-cpp: (/usr/bin/gcc -E -DMZ_PRECISE_GC -I/usr/include -I/home/bloodbird/proj/racket-zmq/ -I/home/bloodbird/Downloads/racket-6.2.1/include -I/home/bloodbird/Downloads/racket-6.2.1/include -DMZ_XFORM -DMZ_PRECISE_GC -DGC_STACK_CALLEE_RESTORE ext.c)
make: making compiled/native/x86_64-linux/3m/ext_ss.o because compiled/native/x86_64-linux/3m/ext_ss.o does not exist
compile-extension: (/usr/bin/gcc -c -O2 -fPIC -DMZ_PRECISE_GC -I/usr/include -I/home/bloodbird/Downloads/racket-6.2.1/include /home/bloodbird/proj/racket-zmq/compiled/native/x86_64-linux/3m/ext.c -o compiled/native/x86_64-linux/3m/ext_ss.o)
make: making compiled/native/x86_64-linux/3m/ext_ss.so because compiled/native/x86_64-linux/3m/ext_ss.so does not exist
link-extension: (/usr/bin/gcc -fPIC -shared -L/usr/lib compiled/native/x86_64-linux/3m/ext_ss.o -lzmq /home/bloodbird/Downloads/racket-6.2.1/lib/mzdyn3m.o -o compiled/native/x86_64-linux/3m/ext_ss.so)
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgcc_s.so when searching for -lgcc_s
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgcc_s.so when searching for -lgcc_s
make: made /home/bloodbird/proj/racket-zmq/compiled/native/x86_64-linux/3m/ext.c
make: made compiled/native/x86_64-linux/3m/ext_ss.o
make: made compiled/native/x86_64-linux/3m/ext_ss.so
$ ldd racket-zmq/compiled/native/x86_64-linux/3m/ext_ss.so         
        linux-vdso.so.1 (0x00007fffd1918000)
        libzmq.so.1 => /usr/lib64/libzmq.so.1 (0x00007feb35fcc000)
        libc.so.6 => /lib64/libc.so.6 (0x00007feb35bdb000)
        /lib64/ld-linux-x86-64.so.2 (0x00007feb36403000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007feb359d7000)
        librt.so.1 => /lib64/librt.so.1 (0x00007feb357cf000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007feb355b2000)
        libstdc++.so.6 => /usr/lib64/../lib64/libstdc++.so.6 (0x00007feb352af000)
        libm.so.6 => /lib64/libm.so.6 (0x00007feb34fad000)
        libgcc_s.so.1 => /usr/lib64/../lib64/libgcc_s.so.1 (0x00007feb34d97000)

The compiled extension finds libzmq on /usr/lib64, that's good

dedbox commented 9 years ago

So default-lib-dir is a path-string?, which means the string->path conversion should be automatic. Sounds like a bug in the make/setup-extension module.

Did you try changing "." to "/usr/lib64" directly?

pcoutin commented 8 years ago

Yeah Tried both racket 6.2 and 6.2.1 Maybe PLT_EXTENSION_LIB_PATHS should've started with ":"? (like the instructions say for PLTCOLLECTS) I just moved libzmq.so to /usr/lib, compiled and removed it, it's fine now... ...