Porting Racket to IRIX

47 views
Skip to first unread message

Eric Dodd

unread,
Jan 25, 2020, 3:36:57 PM1/25/20
to Racket Users
I'm working on porting Racket to IRIX. With a few minor patches, it compiles cleanly. However, it fails on `make install` with the following error:

racket/racketcgc -L debug -X "/usr/people/edodd/local/share/racket/collects" -G "/usr/people/edodd/local/etc/racket" --no-user-path -N "raco" -l- setup --no-user
getenv: contract violation
expected: string-environment-variable-name?
given: #f
context...:
/usr/people/edodd/local/share/racket/collects/racket/private/misc.rkt:202:2: getenv
/usr/people/edodd/local/share/racket/collects/openssl/mzssl.rkt:374:0: x509-root-sources

IRIX is missing `setenv` and `unsetenv`. I added those in with a patch as seen here: https://gist.github.com/unxmaal/bc996e78e9f422d6e277e0b4a0003cf5


With debug logging on, I see this:

compiler/cm: done: /usr/people/edodd/local/share/racket/collects/openssl/libcrypto.rkt
ffi-lib: loaded "libcrypto.so"
compiler/cm: processing: /usr/people/edodd/local/share/racket/collects/openssl/libssl.rkt
compiler/cm: done: /usr/people/edodd/local/share/racket/collects/openssl/libssl.rkt
ffi-lib: loaded "libssl.so"
getenv: contract violation
expected: string-environment-variable-name?
given: #f
context...:
/usr/people/edodd/local/share/racket/collects/racket/private/misc.rkt:202:2: getenv
/usr/people/edodd/local/share/racket/collects/openssl/mzssl.rkt:374:0: x509-root-sources

In mzssl.rkt, x509-root-sources(), it seems to handle finding openssl. Mine is located in a non-standard location. How do I pass this location in properly?

Thanks!


Matthew Flatt

unread,
Jan 26, 2020, 8:45:29 AM1/26/20
to Eric Dodd, Racket Users
At Sat, 25 Jan 2020 12:36:57 -0800 (PST), Eric Dodd wrote:
> getenv: contract violation
> expected: string-environment-variable-name?
> given: #f
> context...:
>
> /usr/people/edodd/local/share/racket/collects/racket/private/misc.rkt:202:2:
> getenv
> /usr/people/edodd/local/share/racket/collects/openssl/mzssl.rkt:374:0:
> x509-root-sources
>
> In mzssl.rkt, x509-root-sources(), it seems to handle finding openssl. Mine is
> located in a non-standard location. How do I pass this location in properly?

From the error, it looks like

(X509_get_default_cert_file_env)

or

(X509_get_default_cert_dir_env)

may be returning #f (or NULL at the C level). Is that the case?

If so, probably the solution is to check those results before passing
them on to `getenv`.

Eric Dodd

unread,
Jan 26, 2020, 8:48:15 AM1/26/20
to Racket Users
That was (mostly) the problem. I hard-coded the paths in mzssl.rkt, and it proceeded.

Next, it errors with "out of memory":

raco setup: making: <pkgs>/deinprogramm-signature/deinprogramm/signature (DeinProgramm - Signatures)
raco setup: in <pkgs>/deinprogramm-signature/deinprogramm/signature
raco setup: in <pkgs>/htdp-lib/stepper/private
raco setup: in <pkgs>/gui-lib/framework
raco setup: in <pkgs>/gui-lib/mred
raco setup: in <pkgs>/gui-lib/framework/private
raco setup: in <pkgs>/scribble-lib/scribble
raco setup: in <pkgs>/scheme-lib/scheme/unit/lang
raco setup: in <pkgs>/scheme-lib/scheme/unit
raco setup: in <pkgs>/syntax-color-lib/syntax-color
raco setup: in <pkgs>/gui-lib/mrlib
raco setup: in <pkgs>/gui-lib/mrlib/hierlist
raco setup: in <pkgs>/scheme-lib/scheme/signature/lang
raco setup: in <pkgs>/tex-table
raco setup: in <pkgs>/gui-lib/mrlib/private
raco setup: in <pkgs>/scheme-lib/scheme
out of memory
make[1]: *** [Makefile:221: install-cgc] Error 255
make[1]: Leaving directory '/usr/people/edodd/buildstuff/racket-7.5/src'
make: *** [Makefile:119: install] Error 2

Matthew Flatt

unread,
Jan 26, 2020, 9:00:07 AM1/26/20
to Eric Dodd, Racket Users
And you have enough memory, and there's no system-imposed memory limit
--- as reported by `ulimit -a` in bash, for example?

(Maybe a dumb question, but the last IRIX machine I used, decades ago,
would not have had enough memory to build modern Racket.)
> --
> 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/b1fe9f34-990e-48d0-9ce7-050a3c35
> d560%40googlegroups.com.

Eric Dodd

unread,
Jan 26, 2020, 10:57:44 AM1/26/20
to Matthew Flatt, Racket Users
I am unsure: this system is an Origin 350 with 8gb RAM and 4x700mhz MIPS. Does Racket expect more?

Thanks!
Eric
Reply all
Reply to author
Forward
0 new messages