1. Can't install phix
- Posted by irv Aug 16, 2022
- 6756 views
Tried to install 64-bit linux, everything goes ok until:
./p -test seqmentation faultMint 19.3
Linux irv-desktop 5.0.0-32-generic #34~18.04.2-Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
2. Re: Can't install phix
- Posted by petelomax Aug 19, 2022
- 6647 views
- Last edited Sep 21, 2022
Yep, Otto reported the same thing earlier today:
the p executable 64bit V1.0.1 worked fine on Ubuntu 20.04.x. Yesterday I upgraded to Ubuntu 22.04 - the p executable crashes with a segmentation violation ...
Something similar happened a while back, eventually traced to the kernel being recompiled with different stack alignment options.
Be warned it took me a very long time to figure out a fix for that - so unfortunately I'm probably not the best person to ask! ! !
You could try googling for recent kernel changes, or maybe see if gdb and friends offer any better clues...
Probably something on https://kernelnewbies.org/LinuxChanges - one of the tips on that site is to run something called dmesg...
You may want to look into https://support.starlabs.systems/kb/guides/install-an-alternative-kernel to see whether an older or newer kernel fixes things.
Also, "./phix -d p64.exu" should produce a list.asm if you've (somehow) got a machine address where it's going wrong,
though you may very well need to generate that on a different machine.
3. Re: Can't install phix
- Posted by petelomax Oct 11, 2022
- 6420 views
Finally got round to filing a bug report: https://bugs.launchpad.net/ubuntu/+bug/1992468
PS: The corresponding github issue mentioned is https://github.com/petelomax/Phix/issues/13
PPS: Nothing in https://www.google.com/search?q=segfault+in+ld-linux-x86-64.so.2&tbs=qdr:m strikes me as relevant
4. Re: Can't install phix
- Posted by jesito Nov 05, 2022
- 6199 views
Any news on this? Same is happening to me right now. Trying on MX-linux MX21. (64 bit). Will try on a non Debian based distro.
5. Re: Can't install phix
- Posted by petelomax Nov 05, 2022
- 6178 views
Any news on this?
Nope, sorry, but I have just opened a new SO question: https://stackoverflow.com/questions/74330661/segfault-in-ld-linux-x86-64-so
6. Re: Can't install phix
- Posted by achury Nov 05, 2022
- 6166 views
Please clarify to me.
Phix is based on Eu 3.1 or in 4.0?
Your current p interpreter is more compatible with Eu3 or Eu4?
7. Re: Can't install phix
- Posted by irv Nov 07, 2022
- 6037 views
Trying to run ./p -test, dmesg gives me this:
[19500.404765] 13755 (p): Uhuuh, elf segment at 0000000000400000 requested but the memory is mapped already
8. Re: Can't install phix
- Posted by petelomax Nov 08, 2022
- 6013 views
Please clarify to me.
Phix is based on Eu 3.1 or in 4.0?
Your current p interpreter is more compatible with Eu3 or Eu4?
Erm, if pushed I'd say Phix was originally based on RDS Eu 2.4! It's all a completely different code base anyway.
Maybe this will help answer your questions: https://en.everybodywiki.com/The_Phix_Programming_Language#Comparison_with_Euphoria
9. Re: Can't install phix
- Posted by petelomax Nov 08, 2022
- 6014 views
Trying to run ./p -test, dmesg gives me this:
[19500.404765] 13755 (p): Uhuuh, elf segment at 0000000000400000 requested but the memory is mapped already
Oh, does that mean you've got past ld-linux-x86-64.so.2 ?? - and run face first into another f*ing issue?
There has been a response on SO:
glibc isn't part of the kernel. What is "ld-2.11.1.so" and how can I look at the source code? - see codebrowser.dev/glibc/glibc/elf. I don't know which files exactly it gets built from, but just seeing the function names and variable names at the point where it segfaults could be helpful in figuring out which bytes of your hand-crafted binary to take a closer look at. ld-linux is not a huge program, although not tiny, with the binary being 212K on my system, so I'm not suggesting you try to fully understand how the whole thing works.
To which my response is "am I being totally *king thick? What the f.ity f f.ing f?"
Bar the overall gist of "it's easy", when "it clearly ain't", is anything on either of those links supposed to make any sense to me in any way at all, or is it just a cruel and deliberate wind-up?
Googling the earlier remark of "make a debug build of glibc", best I've yet got is "sudo apt-get install libc6-dbg" then you can run dbg...
Linux is just wonderful, innit?
10. Re: Can't install phix
- Posted by ChrisB (moderator) Nov 08, 2022
- 5999 views
To which my response is "am I being totally *king thick? What the f.ity f f.ing f?"
How strange - that's my usual response too!
Cheers
Chris
11. Re: Can't install phix
- Posted by irv Nov 08, 2022
- 5986 views
Trying to run ./p -test, dmesg gives me this:
[19500.404765] 13755 (p): Uhuuh, elf segment at 0000000000400000 requested but the memory is mapped already
Oh, does that mean you've got past ld-linux-x86-64.so.2 ?? - and run face first into another f*ing issue?
I don't think so, I just downloaded Phix and followed the instructions, ./p gives me a segmentation fault. Not a lot of help.
Run dmesg -w in a terminal, then ./p in another, tells me "the elf segment at 0000000000400000 requested but the memory is mapped already".
IOW, it's just more detail about the same seg. fault.
So, to know more, Phix would have to be compiled with the -g flag to turn on debugging info. https://u.osu.edu/cstutorials/2018/09/28/how-to-debug-c-program-using-gdb-in-6-simple-steps/
12. Re: Can't install phix (SOLVED?)
- Posted by irv Nov 10, 2022
- 5860 views
I upgraded my Linux kernel to 5.4.0-131-generic, and that solved the segfault issue. But latest Ubuntu uses 5.15.x, so the other problem is probably back again.
13. Re: Can't install phix
- Posted by petelomax Nov 10, 2022
- 5856 views
A thought just occurred to me: if you can run p -c -test on one linux box, it should populate the test\ directory with 60-odd executables.
You (or someone or even me I guess) could try transferring some (first 10) or all of them onto a machine with the ld.so issue, and see if any of them at all run...
Phix would have to be compiled with the -g flag to turn on debugging info. https://u.osu.edu/cstutorials/2018/09/28/how-to-debug-c-program-using-gdb-in-6-simple-steps/
It would first have to be written in C.
14. Re: Can't install phix
- Posted by irv Nov 10, 2022
- 5857 views
A thought just occurred to me: if you can run p -c -test on one linux box, it should populate the test\ directory with 60-odd executables.
You (or someone or even me I guess) could try transferring some (first 10) or all of them onto a machine with the ld.so issue, and see if any of them at all run...
OK, all done. 7.1 megs: https://drive.google.com/file/d/1h3wnzai-iZSkblhYCosAfJs1a0WpqQ6D/view?usp=sharing
Mint doesn't have the latest bleeding edge kernels, so someone with a current Ubuntu version might want to download these and test 'em.
Bear in mind that many of the tests don't print anything to the screen - that doesn't mean anything is wrong.
15. Re: Can't install phix
- Posted by petelomax Nov 10, 2022
- 5846 views
I think I may have found it: https://maskray.me/blog/2022-08-21-glibc-and-dt-gnu-hash
Perhaps slightly easier to read: https://blog.hiler.eu/win32-the-only-stable-abi/
Apparently DT_GNU_HASH is a 16-year old superior replacement for DT_HASH - that only got properly documented sometime last year.
I certainly use DT_HASH, and it certainly wouldn't work should the lib being loading not have it, and I've certainly not seen the updated docs yet.
It appears it may have been fixed: https://bugzilla.redhat.com/show_bug.cgi?id=2129358
and: https://src.fedoraproject.org/rpms/glibc/c/1cd731cf293a236f70ed6d54ff711d6a1342a3d3?branch=rawhide (Oct 17th)
So, it should eventually work itself out, or perhaps I could try replacing DT_HASH with DT_GNU_HASH: https://flapenguin.me/elf-dt-gnu-hash
(or go find meself a proper copy of the aforementioned docs)
16. Re: Can't install phix
- Posted by achury Nov 10, 2022
- 5820 views
Why not on the open source Eu 3.x ?
Just curious. I have never used phix, but appear to have many nice features.
I really like Eu3x simplicity. Now become forced to move to Eu4 in order to run on linux64 machines.
Why not try to made phix 100% compatible with Eu3 code, so become the natural sucessor on the 3.x line?
Marco A
17. Re: Can't install phix
- Posted by petelomax Nov 10, 2022
- 5832 views
Why not on the open source Eu 3.x ?
Have you see the source code of Eu 3.x?
I have never used phix.
Well then, there be your mistake. Maybe someone here can tell you how to check you've got glibc <= 2.35 (or >= 2.37) so you can give it a spin.
Now become forced to move to Eu4 in order to run on linux64 machines.
Not so. Not an expert, but "sudo dpkg --add-architecture i386" or "sudo apt-get install multiarch-support" or "sudo apt-get install ia32-libs" or suchlike should allow 32 bit programs to run on 64 bit linux, which I assume is your problem.
Why not try to made phix 100% compatible with Eu3 code, so become the natural sucessor on the 3.x line?
Have you see the source code of Eu 3.x?
18. Re: Can't install phix
- Posted by achury Nov 10, 2022
- 5805 views
What is bad with Eu 3 code?
Forked into: Eu 3 source code
19. Re: Can't install phix
- Posted by petelomax Nov 11, 2022
- 5870 views
Hmmm
Pete Lomax (petelomax) wrote on 2022-11-11: #6
Am now convinced, albeit without much in the way of concrete evidence, this is the missing DT_HASH (in libc.so.6 and libdl.so.2) issue, not that I've yet tried to create a DT_GNU_HASH replacment yet.
Michael Hudson-Doyle (mwhudson) wrote on 2022-11-11: #7
The change to omit DT_HASH was only in 2.36 and so was only present in kinetic/22.10, and then only briefly as we patched it before release. I doubt it's that.
20. Re: Can't install phix
- Posted by irv Nov 12, 2022
- 5794 views
Well then, there be your mistake. Maybe someone here can tell you how to check you've got glibc <= 2.35 (or >= 2.37) so you can give it a spin.
irv@irv-desktop:~$ ldd --version ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper. irv@irv-desktop:~$
21. Re: Can't install phix
- Posted by irv Nov 12, 2022
- 5773 views
Well then, there be your mistake. Maybe someone here can tell you how to check you've got glibc <= 2.35 (or >= 2.37) so you can give it a spin.
irv@irv-desktop:~$ ldd --version ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27 ...or
irv@irv-desktop:~$ ls /lib/x86_64-linux-gnu/libc* /lib/x86_64-linux-gnu/libc-2.27.soor
irv@irv-desktop:~$ /lib/x86_64-linux-gnu/libc-2.27.so GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1.6) stable release version 2.27. Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 7.5.0. libc ABIs: UNIQUE IFUNC For bug reporting instructions, please see: <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
22. Re: Can't install phix
- Posted by petelomax Nov 12, 2022
- 5771 views
irv@irv-desktop:~$ ldd --version ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27
Thanks. Can we/everyone quickly check whether there is indeed a correlation between 2.36 and Phix segfaulting?
23. Re: Can't install phix
- Posted by irv Nov 12, 2022
- 5790 views
irv@irv-desktop:~$ ldd --version ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27
Thanks. Can we/everyone quickly check whether there is indeed a correlation between 2.36 and Phix segfaulting?
Can't check glibc 2.36, however, both the working kernel 5.4.0-13-generic, and the seq-faulting kernel 5.0.0-32-generic on my computer both report the same 2.27 glibc. Could the problem be elsewhere?
24. Re: Can't install phix
- Posted by petelomax Dec 08, 2022
- 5518 views
Now here's an odd thing. I just created a new mint 21 cinnamon 64bit vm:
pete@pete-VirtualBox:~/phix$ ./p64 Segmentation fault (core dumped) pete@pete-VirtualBox:~/phix$ /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ./p64 Phix hybrid interpreter/compiler. Version 1.0.2 (64 bit Linux) Copyright Pete Lomax 2006..2022 Enter ? for options or filename to execute:-test
which completes fine...
Though not entirely surprisingly, "-c -test" segfaults on the first one...
25. Re: Can't install phix
- Posted by petelomax Jan 18, 2023
- 5195 views
Pushed this upstream (about time): https://sourceware.org/bugzilla/show_bug.cgi?id=30020
27. Re: Can't install phix
- Posted by petelomax Feb 16, 2023
- 4363 views
Hey! Some movement! I've actually got something I can actually work on, finally.
29. Re: Can't install phix
- Posted by petelomax Feb 20, 2023
- 3847 views
- Last edited Feb 21, 2023
My lord, forsooth behold a genius, he hath taken nary six monthen for to patchen just twelf byten!
It be told the gnomes of elfland hath strictethened theirly p_align necessitibilitationes, hallelujah!
To be fair, this was all properly formally announced at the time (in elvish of course):
and how anyone could possibly fail to understand that simply baffles the cute wee fellows.
The manual patches I made to the elf binaries have yet to be realised in the hll source code.
I have uploaded patched 1.0.1 binaries, but interpretation-only, with any compilation still
expected to segfault. Will get to work on building/testing/shipping 1.0.2 straight away.
30. Re: Can't install phix
- Posted by katsmeow Feb 20, 2023
- 3854 views
It be told the gnomes of elfland hath strictethened theirly p_align necessitibilitationes, hallelulah!
Is "hallelulah" correct in any way, shape, or form, especially related to English, Elvish, etc etc?
Etymology
From Hebrew הַלְלוּיָהּ‎ (hal'luyáh, “Praise Yahâ€).
/me smells a GPT bot.
Kat
31. Re: Can't install phix
- Posted by jesito Mar 02, 2023
- 2572 views
Installed today on Sparkylinux 64bit.
Everything went fine, no seg faults anymore. Congratulations and a big thanks
Jes.