[BUG] Build fails on Arch linux #819

Closed
opened 2026-01-29 16:54:08 +00:00 by claunia · 4 comments
Owner

Originally created by @superbonaci on GitHub (Oct 17, 2024).

On arch linux:

$ ./build
Running pre-build script...
Obtaining Git commit
Storing variables in file
Commit: cbd8e27fe340d503149c2d1dee06c0790e19d416
Date: 2024-10-17
Stored all in compile_info_real.h
Done.
Trying to compile...
Checking for cargo...
rustc >= MSRV(1.54.0)
Building rust files...
    Finished `release` profile [optimized] target(s) in 0.08s
Building ccextractor
Compiled with errors
../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);
      |         ^~~~~~~~~~~~~~~
Originally created by @superbonaci on GitHub (Oct 17, 2024). On arch linux: ``` $ ./build Running pre-build script... Obtaining Git commit Storing variables in file Commit: cbd8e27fe340d503149c2d1dee06c0790e19d416 Date: 2024-10-17 Stored all in compile_info_real.h Done. Trying to compile... Checking for cargo... rustc >= MSRV(1.54.0) Building rust files... Finished `release` profile [optimized] target(s) in 0.08s Building ccextractor Compiled with errors ../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); | ^~~~~~~~~~~~~~~ ```
Author
Owner

@steel-bucket commented on GitHub (Oct 21, 2024):

Adding #include "ccx_encoders_spupng.h" at the top of the file /src/lib_ccx/ocr.c makes it compile for Arch Linux. But I have no Idea why it compiles for debian without the aforementioned Change, as I have tried in both.
Here's what I know, the error doesn't come from CMake
At first I thought it did as paru's version is different and newer than apt's version(3.30.5-1 as compared to 3.28.3-1), but changing it doesn't fix it.

@steel-bucket commented on GitHub (Oct 21, 2024): Adding `#include "ccx_encoders_spupng.h"` at the top of the file `/src/lib_ccx/ocr.c` makes it compile for Arch Linux. But I have no Idea why it compiles for debian without the aforementioned Change, as I have tried in both. Here's what I know, the error doesn't come from CMake At first I thought it did as paru's version is different and newer than apt's version(`3.30.5-1` as compared to `3.28.3-1`), but changing it doesn't fix it.
Author
Owner

@Z-xus commented on GitHub (Nov 25, 2024):

@steel-bucket Can you please mention the version of clang when using debian? I reproduced and got the same results, I think debian might be using an old version of clang and hence does not treat the warning as an error, described as here: https://www.redhat.com/en/blog/new-warnings-and-errors-clang-16

While my arch system was using latest clang version:

❯ clang --version
clang version 18.1.8
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

@Z-xus commented on GitHub (Nov 25, 2024): @steel-bucket Can you please mention the version of clang when using debian? I reproduced and got the same results, I think debian might be using an old version of clang and hence does not treat the warning as an error, described as here: https://www.redhat.com/en/blog/new-warnings-and-errors-clang-16 While my arch system was using latest clang version: ``` ❯ clang --version clang version 18.1.8 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin ```
Author
Owner

@rhymeswithmogul commented on GitHub (Nov 26, 2024):

Adding #include "ccx_encoders_spupng.h" at the top of the file /src/lib_ccx/ocr.c makes it compile for Arch Linux. But I have no Idea why it compiles for debian without the aforementioned Change, as I have tried in both.

I just tried this on Ubuntu 24.10 and I needed to patch the file, too, even though this is a Debian derivative.

@rhymeswithmogul commented on GitHub (Nov 26, 2024): > Adding `#include "ccx_encoders_spupng.h"` at the top of the file `/src/lib_ccx/ocr.c` makes it compile for Arch Linux. But I have no Idea why it compiles for debian without the aforementioned Change, as I have tried in both. I just tried this on Ubuntu 24.10 and I needed to patch the file, too, even though this is a Debian derivative.
Author
Owner

@superbonaci commented on GitHub (Nov 28, 2024):

Thanks!

@superbonaci commented on GitHub (Nov 28, 2024): Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#819