Re: [e-users] error on statically linked programs that use imlib2 static libraries

2023-07-26 Thread ruivlea via enlightenment-users
this make things clear. thankyou. so, shared only.
i tried build it static because in configure --help there is:
--enable-shared[=PKGS]  build shared libraries [default=yes]
--enable-static[=PKGS]  build static libraries [default=yes]

--- Original Message ---
On Thursday, July 27th, 2023 at 4:49 AM, Carsten Haitzler 
 wrote:


> On Wed, 26 Jul 2023 18:36:45 + ruivlea via enlightenment-users
> enlightenment-users@lists.sourceforge.net said:
>
> > hello,
> >
> > i tried to statically build programs (scrot and nsxiv) that use imlib2. They
> > can be built. But unusable. *scrot:
> > % scrot -s
> > scrot: Saving to file 2023-07-26-181818_137x107_scrot.png failed
> >
> > *nsxiv:
> > % nsxiv /home/ruivlea/downloads/sample-1.gif
> > nsxiv: /home/ruivlea/downloads/sample-1.gif: Error opening image
> > nsxiv: no more files to display, aborting
> >
> > tried open png and jpg, same result.
> > But both scrot and nsxiv usable and works well if shared linked.
> > is imlib2 designed only for shared linked programs? or is there a bug on
> > imlib2 static libraries?
>
>
> You can't do this due to the way imlib2 was designed to work with loader
> modules. So shared lib linking only. Evas is similar but actually can be built
> in a way to inline loaders too and then allow for functional static linking.
> Evas is what replaced Imlib2.
>
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> Carsten Haitzler - ras...@rasterman.com


___
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users


Re: [e-users] error on statically linked programs that use imlib2 static libraries

2023-07-26 Thread Carsten Haitzler
On Wed, 26 Jul 2023 18:36:45 + ruivlea via enlightenment-users
 said:

> hello,
> 
> i tried to statically build programs (scrot and nsxiv) that use imlib2. They
> can be built. But unusable. *scrot:
> % scrot -s
> scrot: Saving to file 2023-07-26-181818_137x107_scrot.png failed
> 
> *nsxiv:
> % nsxiv /home/ruivlea/downloads/sample-1.gif
> nsxiv: /home/ruivlea/downloads/sample-1.gif: Error opening image
> nsxiv: no more files to display, aborting
> 
> tried open png and jpg, same result.
> But both scrot and nsxiv usable and works well if shared linked.
> is imlib2 designed only for shared linked programs? or is there a bug on
> imlib2 static libraries?

You can't do this due to the way imlib2 was designed to work with loader
modules. So shared lib linking only. Evas is similar but actually can be built
in a way to inline loaders too and then allow for functional static linking.
Evas is what replaced Imlib2.


-- 
- Codito, ergo sum - "I code, therefore I am" --
Carsten Haitzler - ras...@rasterman.com



___
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users


Re: [e-users] error on statically linked programs that use imlib2 static libraries

2023-07-26 Thread Kim Woelders
As is, things will not work when using -static. The loaders are loaded 
dynamically as separate shared objects.


One reason to do this is to avoid loading all libraries used by all 
loaders (libpng, librsvg2, etc., and their dependencies) at application 
startup but defer it until needed.
Another is to isolate applications using imlib2 from the licencing of 
the libraries used by the loaders.


/Kim


On 2023-07-26 22:13, ruivlea via enlightenment-users wrote:

i rebuilt imlib2 static libraries only:

export CFLAGS="-g2"
export LDFLAGS="$LDFLAGS -static"

./configure \
 --build=x86_64-unknown-linux-musl \
 --prefix=/usr \
 --sysconfdir=/etc/imlib2 \
 --disable-shared \
 --enable-debug \
 --without-svg \
 --without-tiff \
 --without-bz2 \
 --without-zlib \
 --without-lzma \
 --without-j2k

and tried this:

% gdb imlib2_view
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
 .

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from imlib2_view...
(gdb) run ~/downloads/sample-1.gif
Starting program: /usr/bin/imlib2_view ~/downloads/sample-1.gif
No loadable image
[Inferior 1 (process 5683) exited normally]
(gdb) run -d ~/downloads/sample-1.gif
Starting program: /usr/bin/imlib2_view -d ~/downloads/sample-1.gif
  Cache usage: 0/4194304
No loadable image
[Inferior 1 (process 5694) exited normally]
(gdb) bt
No stack.
(gdb)

using static libraries image failed to open.

then i rebuilt imlib2 both static and shared libraries:

export CFLAGS="-g2"

./configure \
 --build=x86_64-unknown-linux-musl \
 --prefix=/usr \
 --sysconfdir=/etc/imlib2 \
 --enable-debug \
 --without-svg \
 --without-tiff \
 --without-bz2 \
 --without-zlib \
 --without-lzma \
 --without-j2k

and tried:
% gdb imlib2_view
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
 .

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from imlib2_view...
(gdb) run -d ~/downloads/sample-1.gif
Starting program: /usr/bin/imlib2_view -d ~/downloads/sample-1.gif
  Cache usage: 0/4194304
U=0,0 350x233 F=0,0 350x233 O=0,0 350x233
  Screen WxH=1888x1048
  Window WxH=350x233
  Render 0,0 350x233 -> 0,0
  Update 0,0 350x233
  Paint  0,0 350x233
  showing frame 1/18 (x,y=0,0, wxh=350x233 T=100)
  Cache usage: 0/4194304
U=0,0 350x233 F=0,0 350x233 O=0,0 350x233
  Render 0,0 350x233 -> 0,0
  Update 0,0 350x233
  Paint  0,0 350x233
  showing frame 2/18 (x,y=0,0, wxh=350x233 T=100)
  Cache usage: 0/4194304
U=0,0 350x233 F=0,0 350x233 O=0,0 350x233
  Render 0,0 350x233 -> 0,0
  Update 0,0 350x233
  Paint  0,0 350x233
  showing frame 3/18 (x,y=0,0, wxh=350x233 T=100)
  Cache usage: 0/4194304
[Inferior 1 (process 17927) exited normally]
(gdb) q

image successfully opened. the gif file animation played normally.

--- Original Message ---
On Wednesday, July 26th, 2023 at 7:00 PM, Benoît-Pierre Demaine 
 wrote:



You need to build with debug symbols, and run in debugger. Nobody can
help you with that few infos.

On 26/07/2023 20:36, ruivlea via enlightenment-users wrote:


hello,

i tried to statically build programs (scrot and nsxiv) that use imlib2. They 
can be built. But unusable.
*scrot:
% scrot -s
scrot: Saving to file 2023-07-26-181818_137x107_scrot.png failed

*nsxiv:
% nsxiv /home/ruivlea/downloads/sample-1.gif
nsxiv: /home/ruivlea/downloads/sample-1.gif: Error opening image
nsxiv: no more files to display, aborting

tried open png and jpg, same result.
But both scrot and nsxiv usable and works well if shared linked.
is imlib2 designed only for shared linked programs? or is there a bug on imlib2 
static libraries?

___
enlightenment-users mailing list

Re: [e-users] error on statically linked programs that use imlib2 static libraries

2023-07-26 Thread ruivlea via enlightenment-users
i rebuilt imlib2 static libraries only:

export CFLAGS="-g2"
export LDFLAGS="$LDFLAGS -static"

./configure \
--build=x86_64-unknown-linux-musl \
--prefix=/usr \
--sysconfdir=/etc/imlib2 \
--disable-shared \
--enable-debug \
--without-svg \
--without-tiff \
--without-bz2 \
--without-zlib \
--without-lzma \
--without-j2k

and tried this:

% gdb imlib2_view
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from imlib2_view...
(gdb) run ~/downloads/sample-1.gif
Starting program: /usr/bin/imlib2_view ~/downloads/sample-1.gif
No loadable image
[Inferior 1 (process 5683) exited normally]
(gdb) run -d ~/downloads/sample-1.gif
Starting program: /usr/bin/imlib2_view -d ~/downloads/sample-1.gif
 Cache usage: 0/4194304
No loadable image
[Inferior 1 (process 5694) exited normally]
(gdb) bt
No stack.
(gdb)

using static libraries image failed to open.

then i rebuilt imlib2 both static and shared libraries:

export CFLAGS="-g2"

./configure \
--build=x86_64-unknown-linux-musl \
--prefix=/usr \
--sysconfdir=/etc/imlib2 \
--enable-debug \
--without-svg \
--without-tiff \
--without-bz2 \
--without-zlib \
--without-lzma \
--without-j2k

and tried:
% gdb imlib2_view
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from imlib2_view...
(gdb) run -d ~/downloads/sample-1.gif 
Starting program: /usr/bin/imlib2_view -d ~/downloads/sample-1.gif
 Cache usage: 0/4194304
U=0,0 350x233 F=0,0 350x233 O=0,0 350x233
 Screen WxH=1888x1048
 Window WxH=350x233
 Render 0,0 350x233 -> 0,0
 Update 0,0 350x233
 Paint  0,0 350x233
 showing frame 1/18 (x,y=0,0, wxh=350x233 T=100)
 Cache usage: 0/4194304
U=0,0 350x233 F=0,0 350x233 O=0,0 350x233
 Render 0,0 350x233 -> 0,0
 Update 0,0 350x233
 Paint  0,0 350x233
 showing frame 2/18 (x,y=0,0, wxh=350x233 T=100)
 Cache usage: 0/4194304
U=0,0 350x233 F=0,0 350x233 O=0,0 350x233
 Render 0,0 350x233 -> 0,0
 Update 0,0 350x233
 Paint  0,0 350x233
 showing frame 3/18 (x,y=0,0, wxh=350x233 T=100)
 Cache usage: 0/4194304
[Inferior 1 (process 17927) exited normally]
(gdb) q

image successfully opened. the gif file animation played normally.

--- Original Message ---
On Wednesday, July 26th, 2023 at 7:00 PM, Benoît-Pierre Demaine 
 wrote:


> You need to build with debug symbols, and run in debugger. Nobody can
> help you with that few infos.
> 
> On 26/07/2023 20:36, ruivlea via enlightenment-users wrote:
> 
> > hello,
> > 
> > i tried to statically build programs (scrot and nsxiv) that use imlib2. 
> > They can be built. But unusable.
> > *scrot:
> > % scrot -s
> > scrot: Saving to file 2023-07-26-181818_137x107_scrot.png failed
> > 
> > *nsxiv:
> > % nsxiv /home/ruivlea/downloads/sample-1.gif
> > nsxiv: /home/ruivlea/downloads/sample-1.gif: Error opening image
> > nsxiv: no more files to display, aborting
> > 
> > tried open png and jpg, same result.
> > But both scrot and nsxiv usable and works well if shared linked.
> > is imlib2 designed only for shared linked programs? or is there a bug on 
> > imlib2 static libraries?
> > 
> > ___
> > enlightenment-users mailing list
> > enlightenment-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-users
> 
> 
> 
> --
> 
> > o_/ DEMAINE Benoît-Pierre (aka DoubleHP) http://benoit.demaine.info/
> 
> If computing were an exact science, IT engineers would'nt have work \_o<
> 
> "So all that's left, Is the proof that love's not only blind but deaf."
> (FAKE TALES OF SAN FRANCISCO, Arctic Monkeys)
> 
> 
> 
> 

Re: [e-users] error on statically linked programs that use imlib2 static libraries

2023-07-26 Thread Benoît-Pierre Demaine
You need to build with debug symbols, and run in debugger. Nobody can 
help you with that few infos.


On 26/07/2023 20:36, ruivlea via enlightenment-users wrote:

hello,

i tried to statically build programs (scrot and nsxiv) that use imlib2. They 
can be built. But unusable.
*scrot:
% scrot -s
scrot: Saving to file 2023-07-26-181818_137x107_scrot.png failed

*nsxiv:
% nsxiv /home/ruivlea/downloads/sample-1.gif
nsxiv: /home/ruivlea/downloads/sample-1.gif: Error opening image
nsxiv: no more files to display, aborting

tried open png and jpg, same result.
But both scrot and nsxiv usable and works well if shared linked.
is imlib2 designed only for shared linked programs? or is there a bug on imlib2 
static libraries?


___
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users



--
 >o_/ DEMAINE Benoît-Pierre (aka DoubleHP) http://benoit.demaine.info/
If computing were an exact science, IT engineers would'nt have work \_o<

"So all that's left, Is the proof that love's not only blind but deaf."
(FAKE TALES OF SAN FRANCISCO, Arctic Monkeys)



___
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users