Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"error: 'JIT_LOCAL4' undeclared" on OpenBSD/powerpc #1239

Closed
juanfra684 opened this issue Feb 12, 2016 · 5 comments
Closed

"error: 'JIT_LOCAL4' undeclared" on OpenBSD/powerpc #1239

juanfra684 opened this issue Feb 12, 2016 · 5 comments

Comments

@juanfra684
Copy link
Contributor

When I try to build Racket 6.4 on OpenBSD/powerpc with GCC 4.9.3 and jit/places/futures enabled, it shows this error during the build:

cc -O2 -pipe    -I./.. -I/usr/ports/pobj/racket-minimal-6.4/racket-6.4/src/racket/src/../include -I/usr/local/include -I/usr/X11R6/include -pthread -I/usr/local/include  -DUSE_SENORA_GC  -c /usr/ports/pobj/racket-minimal-6.4/racket-6.4/src/racket/src/hash.c -o hash.o
cc -O2 -pipe    -I./.. -I/usr/ports/pobj/racket-minimal-6.4/racket-6.4/src/racket/src/../include -I/usr/local/include -I/usr/X11R6/include -pthread -I/usr/local/include  -DUSE_SENORA_GC  -c /usr/ports/pobj/racket-minimal-6.4/racket-6.4/src/racket/src/jit.c -o jit.o
/usr/ports/pobj/racket-minimal-6.4/racket-6.4/src/racket/src/jit.c: In function 'scheme_generate':
/usr/ports/pobj/racket-minimal-6.4/racket-6.4/src/racket/src/jit.c:2469:32: error: 'JIT_LOCAL4' undeclared (first use in this function)
           mz_ld_runstack_base_alt(JIT_RUNSTACK);
                                ^
/usr/ports/pobj/racket-minimal-6.4/racket-6.4/src/racket/src/jit.c:2469:32: note: each undeclared identifier is reported only once for each function it appears in
/usr/ports/pobj/racket-minimal-6.4/racket-6.4/src/racket/src/jit.c: In function 'generate_function_getarg':
/usr/ports/pobj/racket-minimal-6.4/racket-6.4/src/racket/src/jit.c:3465:26: error: 'JIT_LOCAL4' undeclared (first use in this function)
     mz_set_local_p(JIT_RUNSTACK, JIT_RUNSTACK_BASE_LOCAL);
                          ^
*** Error 1 in racket/src (Makefile:217 'jit.o')
*** Error 1 in racket/src (Makefile:136 'all')

Unlike the default compiler on OpenBSD (GCC 4.2), GCC 4.9.3 supports thread-local storage (emulated).

@juanfra684
Copy link
Contributor Author

I need a fix for this bug. I changed the compiler for the OpenBSD port to GCC 4.9 because I would like to enable places and futures for the architectures with JIT support. I'm holding off the update to 6.4 due to this bug. If you can't fix it just tell me and I will disable places and futures for this architecture.

@mflatt
Copy link
Member

mflatt commented Apr 17, 2016

Sorry for not getting back to you sooner. Futures and places do not currently work with PPC, so disabling them is the right choice.

It's possible that places could be made to work with a modest effort. Making futures work would be much more difficult, I think, because lots more synchronization is needed for a non-TSO platform.

@juanfra684
Copy link
Contributor Author

Thanks for the info. I thought that the "error" was something more simple. Don't waste your time working in places/futures for powerpc, in my experience very few users use a openbsd/powerpc machine for real work. Anyway, I updated the OpenBSD package to 6.4 just 5 days after posting my problem here.

I have some problems with Racket 6.5 with JIT enabled on powerpc. Do you know how to fix this error in number.rktl?:

(#<procedure:floor> +inf.0) ==> +inf.0
(#<procedure:ceiling> +inf.0) ==> +inf.0
(#<procedure:round> +inf.0) ==> +nan.0
  BUT EXPECTED +inf.0
(#<procedure:truncate> +inf.0) ==> +inf.0
(#<procedure:floor> -inf.0) ==> -inf.0
(#<procedure:ceiling> -inf.0) ==> -inf.0
(#<procedure:round> -inf.0) ==> +nan.0
  BUT EXPECTED -inf.0
(#<procedure:truncate> -inf.0) ==> -inf.0
(#<procedure:floor> +nan.0) ==> +nan.0
(#<procedure:ceiling> +nan.0) ==> +nan.0
(#<procedure:round> +nan.0) ==> +nan.0
(#<procedure:truncate> +nan.0) ==> +nan.0

I will open new bug reports in the next weeks for the other problems.

@mflatt
Copy link
Member

mflatt commented May 1, 2021

I don't think I ever investigated these for BC, but CS is meant to work on FreeBSD, now. I say "meant to work" because the configuration is now in place, but I haven't tried a build myself. (I have tried FreeBSD on AArch64 and NetBSD on PowerPC32.)

@juanfra684
Copy link
Contributor Author

Don't worry, Racket has been building fine for years on OpenBSD/macppc with places and futures disabled. I'm closing the issue because it is very old. I will open new bug reports if I find problems with CS on other architectures.

Thanks for taking caring of the less popular architectures (and OS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants