Skip to content

Conversation

@rhymeswithmogul
Copy link
Contributor

This commit fixes a compile-time error regarding an implicit declaration of mapclut_paletee() on some compilers and compiler versions. Notably, Arch Linux and Ubuntu 24.10 seem to be affected.

The error resolved is:

../src/lib_ccx/ocr.c: In function 'ocr_rect':
../src/lib_ccx/ocr.c:922:9: error: implicit declaration of function 'mapclut_paletee' [-Wimplicit-function-declaration]
  922 |         mapclut_paletee(palette, alpha, (uint32_t *)rect->data1, rect->nb_colors);
      |         ^~~~~~~~~~~~~~~

This was resolved by #include-ing "ccx_encoders_spupng.h" in the file src/lib_ccx/ocr.c. Thanks to GitHub user @steel-bucket for sharing the fix in this issue's comments.

I was having the same issue, and making this change to that file allowed it to compile on my system (Ubuntu 24.10, GCC 14.2.0-4ubuntu2).

Fixes: #1646

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

{pull request content here}

This commit fixes a compile-time error regarding an implicit declaration
of mapclut_paletee() on some compilers and compiler versions.  Notably,
Arch Linux and Ubuntu 24.10 seem to be affected.

The error resolved is:

```
../src/lib_ccx/ocr.c: In function 'ocr_rect':
../src/lib_ccx/ocr.c:922:9: error: implicit declaration of function 'mapclut_paletee' [-Wimplicit-function-declaration]
  922 |         mapclut_paletee(palette, alpha, (uint32_t *)rect->data1, rect->nb_colors);
      |         ^~~~~~~~~~~~~~~
```

This was resolved by `#include`-ing "ccx_encoders_spupng.h" in the file
src/lib_ccx/ocr.c.  Thanks to GitHub user @steel-bucket for sharing the
fix in this issue's comments.

Fixes: CCExtractor#1646
@cfsmp3 cfsmp3 self-requested a review November 27, 2024 19:47
@cfsmp3 cfsmp3 merged commit b08c5fa into CCExtractor:master Nov 27, 2024
13 of 15 checks passed
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

Successfully merging this pull request may close these issues.

[BUG] Build fails on Arch linux

2 participants