1. iup // fails to load Linux so
- Posted by _tom (admin) Feb 03, 2017
- 3156 views
I have concluded that installing iup on Linux is too painful.
Currently I can not load the iup binaries with my Mint18-64bit.
The problem is that it looks like each Linux kernel wants a recompiled iup installation. Finding dependencies and compiling with `C` is no way to provide a gui for OE.
_tom
2. Re: iup // fails to load Linux so
- Posted by Senator Feb 03, 2017
- 3074 views
I have concluded that installing iup on Linux is too painful.
This has been my experience on Ubuntu Linux as well. I think IUP is dead in the water and references to that GUI should be deleted from the OpenEuphoria wiki pages. New users will become will not be encouraged to use Euphoria after running around in circles with the IUP toolkits.
For what it is worth...
It appears to me that currently several users are developing console and Windows libraries for euphoria 3.1 32 bit in addition to Pete Lomax's active development of PHIX with Windows support.
Meanwhile, most of the official OpenEuphoria development team is using, if not actively developing, OpenEuphoria 4.x, primarily under Linux. OpenEuphoria 4.x 64-bit has the advantage of Irv Mullin's mature, full featured, and dependable EuGTK GUI library which Pete Eberlein has used to develop his fantastic WEE Euphoria source code editor.
It is almost as if there is a defacto fork - OE 4.x LINUX with EUGTK vs Euphoria 3.1/PHIX for Windows users.
Regards, Kenneth Rhodes
3. Re: iup // fails to load Linux so
- Posted by petelomax Feb 03, 2017
- 3145 views
I have concluded that installing iup on Linux is too painful.
Currently I can not load the iup binaries with my Mint18-64bit.
Oh dear, that is bad news. I wish I could help, but I had trouble installing openGL, which must be like 0.1% of the problem.
The problem is that it looks like each Linux kernel wants a recompiled iup installation.
I wondered if the problem was that you are using a 4.4 kernel, but I see there is a 4.4 version ( https://sourceforge.net/projects/iup/files/3.21/Linux%20Libraries/ )
Just out of interest (not that I am likely to be able to help) what exactly happens if you install those pre-built binaries?
I am left wondering if https://en.wikipedia.org/wiki/Linux_Standard_Base might offer any hope?
Finding dependencies and compiling with `C` is no way to provide a gui for OE.
Agreed
Pete
4. Re: iup // fails to load Linux so
- Posted by petelomax Feb 03, 2017
- 3067 views
I think IUP is dead in the water and references to that GUI should be deleted from the OpenEuphoria wiki pages.
That goes too far. Adding "Works fine on Ubuntu 10.4 (32 bit)", "Known not to work on Linux Mint 18.1 (64 bit)", etc would be reasonable.
New users will become will not be encouraged to use Euphoria after running around in circles with the IUP toolkits.
Agreed. I have previously made an ass of myself by claiming (and still think it is true) that EuGTK is NOT cross platform. (add "Nigh on impossible to get this to work on Windows" to the wiki?)
OpenEuphoria 4.x 64-bit has the advantage of Irv Mullin's mature, full featured, and dependable EuGTK GUI library which Pete Eberlein has used to develop his fantastic WEE Euphoria source code editor.
Actually, it is hybrid. Maybe that's a sign - perhaps we need something based on the technology behind that, half EuGTK, half Native Windows API? - Rather you than me, though.
Pete
5. Re: iup // fails to load Linux so
- Posted by _tom (admin) Feb 03, 2017
- 3066 views
My test case:
include std/dll.e ? open_dll( "libiup.so" ) -->> 0
Nothing wrong with the wrapper created by G. Haberek.
My Mint 18 is kernel 4.4.0-21 but the current 4.4 iup binaries do not load for me. That -21 is killing me.
More telling, is that Porteus Linux is kernel 4.9 and nothing works. I tried re-loading an old Linux iso and discovered that its kernel fell between the binaries that iup provides.
For a brief moment my Linux and the iup binaries worked nicely together.
- if you use Linux, then Irv Mullins` EuGTK is perfect
- if you use Windows?
- there is no simple multi-platform gui
_tom
6. Re: iup // fails to load Linux so
- Posted by ghaberek (admin) Feb 03, 2017
- 3096 views
I have concluded that installing iup on Linux is too painful.
This why after working on IUP for quite a while I drifted away from it almost completely.
I just couldn't come up with reliable way to build and/or distribute the IUP libraries on different.
My test case:
include std/dll.e ? open_dll( "libiup.so" ) -->> 0
Try running ldd to see which libraries you may not be loading correctly:
$ ldd libiup.so
* there is no simple multi-platform gui
I'm working on that.
-Greg
7. Re: iup // fails to load Linux so
- Posted by Senator Feb 04, 2017
- 3066 views
I think IUP is dead in the water and references to that GUI should be deleted from the OpenEuphoria wiki pages.
That goes too far. Adding "Works fine on Ubuntu 10.4 (32 bit)", "Known not to work on Linux Mint 18.1 (64 bit)", etc would be reasonable.
I stand by my assertion that EU IUP is dead in the water. It has been over a year since any development updates have been posted and what is available is simply not enough to be usable, even by experienced euphoria programmers.
Tauting EU IUP as a viable, or even a promising GUI toolkit for any platform, is to present new Euphoria users with a nasty pitfall right out of the chute. IUP for euphoria was over-hyped from the git go.
New users will not be encouraged to use Euphoria after running around in circles with the IUP toolkit.
Agreed. I have previously made an ass of myself by claiming (and still think it is true) that EuGTK is NOT cross platform. (add "Nigh on impossible to get this to work on Windows" to the wiki?)
Agreed. We have EuGTK for EU 4.x Linux 64-bit and various Windows library support for Eu 3.1 and PHIX. Wiki claims for GUI toolkits should be conservative and definitely not overstated so that new comers are not sucked into a vicious vortex of frustration.
Regards,
Kenneth Rhodes
8. Re: iup // fails to load Linux so \\ (no solution wiki updated)
- Posted by _tom (admin) Feb 04, 2017
- 3060 views
Did a quick edit of the wiki:
- iup difficult (or fails) to install on Linux
- EuGTK best suited to Linux
Wiki still needs a complete makeover.
I only run Windows (under duress) in a virtual box. Can we conclude that for Windows programmers Eu3 and Phix are the best for writing a Windows gui?
I have great hopes for Redy and Leviathan.
The other gui toolkits are for the brave.
_tom
9. Re: iup // fails to load Linux so
- Posted by petelomax Feb 04, 2017
- 3042 views
Try running ldd to see which libraries you may not be loading correctly:
$ ldd libiup.so
Can I second the call for seeing the result of that.
10. Re: iup // fails to load Linux so
- Posted by _tom (admin) Feb 04, 2017
- 3031 views
I started fresh with a new download.
run the iup 4.4 install script again
- quietly did nothing
from the desktop, open a terminal
$ ldd libiup.so
ldd: ./libiup.so: No such file or directory
from the unzipped iup download
I get a pastey's worth of stuff
$ ldd libiup.so
http://openeuphoria.org/pastey/292.wc
start with a fresh install of Porteus 32 bit Linux to USB
- load OE4.05
- iup install script (iup 4.4 on a 4.9 kernel) install script quietly does nothing
- using Andy P iup wrapper, manually copy libiup.so to the test directory -->> demo works
There is a way to make iup work. But it does need a better method for installation.
_tom
11. Re: iup // fails to load Linux so
- Posted by petelomax Feb 04, 2017
- 3041 views
Maybe it would be worth asking on the IUP mailing list, that Antonio Scuri chap can be very helpful.
12. Re: iup // fails to load Linux so
- Posted by _tom (admin) Feb 04, 2017
- 3005 views
Thanks Pete
I discovered that iup has an uninstall script. Then I re-ran the install script and now have iup working again.
Its a gift (and a curse) that I can crash computer systems.
Are you ready for my investigation of Phix?
thanks...
_tom
13. Re: iup // fails to load Linux so
- Posted by petelomax Feb 04, 2017
- 3020 views
- Last edited Feb 05, 2017
Thanks Pete
I discovered that iup has an uninstall script. Then I re-ran the install script and now have iup working again.
You have no idea how relieved that makes me .
Are you ready for my investigation of Phix?
Sure. Be warned 64 bit Linux is wholly untested, not that I ship a pre-built version of that.
If you are feeling very brave, add format ELF64 to pth.exw, ~line 162, run ./phix -d pth and then try with ./pth instead of (the undamaged 32 bit) ./phix.
I will be fairly amazed if you get as far as the prompt! But I have nowt to test it on here, so I need the bug reports (and possibly address lookups from the list.asm).
I suppose I really ought to get round to uploading 0.7.2 soon, but I'll probably wait till you give me a good reason to.
Pete
14. Re: iup // fails to load Linux so
- Posted by _tom (admin) Feb 05, 2017
- 3002 views
Sure. Be warned 64 bit Linux is wholly untested, not that I ship a pre-built version of that.
If you are feeling very brave, add format ELF64 to pth.exw, ~line 162, run ./phix -d pth and then try with ./pth instead of (the undamaged 32 bit) ./phix.
I will be fairly amazed if you get as far as the prompt! But I have nowt to test it on here, so I need the bug reports (and possibly address lookups from the list.asm).
I suppose I really ought to get round to uploading 0.7.2 soon, but I'll probably wait till you give me a good reason to.
Pete
- running phix in Mint18 64-bit {{ Version 0.7.0 (32 bit Linux) Copyright Pete Lomax 2006..2016
- edit :: pht.exw
- line 162 from `format ELF32` to `format ELF64`
- run :: ./phix -d pth
creating listing file /home/mint/phix/list.asm...
- run :: ./pth
bash: ./pth: Accessing a corrupted shared library
We need a more direct forum for Phix discussions.
_tom
15. Re: iup // fails to load Linux so
- Posted by jimcbrown (admin) Feb 05, 2017
- 2970 views
We need a more direct forum for Phix discussions.
I'm fine with changing the name of this forum to "Phix & OpenEuphoria" if that's what it takes.
16. Re: iup // fails to load Linux so
- Posted by _tom (admin) Feb 05, 2017
- 2994 views
We need a more direct forum for Phix discussions.
I'm fine with changing the name of this forum to "Phix & OpenEuphoria" if that's what it takes.
Thats a good idea. It just makes the The Euphoria Way of doing things that much stronger.
_tom
17. Re: iup // fails to load Linux so
- Posted by petelomax Feb 05, 2017
- 2989 views
Well, I signed up for a free online shell, uploaded phix and unzipped it, then...
pete@xshellz-free:~/phix$ ./phix -bash: ./phix: Permission denied pete@xshellz-free:~/phix$ ls -al phix -rw-r--r-- 1 pete users 2060140 Nov 26 14:08 phix pete@xshellz-free:~/phix$ chmod 777 phix pete@xshellz-free:~/phix$ ls -al phix -rwxrwxrwx 1 pete users 2060140 Nov 26 14:08 phix pete@xshellz-free:~/phix$ ./phix -bash: ./phix: No such file or directory pete@xshellz-free:~/phix$
uh?
Pete
18. Re: iup // fails to load Linux so
- Posted by jimcbrown (admin) Feb 05, 2017
- 2981 views
Well, I signed up for a free online shell, uploaded phix and unzipped it, then...
pete@xshellz-free:~/phix$ ./phix -bash: ./phix: Permission denied pete@xshellz-free:~/phix$ ls -al phix -rw-r--r-- 1 pete users 2060140 Nov 26 14:08 phix pete@xshellz-free:~/phix$ chmod 777 phix pete@xshellz-free:~/phix$ ls -al phix -rwxrwxrwx 1 pete users 2060140 Nov 26 14:08 phix pete@xshellz-free:~/phix$ ./phix -bash: ./phix: No such file or directory pete@xshellz-free:~/phix$
uh?
Pete
Try using uname to figure out what arch the shell is using. The second error suggests that the kernel can't find the correct loader (i.e. not being able to find ld-linux.so.2 or ld-linux.so.1) - so you could be trying to run a 64bit binary on a 32bit-only system, or trying to run a 32bit binary on a 64bit system that doesn't have the 32-bit compatibility libraries installed. You could also be running on something enitrely different, like ARM or PowerPC or RISC. It's even possible that this is a shell that has, e.g., only the a.out loader but not the ELF loader (though that would be really unusual) or you might be trying to run a Linux/GNU binary on a FreeBSD system (which is possible but the FreeBSD system would require special compatibility libraries to be installed for that to work).
19. Re: iup // fails to load Linux so
- Posted by petelomax Feb 05, 2017
- 3010 views
Try using uname to figure out what arch the shell is using.
Linux xshellz-free 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
The second error suggests that the kernel can't find the correct loader (i.e. not being able to find ld-linux.so.2 or ld-linux.so.1) - so you could be trying to run a 64bit binary on a 32bit-only system, or trying to run a 32bit binary on a 64bit system that doesn't have the 32-bit compatibility libraries installed. You could also be running on something enitrely different, like ARM or PowerPC or RISC. It's even possible that this is a shell that has, e.g., only the a.out loader but not the ELF loader (though that would be really unusual) or you might be trying to run a Linux/GNU binary on a FreeBSD system (which is possible but the FreeBSD system would require special compatibility libraries to be installed for that to work).
Yes, I am (intentionally) trying to run a 32-bit binary on a 64-bit system... and yes I've got ld-linux.so.2 hard-coded in the ELF's interpreter section...
[EDIT] I also just tried a 64 bit binary, same deal.
[EDIT2] one more piece of the puzzle:
pete@xshellz-free:~/phix$ ldd ./phix not a dynamic executable pete@xshellz-free:~/phix$ ldd ./pth linux-vdso.so.1 (0x00007ffedef6f000) /lib/snoopy.so (0x00007f84222f1000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8421f46000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8421d42000) /lib/ld-linux.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f84224fd000) pete@xshellz-free:~/phix$
It was the first server I could get onto, maybe I'll find something better.
[I'll also move this question here] Does anyone know of a free online 64-bit Ubuntu desktop, by any chance?
Pete
20. Re: iup // fails to load Linux so
- Posted by _tom (admin) Feb 05, 2017
- 3006 views
Does anyone know of a free online 64-bit Ubuntu desktop, by any chance?
Pete
My solution for experiments is Porteus Linux. http://porteus.org/ The basic 250MB download lets you run Linux from a USB stick (even run everything in ram).
I'm even experimenting with the idea of making a Porteus Linux available with OE and GTK pre-installed so someone new to OE can just see things run.
I did a quick test of Phix this way.
- must change the permissions of Phix to executable
- bit of a mystery about how Phix finds (or does not find) the include files
You can even download a virtual box, and then run Windows!
Porteus is Slackware not Ubuntu.
_tom
21. Re: iup // fails to load Linux so
- Posted by jimcbrown (admin) Feb 05, 2017
- 2970 views
Try using uname to figure out what arch the shell is using.
Linux xshellz-free 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
Yes, I am (intentionally) trying to run a 32-bit binary on a 64-bit system... and yes I've got ld-linux.so.2 hard-coded in the ELF's interpreter section...
[EDIT] I also just tried a 64 bit binary, same deal.
[EDIT2] one more piece of the puzzle:
pete@xshellz-free:~/phix$ ldd ./phix not a dynamic executable pete@xshellz-free:~/phix$ ldd ./pth linux-vdso.so.1 (0x00007ffedef6f000) /lib/snoopy.so (0x00007f84222f1000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8421f46000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8421d42000) /lib/ld-linux.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f84224fd000) pete@xshellz-free:~/phix$
Ok, if that shell supports 32bit ELF binaries you should have a /lib32/ld-linux.so.2 - I'm suspecting that you don't have it and that the shell does not support 32bit and that this is why you can't run phix and why ldd doesn't recognize phix as a dynamic executable. (ldd works by running the ELF loader in a special mode that just lists the libraries that the binary links to, rather than running any actual code in the binary itself.)
[EDIT] I also just tried a 64 bit binary, same deal.
This bit doesn't make sense, though. ldd was clearly able to run the 64bit binary well enough to list the libraries.
22. Re: iup // fails to load Linux so
- Posted by petelomax Feb 06, 2017
- 2998 views
I have uploaded just about the simplest 64-bit ELF I can: http://phix.x10.mx/m01 (hello world)
If you like, you can also get http://phix.x10.mx/m01.list.asm and http://phix.x10.mx/m01.txt
If it helps any there should be no problem replacing the first three calls with nops:
call #004089F4 (:>initFEH) ;#00406000: 350 EF290000 v 00 00 1 1 call #00408C4F (:>initStack) ;#00406005: 350 452C0000 v 00 00 1 2 call #00406D32 (:>initFPU) ;#0040600A: 350 230D0000 v 00 00 1 3
If I'd got something working, then what I'd be doing right now would be adding format ELF64 to test\t01type.exw etc, and compiling/testing those (with the 32-bit compiler), one at a time by hand (probably with -nodiag).
I would also download https://github.com/eteran/edb-debugger and give that a spin
Pete
23. Re: iup // fails to load Linux so
- Posted by _tom (admin) Feb 06, 2017
- 2899 views
Porteus 32-bit
- OE 4.05 installed
- runs EuIUP from /user/lib
Porteus 32-bit
- Phix runs
- Phix does not like iup
guest@porteus:~/phix$ ./phix /demo/pGUI/alarm.exw link error: IupGetActionName error code 2, or_era=#08F87E92, or_ebp=#08CF8390, or_esp=#BFEE2F58 stack(#BFEE2F58): 08199FE2, 08F7E0E8, 00000002, BFEE33C9 stack(#BFEE2F68): BFEE33D0, 00000000, BFEE33E5, BFEE3410 stack(#BFEE2F78): BFEE3430, BFEE344D, BFEE3486, BFEE3491 stack(#BFEE2F88): BFEE34A1, BFEE34B2, BFEE34E9, BFEE34FB N=2, rtn=1452, from=#08F88902, ret=#08F8892A, prevebp=#08CF836C, ebproot=#08CF82D0 or_ecx=#08D82E00, or_edx=#00000000, or_esi=#42360B80, or_edi=#4201CFF5 vsb_prev=#0, vsb_next=#0, vsb_magic=40565342 ("@VSB") /home/guest/phix/demo/pGUI/pGUI.e:933 in procedure iup_link_error() attempt to divide by 0 name = "IupGetActionName" ... called from /home/guest/phix/demo/pGUI/pGUI.e:939 in function iup_c_func() dll = 150092240 name = "IupGetActionName" args = {} result = 33554436 handle = -1 ... called from /home/guest/phix/demo/pGUI/pGUI.e:1290 in procedure iup_init1() Global & Local Variables --> see /home/guest/phix/demo/pGUI\ex.err Press Enter...
Porteus 64-bit
$ ./phix no such file or directory
Aside: On my Mint18, I noticed a side effect of messing with iup. When clicking "create document" in the file browser I normally just see "empyt file" as the choice. Now, I see a directory of iup files!
_tom
24. Re: iup // fails to load Linux so
- Posted by petelomax Feb 06, 2017
- 2929 views
- Last edited Feb 13, 2017
One small step in the right direction:
In pbinary.e line 2227 I added a 64-bit loader:
string interpreter = "/lib/ld-linux.so.2\0" string interpreter64 = "/lib64/ld-linux-x86-64.so.2\0"
and changed the last 4 of the 8 uses accordingly.
Rebuilding m01 (uploaded as above) and running that gets me to "Segmentation fault" (Yeehah!).
There is quite probably a fair bit of relocation stuff missing...
Pete
EDIT: .. and patching out those three calls:
hello world
! ! !
EDIT2: missing push/pop rdi/rsi found in pHeap.e/LeaveCriticalSection....
EDIT3: got 32-bit working by following http://askubuntu.com/questions/454253/how-to-run-32-bit-app-in-ubuntu-64-bit
EDIT4: I know what the problem is now: it is creating a TCB (Thread control block) for the global pool, which should be 1028 bytes long, but then somehow creating another TCB at offset 32 inside the first TCB, and right now my gdb-fu (which would struggle to fight its way out of a wet paper bag) is not good enough to figure out precisely why.
EDIT5: installed a copy of fdbg for lnx64 which is way better than gdb (for my purposes anyway)
EDIT6: ... and libc works better if you use the right calling convention
EDIT7: I've got it to display a prompt!
25. Re: iup // fails to load Linux so
- Posted by petelomax Feb 08, 2017
- 2858 views
- Last edited Feb 09, 2017
I'm fine with changing the name of this forum to "Phix & OpenEuphoria" if that's what it takes.
Not quite sure whether I should say anything, but obviously I have no objections (and I could then link my rosettacode page here).
It did just suddenly strike me, out of some dark corner of my mind, and I had to check, but now I have got something to say:
It should rather be OpenEuphoria & Phix, in all fairness (and alphabetically!).
Pete
26. Re: iup // fails to load Linux so \\ (no solution wiki updated)
- Posted by euphoric (admin) Mar 04, 2017
- 2766 views
I only run Windows (under duress) in a virtual box. Can we conclude that for Windows programmers Eu3 and Phix are the best for writing a Windows gui?
I've had great success with Matt's wxEuphoria and EU4.x. So... no. I think that's the best combo for Windows programmers at the moment.