Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FTBS] v0.63.3 with grfcodec-r.367124d -- libpng error: iCCP: known incorrect sRGB profile #806

Closed
Corin-EU opened this issue Jan 15, 2025 · 2 comments

Comments

@Corin-EU
Copy link

Corin-EU commented Jan 15, 2025

This is on openSUSE Leap 15.6.

Updated grfcode from rather old GIT version of r.7ded8eb to latest grfcodec-r.367124d, so that could be the cause of the problem or is it the jgrpp "orig_extra.grf" file?

The updated source for OpenTTD-jgrpp from v0.62 (never had build failure before) to latest v0.63.3 and all compiles fine until

 [ 88%] Copying chars.png sprite file
 [ 88%] Generating orig_extra.grf
 libpng error: iCCP: known incorrect sRGB profile
 CMake Error at /usr/src/build/OpenTTD-jgrpp-0.63.3/cmake/scripts/CreateGRF.cmake:61 (message):
   GRFCodec failed

 make[2]: *** [media/baseset/orig_extra/CMakeFiles/orig_extra.grf.dir/build.make:102: /usr/src/build/OpenTTD-jgrpp-0.63.3/media/baseset/orig_extra.grf] Error 1
 make[1]: *** [CMakeFiles/Makefile2:3183: media/baseset/orig_extra/CMakeFiles/orig_extra.grf.dir/all] Error 2
 make: *** [Makefile:166: all] Error 2

Using g++-13 (SUSE Linux) 13.3.0 with /usr/lib64/libpng.so -> libpng17.so (version 1.7.0)

Verbose make output to show more details of the step which has the error -

  cd /usr/src/build/OpenTTD-jgrpp-0.63.3/build/media/baseset/orig_extra && /usr/local/stow/Development/cmake-3.31.3/bin/cmake -DGRF_SOURCE_FOLDER=/usr/src/build/OpenTTD-jgrpp-0.63.3/media/baseset/orig_extra -DGRF_BINARY_FILE=/usr/src/build/OpenTTD-jgrpp-0.63.3/media/baseset/orig_extra.grf -DNFORENUM_EXECUTABLE=/usr/local/bin/nforenum -DGRFCODEC_EXECUTABLE=/usr/local/bin/grfcodec -DGRFID_EXECUTABLE=/usr/local/bin/grfid -P /usr/src/build/OpenTTD-jgrpp-0.63.3/cmake/scripts/CreateGRF.cmake
@Corin-EU Corin-EU changed the title [FTBS] v0.63.3 with grfcodec-r.367124d -- [FTBS] v0.63.3 with grfcodec-r.367124d -- libpng error: iCCP: known incorrect sRGB profile Jan 15, 2025
@JGRennison
Copy link
Owner

JGRennison commented Jan 15, 2025

The orig_extra files are not something that I've modified, they're the same as upstream OpenTTD.
The PNG files which libpng is objecting to appear to be from 2011.

The grfcodec step is not necessary for building as there are pre-built GRF files in the source already. You could perhaps hide/move grfcodec out of the path temporarily.

Edit: This message from libpng should just be a warning which you can ignore. Does this version of grfcodec that you've built otherwise work correctly?

@Corin-EU
Copy link
Author

Corin-EU commented Jan 15, 2025

Thanks for the rapid response.

 > The grfcodec step is not necessary for building

I got the impression that it was somewhat required/recommended because unlike the CMAKE message for fcitx

 -- Could not find Fcitx (Fcitx is OPTIONAL)

it rather more "sternly" says in detail

 -- Could NOT find Grfcodec (missing: GRFCODEC_EXECUTABLE GRFID_EXECUTABLE NFORENUM_EXECUTABLE)

Removing grfcode (with the wonders of stow, stow -V -D grfcodec-r.367124d), OpenTTD-jgrpp v0.63.3 builds and installs successfully.

I have just done a clone of the grfcodec repository and rolled it iback to r.7ded8eb, compiled and installed, and tried to build OpenTTD-jgrpp v0.63.3 witht that and got the same libpng error failure.

Now since the last time that I had built grfcodec was when the system was on openSUSE Leap 15.5 and I recently upgraded it to 15.6 (thus now doing a rebuild of software in /usr/local), there has been a change in libpng and it is now more strict than the file formats it previously allowed.

So maybe the best thing is to change the CMAKE message about missing grfcodec to "Optional" as with fcitx, and maybe consider either removing or somehow updating the troublesome grf files with an acceptable sRGB profile?

OKAY -- I have fixed the problem for now.

I double checked what version of libpng was installed on this openSUSE Leap 15.6 and there was also libpng 1.7 with the corresponding devel package for the headers as well. Removing the 1.7 version to ensure that there was only

             libpng16-16-32bit-1.6.40-150600.1.3.x86_64
             libpng16-16-1.6.44-lp156.164.1.x86_64
             libpng16-devel-1.6.44-lp156.164.1.x86_64
             libpng16-compat-devel-1.6.44-lp156.164.1.x86_64

rebuilding and installing the latest grfcodec and then building OpenTTD-jgrpp v0.63.3 with that resulted in completion although there were lots of warnings (40 -50 I think) during the grf generation

      [ 88%] Generating orig_extra.grf
     libpng warning: iCCP: known incorrect sRGB profile
     libpng warning: iCCP: known incorrect sRGB profile
     libpng warning: iCCP: cHRM chunk does not match sRGB
     ...  etc etc etc

So for the time being sticking with 1.6 squeaks through the build, but trouble ahead in the future when libpng 1.6 is replaced with stricter libpng 1.7 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants