Skip to content

jpeg: more fixes for clang 16#94

Open
chrstphrchvz wants to merge 2 commits into
eserte:masterfrom
chrstphrchvz:clang-16-fixes
Open

jpeg: more fixes for clang 16#94
chrstphrchvz wants to merge 2 commits into
eserte:masterfrom
chrstphrchvz:clang-16-fixes

Conversation

@chrstphrchvz

Copy link
Copy Markdown
Contributor

Includes the change from #93

Note that the CI workflow currently only builds Perl/Tk against system libjpeg (the configure step output contains Using system's -ljpeg rather than Building jpeg/libjpeg.a) and so will not test the changes proposed to this configure script.

reckenrode and others added 2 commits September 7, 2023 05:22
The jpeg `configure` script fails to detect clang as a functioning C
compiler because it uses a test with a `main` that returns an implicit
`int`, which results in an error with clang 16.
@stemd

stemd commented Jun 13, 2026

Copy link
Copy Markdown

This pull is also working with clang 21, and if for any reason you don't have any other compiler but clang, it solves errors like:

Building jpeg/libjpeg.a
checking for gcc... cc
checking whether the C compiler (cc -fno-common -DPERL_DARWIN -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -DHAS_BROKEN_LANGINFO_CODESET -DNO_LOCALE_COLLATE -fno-strict-aliasing -pipe -fstack-protector-strong   -fno-common -DPERL_DARWIN -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -DHAS_BROKEN_LANGINFO_CODESET -DNO_LOCALE_COLLATE -fno-strict-aliasing -pipe -fstack-protector-strong  -fstack-protector-strong) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

I applied this pull and then built Tk without any other problem.

int main() instead of main() should not break any compiler, same is valid for adding #include <stdio.h> or #ifdef block.

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.

3 participants