Menu

#785 mgrx-x11

closed
nobody
Normal
New
2022-08-15
2022-08-11
Pap
No

'''Homepage:'''
https://www.fgrim.com/mgrx

'''Package:'''
https://people.salixos.org/papasot/salix/mgrx-x11/mgrx-x11-1.4.1-i586-1pp.md5
https://people.salixos.org/papasot/salix/mgrx-x11/mgrx-x11-1.4.1-i586-1pp.txz
https://people.salixos.org/papasot/salix/mgrx-x11/mgrx-x11-1.4.1-i586-1pp.dep
https://people.salixos.org/papasot/salix/mgrx-x11/mgrx-x11-1.4.1-i586-1pp.src

'''Log:'''
https://people.salixos.org/papasot/salix/mgrx-x11/build-mgrx-x11-1.4.1-i586-1pp.log

'''Buildscript and source:'''
https://people.salixos.org/papasot/salix/mgrx-x11/SLKBUILD
https://www.fgrim.com/mgrx/zfiles/mgrx141.tar.gz
https://people.salixos.org/papasot/salix/mgrx-x11/makedefs.sed
https://people.salixos.org/papasot/salix/mgrx-x11/makedefs32.sed
https://people.salixos.org/papasot/salix/mgrx-x11/examples.txt
[[BR]]
[[BR]]
[[BR]]
'''Homepage:'''
https://www.fgrim.com/mgrx

'''Package:'''
https://people.salixos.org/papasot/salix/mgrx-x11/mgrx-x11-1.4.1-x86_64-1pp.md5
https://people.salixos.org/papasot/salix/mgrx-x11/mgrx-x11-1.4.1-x86_64-1pp.txz
https://people.salixos.org/papasot/salix/mgrx-x11/mgrx-x11-1.4.1-x86_64-1pp.dep
https://people.salixos.org/papasot/salix/mgrx-x11/mgrx-x11-1.4.1-x86_64-1pp.src

'''Log:'''
https://people.salixos.org/papasot/salix/mgrx-x11/build-mgrx-x11-1.4.1-x86_64-1pp.log

'''Buildscript and source:'''
https://people.salixos.org/papasot/salix/mgrx-x11/SLKBUILD
https://www.fgrim.com/mgrx/zfiles/mgrx141.tar.gz
https://people.salixos.org/papasot/salix/mgrx-x11/makedefs.sed
https://people.salixos.org/papasot/salix/mgrx-x11/makedefs32.sed
https://people.salixos.org/papasot/salix/mgrx-x11/examples.txt

Discussion

  • Pap

    Pap - 2022-08-11

    A graphics and GUI library for X, which I find very easy to use. It is basically the modern version of the old GRX library. Please include if it's not too late.

     
  • George Vlahavas

    George Vlahavas - 2022-08-12

    Hi, the correct CFLAGS are not used. A

    sed "s/ -O1 / $CFLAGS /"
    

    on makedefs.grx should probably fix it.

     
  • Pap

    Pap - 2022-08-12

    The developer doesn't use $CFLAGS at all. Instead, he uses $CCOPT for the same purpose, which is defined at line 52 of makedefs.grx, and sets (among others) optimization level -O1. This is indeed the optimization flag used in every source file compiled, as you can verify in the log files.
    I compiled tests included in the source and they all work as expected. I don't think there is a problem here.

     

    Last edit: Pap 2022-08-12
  • George Vlahavas

    George Vlahavas - 2022-08-12

    -O1 is not really a problem, although -O2 would be preferable, the problem is really with -fPIC in 64bit and -march=i586 -mtune=i686 in 32bit. Of course they work on your PC, since that's where you compiled them, but if you want them to be used in other PCs as well, you have to use the right options. The CFLAGS variable is already set by SLKBUILD so you can use the sed command I posted to use the correct flags.

     
    • Pap

      Pap - 2022-08-13

      Substituting -O1 with $(CFLAGS) works, but in 64-bit this adds -fPIC, while the developer's makefiles add it as well when building the shared library, so we would have a (harmless) duplicate. To avoid this anyway, I modified $(CFLAGS) in SLKBUILD with a simple sed command that cuts "-fPIC" from $(CFLAGS). I also simplified the rest of the sed commands needed.
      Compilation is now done with -O2 (the developer said he just prefers -O1, but it's not mandatory).
      The links above were updated, and I tested the resulting packages by compiling complex applications using the library without any issues.

       
      • George Vlahavas

        George Vlahavas - 2022-08-14

        I'm afraid -fPIC should be used for the static library too. You don't need to use that sed. And it doesn't matter if an option is specified multiple times.

         
        • Pap

          Pap - 2022-08-15

          Ok, I recompiled everything without the offending sed. Links above point to the updated files.

          I thought -fPIC is not needed when compiling a static library, because no runtime relocation is necessary, therefore position independent code is not needed. Doing so anyway is harmless, but it will have a (very slight) impact performance-wise, because it adds one more calculation for each function call (its address), which is necessary in shared but in static it seems overkill to me. Maybe I am missing something here.
          I see in Salix -fPIC is set by default (in 64-bit), and I assumed this is because in general we do shared libraries, not static (although I prefer to have both available, and use shared mostly, but sometimes static is convenient). I know this is a busy time for you to explain things, but a blog post or something about that, whenever there is time for that, would be useful.

           
  • George Vlahavas

    George Vlahavas - 2022-08-15
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB