1. iup // fails to load Linux so

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

new topic     » topic index » view message » categorize

2. Re: iup // fails to load Linux so

_tom said...

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

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

3. Re: iup // fails to load Linux so

_tom said...

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.

_tom said...

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?

_tom said...

Finding dependencies and compiling with `C` is no way to provide a gui for OE.

Agreed

Pete

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

4. Re: iup // fails to load Linux so

Senator said...

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.

Senator said...

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

Senator said...

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

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

5. Re: iup // fails to load Linux so

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

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

6. Re: iup // fails to load Linux so

_tom said...

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.

_tom said...

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 

_tom said...

* there is no simple multi-platform gui

I'm working on that.

-Greg

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

7. Re: iup // fails to load Linux so

Senator said...

I think IUP is dead in the water and references to that GUI should be deleted from the OpenEuphoria wiki pages.

Pete Lomax said...

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.

Senator said...

New users will not be encouraged to use Euphoria after running around in circles with the IUP toolkit.

Pete Lomax said...

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

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

8. Re: iup // fails to load Linux so \\ (no solution wiki updated)

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

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

9. Re: iup // fails to load Linux so

ghaberek said...

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.

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

10. Re: iup // fails to load Linux so

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

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

11. Re: iup // fails to load Linux so

Maybe it would be worth asking on the IUP mailing list, that Antonio Scuri chap can be very helpful.

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

12. Re: iup // fails to load Linux so

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

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

13. Re: iup // fails to load Linux so

_tom said...

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

_tom said...

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

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

14. Re: iup // fails to load Linux so

petelomax said...

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

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

15. Re: iup // fails to load Linux so

_tom said...

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.

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

16. Re: iup // fails to load Linux so

jimcbrown said...
_tom said...

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

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

17. Re: iup // fails to load Linux so

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

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

18. Re: iup // fails to load Linux so

petelomax said...

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

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

19. Re: iup // fails to load Linux so

jimcbrown said...

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

jimcbrown said...

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

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

20. Re: iup // fails to load Linux so

petelomax said...

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

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

21. Re: iup // fails to load Linux so

petelomax said...
jimcbrown said...

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

petelomax said...

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

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

22. Re: iup // fails to load Linux so

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

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

23. Re: iup // fails to load Linux so

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

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

24. Re: iup // fails to load Linux so

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

! ! ! smile

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 oops

EDIT7: I've got it to display a prompt!

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

25. Re: iup // fails to load Linux so

jimcbrown said...

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

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

26. Re: iup // fails to load Linux so \\ (no solution wiki updated)

_tom said...

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu