1. Can't install phix

Tried to install 64-bit linux, everything goes ok until:

./p -test 
seqmentation fault 
Mint 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

new topic     » topic index » view message » categorize

2. Re: Can't install phix

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Can't install phix

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: Can't install phix

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.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Can't install phix

jesito said...

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: Can't install phix

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?

new topic     » goto parent     » topic index » view message » categorize

7. Re: Can't install phix

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

new topic     » goto parent     » topic index » view message » categorize

8. Re: Can't install phix

achury said...

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

new topic     » goto parent     » topic index » view message » categorize

9. Re: Can't install phix

irv said...

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:

Peter Cordes said...

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?

new topic     » goto parent     » topic index » view message » categorize

10. Re: Can't install phix

petelomax said...

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

new topic     » goto parent     » topic index » view message » categorize

11. Re: Can't install phix

petelomax said...
irv said...

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/

new topic     » goto parent     » topic index » view message » categorize

12. Re: Can't install phix (SOLVED?)

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.

new topic     » goto parent     » topic index » view message » categorize

13. Re: Can't install phix

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...

irv said...

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.

new topic     » goto parent     » topic index » view message » categorize

14. Re: Can't install phix

petelomax said...

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.

new topic     » goto parent     » topic index » view message » categorize

15. Re: Can't install phix

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)

new topic     » goto parent     » topic index » view message » categorize

16. Re: Can't install phix

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

new topic     » goto parent     » topic index » view message » categorize

17. Re: Can't install phix

achury said...

Why not on the open source Eu 3.x ?

Have you see the source code of Eu 3.x?

achury said...

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.

achury said...

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.

achury said...

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?

new topic     » goto parent     » topic index » view message » categorize

18. Re: Can't install phix

What is bad with Eu 3 code?
Forked into: Eu 3 source code

new topic     » goto parent     » topic index » view message » categorize

19. Re: Can't install phix

Hmmm

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1992468 said...

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.

new topic     » goto parent     » topic index » view message » categorize

20. Re: Can't install phix

petelomax said...

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:~$  

new topic     » goto parent     » topic index » view message » categorize

21. Re: Can't install phix

petelomax said...

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.so 
or
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>. 

new topic     » goto parent     » topic index » view message » categorize

22. Re: Can't install phix

irv said...

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?

new topic     » goto parent     » topic index » view message » categorize

23. Re: Can't install phix

petelomax said...
irv said...

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?

new topic     » goto parent     » topic index » view message » categorize

24. Re: Can't install phix

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...

new topic     » goto parent     » topic index » view message » categorize

25. Re: Can't install phix

Pushed this upstream (about time): https://sourceware.org/bugzilla/show_bug.cgi?id=30020

new topic     » goto parent     » topic index » view message » categorize

26. Re: Can't install phix

bump

new topic     » goto parent     » topic index » view message » categorize

27. Re: Can't install phix

Hey! Some movement! I've actually got something I can actually work on, finally.

new topic     » goto parent     » topic index » view message » categorize

28. Re: Can't install phix

new topic     » goto parent     » topic index » view message » categorize

29. Re: Can't install phix

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):

the_elves said...

https://i.postimg.cc/FFqqgb7b/forsooth.png

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.

new topic     » goto parent     » topic index » view message » categorize

30. Re: Can't install phix

petelomax said...

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

new topic     » goto parent     » topic index » view message » categorize

31. Re: Can't install phix

Installed today on Sparkylinux 64bit.

Everything went fine, no seg faults anymore. Congratulations and a big thanks

Jes.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu