Recent

Author Topic: MSEide+MSEgui new release.  (Read 18001 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3623
    • StrumPract is the musicians best friend
Re: MSEide+MSEgui new release.
« Reply #15 on: April 10, 2024, 03:18:02 pm »
Hello Lazapas.

Quote
What is the minimum version requirement for GLIBC in Compile 5.10?

MSEgui needs indeed to link to some libc methods.
And some fpc RTL units too.
Depending on what OS you are using.

For Linux AMD64, the minimum version (and also assigned symbol table) is GLIBC_2.2.5.
For Linux i386 the minimum version (and also assigned symbol table) is GLIBC_2.0.

So, if you compile a msegui linux-AMD64 bit application, even linking with last new libc.so version, the old GLIBC_2.2.5. symbol table will be used in mselibc.pas unit.
And you will be able to run it on very old OS.
But for this you also need an fpc compiler (like this one)  which in its RTL has defined all LIBC methods with the GLIBC_2.2.5 table or compile the application on an older system with a old glibc symbol table, because with official fpc, at linking, the latest symbol table installed on the system will be assigned.

If you compile the msegui app on a system with last glibc symbol table using official fpc, the compilation/run will be ok on your system (or with same glibc) but you will not be able to run it on older system.

Quote
In mselibc.pas. I failed to compile mseide5.10 and probably no lxstat64 function.

What is your OS, what version of GLIBC do you have, (GLIBC_2.2.5 symbol table dates from + 20 years (2002-01-21) and is present in all newer version of glibc) ?
What error message do you have?

Note that there is a last MSEgui release 5.10.2.

Fre;D
 
« Last Edit: April 10, 2024, 05:46:06 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3623
    • StrumPract is the musicians best friend
Re: MSEide+MSEgui new release.
« Reply #16 on: April 10, 2024, 06:14:11 pm »
??? In what context? ??? FPC does not need glibc, nor do mseide or msegui. There is no dependency. What makes you think there is?

Hello Thaddy.

FPC himself indeed does not need glibc:

Code: Text  [Select][+][-]
  1. fred@fred-IdeaPad:~$ readelf --dyn-syms -W /usr/lib/fpc/3.2.2/ppcx64 | grep GLIBC
Result:
Quote
   

But some of his RTL does, for example Lazarus needs this:

Code: Bash  [Select][+][-]
  1. fred@fred-IdeaPad:~$ readelf --dyn-syms -W /home/fred/fpcupdeluxe/lazarus/lazarus | grep GLIBC
Result:
Quote
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND wcrtomb@GLIBC_2.2.5 (2)
    32: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND openlog@GLIBC_2.2.5 (2)
    66: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tcsetattr@GLIBC_2.2.5 (2)
    71: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tcgetattr@GLIBC_2.2.5 (2)
   105: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlopen@GLIBC_2.34 (3)
   110: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND closelog@GLIBC_2.2.5 (2)
   129: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mbrtowc@GLIBC_2.2.5 (2)
   194: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND iconv@GLIBC_2.2.5 (2)
   269: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND read@GLIBC_2.2.5 (2)
   361: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND wcscoll@GLIBC_2.2.5 (2)
   374: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlerror@GLIBC_2.34 (3)
   404: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND ptsname_r@GLIBC_2.2.5 (2)
   409: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND grantpt@GLIBC_2.2.5 (2)
   442: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND syslog@GLIBC_2.2.5 (2)
   474: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND openpty@GLIBC_2.34 (3)
   515: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.34 (3)
   574: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND nl_langinfo@GLIBC_2.2.5 (2)
   589: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND towlower@GLIBC_2.2.5 (2)
   612: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __errno_location@GLIBC_2.2.5 (2)
   640: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sched_yield@GLIBC_2.2.5 (2)
   764: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND iconv_close@GLIBC_2.2.5 (2)
   785: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlclose@GLIBC_2.34 (3)
   795: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND login_tty@GLIBC_2.34 (3)
   802: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.34 (3)
   834: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND close@GLIBC_2.2.5 (2)
   932: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dladdr@GLIBC_2.34 (3)
   984: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND getpt@GLIBC_2.2.5 (2)
  1035: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND setenv@GLIBC_2.2.5 (2)
  1062: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND setlocale@GLIBC_2.2.5 (2)
  1064: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcoll@GLIBC_2.2.5 (2)
  1097: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mbrlen@GLIBC_2.2.5 (2)
  1143: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fcntl@GLIBC_2.2.5 (2)
  1186: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND iconv_open@GLIBC_2.2.5 (2)
  1205: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sysconf@GLIBC_2.2.5 (2)
  1229: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND unlockpt@GLIBC_2.2.5 (2)
  1276: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND write@GLIBC_2.2.5 (2)
  1296: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND towupper@GLIBC_2.2.5 (2)
  1306: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.2.5 (2)

And MSEide also needs some GLIBC methods (but all are assigned in code with table symbol @GLIBC_2.2.5).

[EDIT]

Here demo of dependencies using unit cthreads:

Code: Pascal  [Select][+][-]
  1. program glibc_demo;
  2. uses
  3.   cthreads;
  4. begin
  5. end.

--->

Code: Pascal  [Select][+][-]
  1. fred@fred-IdeaPad:~$ readelf --dyn-syms -W glibc_demo | grep GLIBC
Result:
 
Quote
1: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.34 (2)
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __errno_location@GLIBC_2.2.5 (3)
     3: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dladdr@GLIBC_2.34 (2)
     4: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sched_yield@GLIBC_2.2.5 (3)
     5: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlopen@GLIBC_2.34 (2)
     7: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.34 (2)
     8: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlclose@GLIBC_2.34 (2)
« Last Edit: April 10, 2024, 06:41:50 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Thaddy

  • Hero Member
  • *****
  • Posts: 17201
  • Ceterum censeo Trump esse delendam
Re: MSEide+MSEgui new release.
« Reply #17 on: April 10, 2024, 06:53:42 pm »
Fred, that is not the RTL, but Lazarus itself and that should have been mitigated unless it is documented that there is a dependency on glibc. That need not be a problem, but it is a mis-representation of the RTL.
On most platforms (not all) the real RTL is glibc free and where it's not it could be implemented in FPC too. (Just sloppy programming or laziness, opinionated, I know)

In the case of mse* I wonder who introduced that? AFAIK there were no dependencies.
But I haven't used it for years.
« Last Edit: April 10, 2024, 06:59:10 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Fred vS

  • Hero Member
  • *****
  • Posts: 3623
    • StrumPract is the musicians best friend
Re: MSEide+MSEgui new release.
« Reply #18 on: April 10, 2024, 06:58:53 pm »
Fred, that is not the RTL, but Lazarus itself and that should have been mitigated unless it is documented that there is a dependency on glibc. That need not be a problem, but it is a mis-representation of the RTL.

Hello Thaddy.
Sorry, I should write "in some of the units provided by FPC".
Did you read the [EDIT] of my previous post?
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Thaddy

  • Hero Member
  • *****
  • Posts: 17201
  • Ceterum censeo Trump esse delendam
Re: MSEide+MSEgui new release.
« Reply #19 on: April 10, 2024, 06:59:55 pm »
Did you read mine? ;)
ALL of that code should be fixed.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Fred vS

  • Hero Member
  • *****
  • Posts: 3623
    • StrumPract is the musicians best friend
Re: MSEide+MSEgui new release.
« Reply #20 on: April 10, 2024, 07:15:06 pm »
In the case of mse* I wonder who introduced that? AFAIK there were no dependencies.

For Unix OS, afaik, mselibc.pas and his libc.so dependencies was there from the beginning and, of course, done by Martin.

Quote
Did you read mine? ;)
ALL of that code should be fixed.
Quote
On most platforms (not all) the real RTL is glibc free and where it's not it could be implemented in FPC too. (Just sloppy programming or laziness, opinionated, I know)

I fear that I dont understand once again.
For Unix systems and fpc 3.2.2, using cthreads, at linking, some libc methods are added.
So maybe some os are glibc free but not yet Linux, FreeBSD, NetBSD, OpenBSD (or I miss a BIG thing).
« Last Edit: April 10, 2024, 07:18:42 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Thaddy

  • Hero Member
  • *****
  • Posts: 17201
  • Ceterum censeo Trump esse delendam
Re: MSEide+MSEgui new release.
« Reply #21 on: April 10, 2024, 08:26:57 pm »
In the case of mse* I wonder who introduced that? AFAIK there were no dependencies.

For Unix OS, afaik, mselibc.pas and his libc.so dependencies was there from the beginning and, of course, done by Martin.


Then we should get rid of glibc. Are you really sure Martin introduced that? I am not convinced.
That would be quite the opposite of what he tried to achieve. So I don't believe that.
(for KOL we simply rewrote any dependencies, so I am familiar with that, afaik Martin had the same aproach)
« Last Edit: April 10, 2024, 08:37:58 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Fred vS

  • Hero Member
  • *****
  • Posts: 3623
    • StrumPract is the musicians best friend
Re: MSEide+MSEgui new release.
« Reply #22 on: April 10, 2024, 09:30:41 pm »
Are you really sure Martin introduced that? I am not convinced.

Yes, unit mselibc.pas was added by Martin in release 2.0 of MSEgui date 2009-03-01 in /lib/kernel.
https://sourceforge.net/projects/mseide-msegui/files/mseide-msegui/2.0/mseide_msegui_src_2_0.zip/download

Before that release, MSEgui used libc.pp and other units from FPC source.
mselibc.pas regroup all the units of libc package needed for MSEgui.

Quote
Then we should get rid of glibc.

With pleasure and I vote for you as creator.  ;)
« Last Edit: April 10, 2024, 09:35:19 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Thaddy

  • Hero Member
  • *****
  • Posts: 17201
  • Ceterum censeo Trump esse delendam
Re: MSEide+MSEgui new release.
« Reply #23 on: April 10, 2024, 09:46:35 pm »
If you help me? Handshake... Should not be too difficult
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Fred vS

  • Hero Member
  • *****
  • Posts: 3623
    • StrumPract is the musicians best friend
Re: MSEide+MSEgui new release.
« Reply #24 on: April 10, 2024, 10:08:03 pm »
If you help me? Handshake... Should not be too difficult

Of course (but I am only a explorer, not a guru).
(One of) The biggest problem is to find a workaround for those methods:

Code: Pascal  [Select][+][-]
  1. _libc_start_main
  2. dladdr
  3. sched_yield
  4. dlopen
  5. dlsym
  6. dlclose

That needs asm code and for this I cannot help.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3623
    • StrumPract is the musicians best friend
Re: MSEide+MSEgui new release.
« Reply #25 on: April 10, 2024, 11:25:32 pm »
In mselibc.pas. I failed to compile mseide5.10 and probably no lxstat64 function.

Re hello Lazpas.

Are you trying to compile a MSEgui app on Linux i386 (32 bit)?
If so, indeed there was a bug in  lxstat64 and  fxstat64 (need table @GLIBC_2.2, not @GLIBC_2.0) that is fixed in last commit just now.

Could you try with last source:
https://github.com/mse-org/mseide-msegui/archive/refs/heads/main.zip

Anyway, many thanks to have noted this bug.

Fre;D
« Last Edit: April 10, 2024, 11:37:02 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Thaddy

  • Hero Member
  • *****
  • Posts: 17201
  • Ceterum censeo Trump esse delendam
Re: MSEide+MSEgui new release.
« Reply #26 on: April 11, 2024, 07:48:50 am »
Code: Pascal  [Select][+][-]
  1. _libc_start_main
  2. dladdr
  3. sched_yield
  4. dlopen
  5. dlsym
  6. dlclose
I can do that. at least two of those do not need assembler.
When needed I can write asm for intel and arm
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12269
  • FPC developer.
Re: MSEide+MSEgui new release.
« Reply #27 on: April 11, 2024, 09:46:31 am »
libc_start_main is the startup code for the libc unit. If you don't link to it, you don't need to call it.

cthreads,cmem,clocale and users unit all pull in libc.

lazpas

  • Jr. Member
  • **
  • Posts: 86
Re: MSEide+MSEgui new release.
« Reply #28 on: April 11, 2024, 11:40:58 am »
Hi,Fred

Quote
What is your OS, what version of GLIBC do you have, (GLIBC_2.2.5 symbol table dates from + 20 years (2002-01-21) and is present in all newer version of glibc) ?
What error message do you have?

My OS is lxpupprecise,a fork of puppylinux。GLIBC is 2.15.



« Last Edit: April 12, 2024, 11:23:30 am by lazpas »

lazpas

  • Jr. Member
  • **
  • Posts: 86
Re: MSEide+MSEgui new release.
« Reply #29 on: April 11, 2024, 11:52:30 am »
Quote
Are you trying to compile a MSEgui app on Linux i386 (32 bit)?
If so, indeed there was a bug in  lxstat64 and  fxstat64 (need table @GLIBC_2.2, not @GLIBC_2.0) that is fixed in last commit just now.

Yes,it is Linux i386,32bit.

Sorry, I should have provided this information earlier.

Quote

Could you try with last source:
https://github.com/mse-org/mseide-msegui/archive/refs/heads/main.zip

Thank you very much for your work. I'm going to try it.

 

TinyPortal © 2005-2018