plragde
2020-5-2 14:46:18

I installed the ansi package, but when I require it, I get the following error message at the bottom of the DrRacket window:


plragde
2020-5-2 14:46:26

default-load-extension-handler: forbidden (execute) access to /Users/plragde/Library/Racket/7.6/pkgs/ansi/ansi/private/compiled/native/x86_64-macosx/3m/tty-raw-extension_ss.dylib


plragde
2020-5-2 14:47:08

It doesn’t seem to affect my using the package so far, but it worries me. The file in question has execute access. I’m on OS X Catalina, Racket 7.6.


mflatt
2020-5-2 15:02:50

Does otool -L racket/lib/Racket.framework/Racket show /usr/lib/libiconv.2.dylib? If not, that’s on the way to an explanation, but what did configure report about iconv? (The configure report is probably in config.log in racket/src/build.)


mflatt
2020-5-2 15:10:36

That error is from DrRacket disallowing a “.dylib” in background-expansion mode, so it affects things like DrRackets’ binding arrows. You might blame “ansi” here for being old-fashioned: it uses the old way of loading foreign code that hooks into the module loader, instead of using ffi/unsafe, so DrRacket doesn’t benefit from a compile-time versus run-time distinction (i.e., the unsafe code is needed only at run time, typically). Or you might blame DrRacket from being too untrusting of extensions. I’ll note that the old-fashioned module-loader hook is not available at all in Racket CS, so that could be an issue for using “ansi” in the long run.


plragde
2020-5-2 15:19:36

Thanks! The package doesn’t quite do what I want, so I’ll just be studying the source code, probably.


alexknauth
2020-5-2 16:17:34

Running the otool command above does not show anything with libiconv. Searching for iconv in the racket/src/build/config.log file shows these error messages, it seems to be missing iconv.h. cfg-racket:5686: checking iconv.h usability conftest.c:57:10: fatal error: iconv.h: No such file or directory 57 \| #include <iconv.h> \| #include <iconv.h> cfg-racket:5686: checking iconv.h presence conftest.c:24:10: fatal error: iconv.h: No such file or directory 24 \| #include <iconv.h> \| #include <iconv.h> cfg-racket:5686: checking for iconv.h cfg-racket:5752: checking iconv is usable cfg-racket:8662: running /bin/sh /Users/Alex/Documents/GitHub/racket/racket/racket/src/build/../foreign/libffi/configure --disable-option-checking '--prefix=/Users/Alex/Documents/GitHub/racket/racket/racket' 'LDFLAGS=-L/usr/local/opt/openblas/lib' 'CPPFLAGS=-I/usr/local/opt/openblas/include' '--enable-portable-binary' 'AR_FLAGS=rc' '--enable-pthread' '--disable-iconv' --cache-file=/dev/null --srcdir=/Users/Alex/Documents/GitHub/racket/racket/racket/src/build/../foreign/libffi cfg-racket:8662: running /bin/sh /Users/Alex/Documents/GitHub/racket/racket/racket/src/build/../rktio/configure --disable-option-checking '--prefix=/Users/Alex/Documents/GitHub/racket/racket/racket' 'LDFLAGS=-L/usr/local/opt/openblas/lib' 'CPPFLAGS=-I/usr/local/opt/openblas/include' '--enable-portable-binary' 'AR_FLAGS=rc' '--enable-pthread' '--disable-iconv' --cache-file=/dev/null --srcdir=/Users/Alex/Documents/GitHub/racket/racket/racket/src/build/../rktio ac_cv_header_iconv_h=no


mflatt
2020-5-2 16:37:09

I think that means something is still wrong with your environment, or at least was when configure ran, because iconv.h is included in the MacOSX SDK.


alexknauth
2020-5-2 19:08:50

Okay. It’s possible that when I ran make the first time, it ran configure with the wrong gcc, and when I ran make the second time after making gcc clang again, it didn’t re-run configure. So I did a git clean -d -x -f . which should have deleted any tainted files from running configure before the clang fix, and ran make once more. This seems to have fixed it. Thank you!


sorawee
2020-5-2 19:14:22

Quick question: after installing minimal Racket, I want to install all packages in the main distribution from source in a way that everyone of them is a git repository. Is there a way to do that? (Edit: actually nvm, it probably doesn’t help much anyway)


samth
2020-5-2 19:23:34

I think there is not a way to do that


phdumaresq
2020-5-3 03:42:16

I asked this on the Racket Discord and got a no already, but just in case, is there any way to get syntax highlighting in the REPL from a terminal? I know the racket-mode REPL has syntax highlighting, but would really like something I can use outside of Emacs


sorawee
2020-5-3 04:07:46

@phdumaresq try pygmentize?


sorawee
2020-5-3 04:08:00