# gdk-pixbuf2 problem



## YuryG (May 10, 2022)

I've upgraded gdk-pixbuf2 from ports, it builds but leaves a .core file in the ports' directory (not in work subdirectory).
And then I cannot build gtk2 port due to error in gdk-pixbuf2 work ("unknown file format" for apple-red.png file).
I've rebuilt all dependencies, but without luck.


----------



## 3301 (May 10, 2022)

Please provide at least FreeBSD version and output log from build. Have you tried to debug that .core file?


----------



## YuryG (May 10, 2022)

3301 said:


> Please provide at least FreeBSD version and output log from build. Have you tried to debug that .core file?


version:
FreeBSD 12.3-STABLE r371944 amd64

In graphics/gdk-pixbuf2 directory.
I tried to debug that gdk-pixbuf-query-lo.core file (which occurs during install stage of `make`), although I'm not that good with `gdb`:

```
[New LWP 100340]

warning: Unexpected size of section `.reg-xstate/100340' in core file.
Core was generated by `/usr/local/bin/gdk-pixbuf-query-loaders --update-cache'.
Program terminated with signal SIGSEGV, Segmentation fault.
Invalid permissions for mapped object.

warning: Unexpected size of section `.reg-xstate/100340' in core file.
#0  0x00000008016a1c88 in ?? ()
```

Error in the end of x11-toolkits/gtk20 building process:

```
Making all in demos
gmake[4]: Entering directory '/usr/ports/x11-toolkits/gtk20/work/gtk+-2.24.33/demos'
/usr/local/bin/gdk-pixbuf-csource --raw --build-list        \
        apple_red  ./apple-red.png    \
                gnome_foot ./gnome-foot.png    \
        > test-inline-pixbufs.h                \
|| (rm -f test-inline-pixbufs.h && false)
failed to load "./apple-red.png": Couldnâ€™t recognize the image file format for file â€œ./apple-red.pngâ€
gmake[4]: *** [Makefile:1044: test-inline-pixbufs.h] Error 1
gmake[4]: Leaving directory '/usr/ports/x11-toolkits/gtk20/work/gtk+-2.24.33/demos'
gmake[3]: *** [Makefile:730: all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/x11-toolkits/gtk20/work/gtk+-2.24.33'
gmake[2]: *** [Makefile:622: all] Error 2
gmake[2]: Leaving directory '/usr/ports/x11-toolkits/gtk20/work/gtk+-2.24.33'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/x11-toolkits/gtk20
*** Error code 1

Stop.
make: stopped in /usr/ports/x11-toolkits/gtk20
```

graphics/gdk-pixbuf2 build log: http://94.180.119.80/logs_/build.log
graphics/gdk-pixbuf2 install log: http://94.180.119.80/logs_/install.log
x11-toolkits/gtk20 build log: http://94.180.119.80/logs_/build_gtk20.log
The core file: http://94.180.119.80/logs_/gdk-pixbuf-query-lo.core


----------



## 3301 (May 11, 2022)

Googling for the build output gives some ancient results there and there . There you should find some hints how to patch underlying libraries.


----------



## YuryG (May 11, 2022)

3301 said:


> Googling for the build output gives some ancient results there and there . There you should find some hints how to patch underlying libraries.


Cannot find any solutions there (in MacBook threads?). Could you help me?


----------



## 3301 (May 11, 2022)

> Ok, I think the issue here was that libgio in glib2 was incorrectly built.  Simply rebuilding glib2 was insufficient.  I needed to rebuild gdk-pixbuf2 against the fixed glib2.  I fixed glib2 in r91791 and bumped gdk-pixbuf2 to force a rebuild in r91792.


So looks like glib2 have to be "fixed" (patched), and only then rebuilt. But later in this thread they state that the patch was removed in revision r91990 . I would consider patching glib2 source, rebuild it and then try to rebuild gdk-pixbuf2. Or maybe hack some solution around - "fixing" apple-red.png or disable part of compilation causing the error if possible (they were mentioning demos).


----------



## SirDice (May 11, 2022)

3301 why are you referring to MacPorts? That ports tree has nothing to do with FreeBSD.


----------



## 3301 (May 11, 2022)

SirDice said:


> 3301 why are you referring to MacPorts? That ports tree has nothing to do with FreeBSD.


Because error message is the same, and I believe a lot of open-source libraries bring same problems to different oses.


----------



## YuryG (May 11, 2022)

Rebuilt glib2 with uninstalled gdk-pixbuf2, then installed gdk-pixbuf2 with the same results. Do not see what patches to apply.

So, now I do not have working MATE (my chosen graphics environment).


----------



## YuryG (May 13, 2022)

By the way, being left without graphical environment at the moment, I get one text-mode feature _very _annoying (vt console): How to make NUM LOCK default ON on all new ttys?

And I couldn't find, where else to post this question on the forums.


----------



## SirDice (May 13, 2022)

YuryG said:


> How to make NUM LOCK default ON on all new ttys?


That's usually set in the BIOS.


----------



## YuryG (May 13, 2022)

SirDice said:


> That's usually set in the BIOS.


I'm not so sure, as far as I remember, NUM is ON in BIOS, and it was ON in old sc terminal driver.


----------



## YuryG (May 14, 2022)

SirDice said:


> That's usually set in the BIOS.


Just checked. NUM is ON after BIOS work, it is still ON during FreeBSD loader menu and becomes OFF only when vt driver starts (or somewgere near that point). It is annoying for me. Can't imaging situation when I turn it OFF having a working 102-keys keyboard. May be there should be (already is) some tunable to change it?


----------



## MG (Jul 10, 2022)

Currently encountering the same problem. Deleted the "demos" reference in ...work/gtk+x.xx.xx/Makefile Have to make a package myself since "'make package" fails here.

The error doesn't make any sense to me. I can open png files. I think this is a thing that should be prevented for major ports like GTK...


----------

