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

Fails to build on ruby 3.3 with clang-1500.3.9.4 #25

Closed
joeljunstrom opened this issue Mar 7, 2024 · 2 comments · Fixed by #26
Closed

Fails to build on ruby 3.3 with clang-1500.3.9.4 #25

joeljunstrom opened this issue Mar 7, 2024 · 2 comments · Fixed by #26

Comments

@joeljunstrom
Copy link

joeljunstrom commented Mar 7, 2024

Given the last command line tools update on MacOS with a M1 iconv no longer builds.

Excerpt from the log:

iconv.c:709:50: error: incompatible function pointer types passing 'VALUE (VALUE, VALUE)' (aka 'unsigned long (unsigned long, unsigned long)') to parameter of type
'rb_block_call_func_t' (aka 'unsigned long (*)(unsigned long, unsigned long, int, const unsigned long *, unsigned long)') [-Wincompatible-function-pointer-types]
        rb_block_call(options, rb_intern("each"), 0, 0, get_iconv_opt_i, (VALUE)opt);

It does compile with gem install iconv -- --with-cflags="-Wno-incompatible-function-pointer-types"

@joeljunstrom joeljunstrom changed the title Fails to build on clang-1500.3.9.4 Fails to build on ruby 3.3 with clang-1500.3.9.4 Mar 7, 2024
@joeljunstrom joeljunstrom changed the title Fails to build on ruby 3.3 with clang-1500.3.9.4 Fails to build on ruby 3.3 with clang-1500.3.9.4 Mar 7, 2024
@fabiode
Copy link

fabiode commented May 29, 2024

I can confirm it happened with an intel mac using clang-1500.3.9.4, could install using

gem install iconv -- --with-cflags="-Wno-incompatible-function-pointer-types" as @joeljunstrom mentioned. Thanks!

Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: x86_64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@ameeraazli
Copy link

I can confirm it happened with an intel mac using clang-1500.3.9.4, could install using

gem install iconv -- --with-cflags="-Wno-incompatible-function-pointer-types" as @joeljunstrom mentioned. Thanks!

Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: x86_64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

encountered the same problem on my mac M2 chip, and this solution works! thanks!

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

Successfully merging a pull request may close this issue.

3 participants