-
Notifications
You must be signed in to change notification settings - Fork 27
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
Build fails on OpenBSD #965
Comments
In general, yes, that is the case. There are only two versions that should be "guaranteed" to build--the one snapshotted, and the current. Because those two versions both work, it's usually the case that an intermediate version can--with some effort--be tweaked around to work if absolutely necessary. But it may well not work as-is. So try building with the older version, and then seeing if the build product of that process can bootstrap. This does mean that if you want a stable OpenBSD build you might have to go back and build that older version, otherwise you'll have to periodically re-bootstrap. |
Ok, I will give a try this previous commit. If it works I have to add it to the repository. |
I bootstrapped again successfully an pushed the binary in pull request #968 Now this binary can build with the last commit but its product segfault immediatly. I have only a partial log. |
Thanks, I saved it as a file. Is there any way you can run with the (If you're handy with a debugger of any sort enough to get a stack of any kind, even a screenshot of one, it could offer a clue) |
Actually, I note that's not a debug build. At least do |
I am trying to intercept the output in a file but the redirection of the standard output does not work with the parameters. I don't use the last Firefox and github block the file upload, sorry. I tested a lot of parameters. Do you want "make.r CONFIG=configs/generic.r DEBUG=asserts" or something else? |
Causes a bunch of stuff, but none of the compile steps succeed because of this error:
|
vps642026$ gdb r3 r3.core Core was generated by `r3'. |
(gdb) bt full |
Thanks...it's certainly more informative than just a crash. If you saw my digest of the log above, I guess OpenBSD doesn't support address sanitizer (at least not out of the box). You might need a newer GCC or need to do some stuff to get it. But really it wouldn't do too much better than this, so don't worry about it. I said "at least But with something like this, I should probably just debug it...as you've already done the bootstrap. If it's not too hard to install OpenBSD in VirtualBox, where should I get an image from to be compatible with you? |
On OpenBSD GCC is customized. A pristine GCC can be installed. I rebuild with DEBUG=normal I use the 6.4 ISO in https://cdn.openbsd.org/pub/OpenBSD/6.4/amd64/ |
No, I think the default compiler is LLVM with a masquarade of command to simulate GCC. Never used a debugger before. |
With DEBUG=normalvps642026$ gdb r3 r3.core |
(gdb) bt full |
(gdb) l |
So you're intentionally running gcc 4.2.1, from 2007? :-/ While I wait for this to compile and poke around with it...perhaps you could post an introduction and explain your motivations a bit...so I understand why I'm doing it! |
I'm not having any trouble (well, unless you count not being able to copy or paste out of the terminal as trouble, I don't have a "middle mouse button"). What I did was to install the install64.iso from the location you gave, then I did With that old a compiler, C++ serves no point. You need C++11. (There were compilers around that would work prior to 2011, which would say You might try deleting everything and re-enlisting in your branch. The simple command:
Worked fine for me. But I tried various optimization levels, debug and not, generic config/etc. The things that don't work are sanitizing and C++11. If you steer clear of that it should work. So try it from a clean clone of your branch with the bootstrap exe, check your |
Cross answered with ticket #960. That's what I understood about the C ++ compiler. My first build uses generic.r. I will follow your insttructions. If a can find the options that build and worth it, I intended to make a build daemon, publish the builded material, and extracting a build log, a test log, and a trace of a run. This could help to isolate bugs. |
I realized that your obsd-build branch was not merged up to date...the last commit it had was January 11th. I had just seen the most recent date on the commit and thought it must be newer. But when I rebased it, I get the segmentation fault you see. So now I have a repro case... |
Yes I rebased master and forget this branch! For my second build test I used a separate clone. |
Okay, I found the problem! It wasn't very hard to see what was wrong once I looked at the crash in the debugger: So that should fix it. Good to find these things--so I'm glad you're making the effort to build it on OpenBSD. And I do think that it's good to stay building under old compilers because it's a good test that you must be keeping dependencies under control (!) Though I will say...that if you have an interest in C/C++ programming, it looks like OpenBSD may be a painful place to be learning it. If you're an open source purist and want something that's still pretty full-featured as an IDE, I suggest Qt Creator on a Debian install: Would be much easier to do most of your developing/debugging that way, even if you ultimately want an OpenBSD executable for some reason... |
What do you mean about open source purist? I was in Debian for about 10 years at home. For 3 years my PC broke down and I went under Windows because I did not want to throw the license forcibly sold with the machine. I use Debian professionally on a daily basis by administering the web infrastructure of my company. I have the project to migrate to OpenBSD instead of Debian because by regularly following their mailing list I found more in common with its developers and their state of mind. At the moment I have three machines under: Debian, OpenBSD, Windows 7. I am rather in the learning of the system and the compilation of ren-c gives me opportunities. |
I mean some of the better systems are still commercial or closed, e.g. CLion. There's good and bad about Microsoft Visual Studio, to where I'd call it break-even with Qt Creator.
If you find something you are interested in working on as a project, let me know. But we're really in need of contributions at any level--so one can make improvements without them being huge amounts of code. Right now I would prefer it if we can see code get deleted and maintain the same functionality, vs getting new features...
We can use some help with web infrastructure, given the desire to put it online! |
I find VS to be heavy. I am rather old school. A good editor (EditPad Pro) a grep tool (AstroGrep), a merge tool (WinMerge), a terminal, and I'm happy. I did not really do C / C ++ programming, only occasionally. I have heard a lot of good JetBrains softwares. I started reformatting all comment by hand in C89 style but you did a lot of change in sources. I do not know if I can send everything at once or if I have to do it file it by file. There is also third-party library code and I do not know whether to keep the code inchanged so that it can easily be updated from upstream. Deleting code and keeping features inchanged in the same time is a must have. For web infrastructure, indeed I can help us to be self-hosted. |
I don't know what code you are talking about, but the Ren-C sources use https://github.com/metaeducation/ren-c/wiki/On-Building-Ren-C-With-Cpp-Compilers I much prefer the I use C89 comments in generated code files, so that one can notice them and realize "hey, the project doesn't usually use this, I must be looking at generated code...I should not edit here unless I'm in the generator". If you wished, you could write an automated tool to filter the files pre-build and make C89 comments. PARSE rules could do it. Notice how a patch was made recently: You could do something similar and patch comments when you built, if you thought it necessary. It's not something I would advise spending time on. |
Ok, I understand why you wanted to do it with PARSE. I left that for someone proefficient with it. |
Something to read about that's rather important and actually a big deal when doing low-level C programming: https://stackoverflow.com/questions/98650/what-is-the-strict-aliasing-rule One has to understand that to know why some of the things in Ren-C are done the way they are. |
A build using a binary compiled with commit 4a01d0e fails with the last commit on:
$ ./r3-openbsd-x64 make.r CONFIG=configs/generic.r OS-ID=0.9.40
[
[M32 ARC HID NPS PIE NCM UFS NSP PIC WLOSS]
[M32 ARC PIE HID DYN CON S4M]
[LP64 LLP64 BEN LEN LLC SGD SG? W32 UNI F64 NSEC PIP2 NSER]
[M DL LOG W32 NWK]]
** Error: Unused flags in %systems.r specifications
** Where: fail if use do catch either else _ do do catch either else _ do console
** Near: [... unused-flags
fail "Unused flags in %systems.r speci...
** File: tools/systems.r
** Line: 495
I change the code arround unused-flags in %tools/systems.r like that:
On OpenBSD the build fails and the modified output is:
vps642026$ ./r3-openbsd-x64 make.r CONFIG=configs/generic.r
compiler-flags
[M32 ARC HID NPS PIE NCM UFS NSP PIC WLOSS]
linker-flags
[M32 ARC PIE HID DYN CON S4M]
system-definitions
[LP64 LLP64 BEN LEN LLC SGD SG? W32 UNI F64 NSEC PIP2 NSER]
system-libraries
[M DL LOG W32 NWK]
used-flag
[
SGD BEN LLC F64 M NPS HID DYN NCM LEN NSER ARC UNI W32 NSEC WLOSS CON S4M LLP64 DL M32 NSP UFS PIP2 LP64 PIE NWK LOG PIC
SG?]
unused-flag
[
[M32 ARC HID NPS PIE NCM UFS NSP PIC WLOSS]
[M32 ARC PIE HID DYN CON S4M]
[LP64 LLP64 BEN LEN LLC SGD SG? W32 UNI F64 NSEC PIP2 NSER]
[M DL LOG W32 NWK]]
test compose
[
[M32 ARC HID NPS PIE NCM UFS NSP PIC WLOSS]
[M32 ARC PIE HID DYN CON S4M]
[LP64 LLP64 BEN LEN LLC SGD SG? W32 UNI F64 NSEC PIP2 NSER]
[M DL LOG W32 NWK]
]
[
[M32 ARC HID NPS PIE NCM UFS NSP PIC WLOSS]
[M32 ARC PIE HID DYN CON S4M]
[LP64 LLP64 BEN LEN LLC SGD SG? W32 UNI F64 NSEC PIP2 NSER]
[M DL LOG W32 NWK]]
** Error: Unused flags in %systems.r specifications
** Where: fail if use do catch either else _ do do catch either else _ do console
** Near: [... unused-flags
fail "Unused flags in %systems.r speci...
** File: tools/systems.r
** Line: 495
On Windows the buid success and the modified output is:
$ ./r3-windows-x86-8994d23 make.r CONFIG=configs/generic.r
== SHIMMING OLDER R3 TO MODERN LANGUAGE DEFINITIONS ==
compiler-flags
[M32 ARC HID NPS PIE NCM UFS NSP PIC WLOSS]
linker-flags
[M32 ARC PIE HID DYN CON S4M NOWASM]
system-definitions
[LP64 LLP64 BEN LEN LLC SGD SG? W32 UNI F64 NSEC PIP2 NSER]
system-libraries
[M DL LOG W32 NWK]
used-flag
[
SGD BEN LLC F64 M NPS HID DYN NCM LEN NSER ARC UNI W32 NSEC WLOSS CON S4M LLP64 DL M32 NSP UFS PIP2 LP64 PIE NWK LOG PIC
SG? NOWASM]
unused-flag
[]
test compose
[
M32 ARC HID NPS PIE NCM UFS NSP PIC WLOSS
M32 ARC PIE HID DYN CON S4M NOWASM
LP64 LLP64 BEN LEN LLC SGD SG? W32 UNI F64 NSEC PIP2 NSER
M DL LOG W32 NWK
]
make object! [
…
I think commit is 31aa9be#diff-2af3fa21d38da56bb8293d98b0453b85 changed the behavior of COMPOSE but I don't know why windows can compile with r3-windows-x86-8994d23.exe which older that my binary.
If I bypass unused-flag test the build fails just after this point:
Sanity checking on system config....Good
Sanity checking on app config....Good
definitions: ["NDEBUG"
"OS_STACK_GROWS_DOWN" "ENDIAN_LITTLE" "HAS_LL_CONSTS" "_FILE_OFFSET_BITS=64" "LP64"]
includes: [%../src/include %prep/include]
libraries: [make object! [
class: #dynamic-extension
output: gnu:m
flags: _
]]
cflags: []
ldflags: []
debug: false
optimization: 2
** Access Error: value is CONST (see MUTABLE): ["REB_API"]
** Where: repend case join construct if _ make do catch either else _ do console
** Near: [repend series :value ~~]
** File: tmp-boot.r
** Line: 4428
Did I have to attempt a build with the old commit 8994d23 before trying to build last commit?
The text was updated successfully, but these errors were encountered: