Closed lenoil98 closed 1 week ago
The leading developer of the Ofront+ project says that it may have something to do with integer alignment and that he has come across a similar problem when porting Ofront+ to ARMv7. If he could get remote SSH access to the PPC64, he would be able to take a look and probably define the location of the cause of the error. Is that possible?
The (GCC) options -malign-power
and -malign-natural
may help.
We discussed this problem a bit. The fact is that Ofront+ has not been tested on computers with the big endian architecture, although such support is provided.
But ppc64 sometimes there are also with the little endian architecture (ppc64le). What exactly is your processor model?
Thanks for the feedback.
What exactly is your processor model?
I’m using a raptor blackbird that supports both big endian and little endian. I was using ppc64 and will try building on ppc64le.
The (GCC) options -malign-power and -malign-natural may help.
I will give the GCC options a try and report back.
The leading developer of the Ofront+ project says that it may have something to do with integer alignment and that he has come across a similar problem when porting Ofront+ to ARMv7. If he could get remote SSH access to the PPC64
I can provide SSH access, if desired. Please contact me.
SSH access is a good idea, because it is difficult to set up an emulator. Please write me e-mail, since your e-mail is not listed in your profile. Of course, I don't need permanent access, just for the time of searching for the error.
Also, here's what we can try. Edit Editor.Mod, removing code from it until we can reproduce segfault on a small piece of code. Obviously, the problem will only appear under PPC64.
Following the suggestion of @kekcleader, I modified Data/bin/OfrontPlus/Target/FreeBSD_ppc64/Bin/cc
to CC="gcc -m64 -malign-power -fPIC -I. -I../../../../Mod/Lib -Os -g0 -fomit-frame-pointer -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -c"
. I also had to make a changes to term_linux.c
(adding #include <sys/signal.h>
) and make.sh
(adding -lm
to the last line -I/usr/local/include -L/usr/local/lib -lallegro_primitives -lallegro_image -lallegro_acodec -lallegro_audio -lallegro_font -lallegro_dialog -lallegro -lm
).
I was then able to successfully build FreeOberon. The only other issue is the language defaults to russian. Other than modifying FreeOberon.Mod
, how do you set the language?
@lenoil98 To set the language, run Free Oberon as follows:
./FreeOberon --lang en
The language info is located in directory Data/Texts
and you can add more languages if required or change anything there. These are plain UTF-8 files.
Another option is to do mv Data/Texts/en.dat Data/Texts/ru.dat
.
In one of the future versions there will be a language menu and the default will be English.
Using a modified FreeBSD_amd64 directory to support FreeBSD_ppc64, I was able to create ofrontplus and start the build process. Everything works up to the point of converting Editor.Mod and I get the following.
root@blackbird:/usr/ports/tmp/FreeOberon/src # ./make.sh Config_linux.Mod translating Config 235
Utf8.Mod translating Utf8 5292
Strings.Mod translating Strings 8072
Reals.Mod translating Reals 4401
Int.Mod translating Int 3035
In.Mod translating In 7784
Out.Mod translating Out 12542
Args.Mod translating Args 1027
Files.Mod translating Files 40192
Texts.Mod translating Texts 23642
Random.Mod translating Random 1708
StrList.Mod translating StrList 4550
Dir.Mod translating Dir 5770
Allegro5.Mod translating Allegro5 13917
Graph.Mod translating Graph 65840
TermBox.Mod translating TermBox 32744
Term.Mod translating Term 885
OV.Mod translating OV 90298
FoStrings.Mod translating FoStrings 6880
EditorText.Mod translating EditorText 28949
./make.sh: line 90: 15948 Segmentation fault (core dumped) $OFR -Cw Editor.Mod
Any suggestions on why ofrontplus segfaults?