-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
[racketcs] make cs
does not work on FreeBSD
#2344
Comments
Have the main Racket executable export a function to get errno, which avoids portability problems trying to access it via the FFI. Related to #2344
Does b9c0423 let you use |
with the latest commits I've attached a file of the last 50 lines of |
As far as I can tell libiconv is installed on my system.
|
From that output, it looks like Chez (or maybe Racket) is looking for libiconv without a version. Is there a package you can install that has the unversioned .so file? |
I searched for the locations of
|
When I manually edit
Looks like need to define |
I have a proposed definition of I may be being too defensive in my code but here it is.
With the above definition added to
|
Although there's a generic Unix The "malformed fasl-object header in petite" problem is probably because the |
Also, in case you didn't know already: You won't have to build Chez Scheme boot files, anymore. They will be built automatically (via Racket running Chez Scheme's compiler). |
Sure, I'd be happy to do that. |
In addition, I also found that with gcc version 7 and above I don't know if this also affects OpenBSD and NetBSD, I imagine it probably does since the makefiles for those platforms doesn't have the new option. I can open another PR with the above fix. It probably is better to open the PR against cisco\ChezScheme and it can be merged downstream into racket\ChezScheme, right? |
Just to comment for the sake of the discussion, with the recent Makefile changes, racket\ChezScheme and the above The malformed fasl-object header error has gone away too so your guess about its cause is probably correct. |
Yes, if you post a PR to Chez Scheme, I can pick it up early for the Racket fork. I think a better solution for GCC 7+ is to adjust the source instead of changing the warning flags. Of the options illustrated at https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/, the comment one looks most appealing to me — hacky, but simple and portable. |
I like the idea of adding a comment to the source code. It should work automatically for wide variety of platform, making this approach more robust. Just to make sure we're looking at the same comment, the one you have in mind is |
Yes — that comment or any accepted variant that looks nice to you. |
Hmm, looking at the relevant lines in Looks like we're stuck with editing the makefiles instead. Thoughts? |
If they don't return, could you add a |
Yes that seems to work, I'll continue building and run some tests just to be sure. |
Hi... I need to intervene here since I am looking at something that looks potentially related. I think this is related to racket/ChezScheme#8 The functions that do not return should be marked with noreturn. That fixes at least part of the issues. Problem is that GCC8 (maybe 7 as well) something like this will happen with certain optimization flags:
That's warning is a false positive. GCC can't know that because it doesn't know that the previous call to At the moment I am working on JSC, the JavaScript compiler in WebKit and I see this code here:
Maybe for Racket/Chez we can do (untested):
|
I’ll be happy to give that a try, it does seem like a good approach to take here. I will report back soon. Thank you. |
I should point out I haven't tested the above code or ensured it actually solves your problem. I just typed that from memory because it looked similar to a problem I was looking at a couple of days ago. Please confirm it actually solves this particular issue. :) |
@pmatos your suggestion worked, all implicit-fallthrough warnings were removed by adding I've opened a PR against cisco/ChezScheme cisco/ChezScheme#437 |
@pmatos did all the work here in racket#8 and racket/racket#2344.
@pmatos did all the work here in racket/ChezScheme#8 and racket#2344. original commit: 2e3a618b0072d547b6c5abe6dd8dbac36a98c10e
@pmatos did all the work here in #8 and racket/racket#2344.
Hi Thanks |
@DavidAlphaFox It looks like your system can't find libiconv. Do you have that installed? |
Thanks for reply |
I think we have CS build ok on FreeBSD (yes, with |
@pmatos did all the work here in racket#8 and racket/racket#2344. Original commit: racket/ChezScheme@1dc8b71
@pmatos did all the work here in racket#8 and racket/racket#2344. Original commit: racket/ChezScheme@28c083a
Firstly, is it planned for Racket-on-Chez to be supported on BSD family operating systems?
If so here's a summary of all the issues I've found. I took
make cs
as far as I was able with my level of experience. It appears that the issues I ran into seem to be only arising from ChezScheme.I'm running GhostBSD which is based on 64-bit FreeBSD kernel 11.1.
The first issue encountered is missing boot files for
ta6fb
architecture. As explained in cisco/ChezScheme#7 BSD boot files are not built by default. Following the recommended method in the issue comments, I cross-compiled and copied the missing boot files to my FreeBSD machine which allows make to continue.Second issue is ChezScheme's makefiles are only compatible with GNU make, to work around that I aliased
make
withgmake
The third issue and this is as far as I got, is a compilation error occurring when compiling
io.sls
an attempt is made to loadlibc.so
which fails with invalid file format error. In FreeBSD variants,libc.so
is a linker script which resolves tolibc.so.7
Apparently the linker doesn't know how to handle the FreeBSD case.In case this is relevant, I see some code in
ChezScheme/mats/foreign.ms
which attempts to deal with loadinglibc.so
on FreeBSD machines.If RacketCS won't be supported on BSD family in the foreseeable future - which I hope won't be the case, then feel free to close this issue. Though I will continue to advocate for BSD support :-)
The text was updated successfully, but these errors were encountered: