Skip to content

fix build for recent... macos? readline? ruby?#389

Open
jjb wants to merge 2 commits intothoughtbot:mainfrom
jjb:patch-1
Open

fix build for recent... macos? readline? ruby?#389
jjb wants to merge 2 commits intothoughtbot:mainfrom
jjb:patch-1

Conversation

@jjb
Copy link
Contributor

@jjb jjb commented Apr 7, 2024

got these errors on macos 14 with ruby 3.2 and 3.3 and readline 8.2, not sure which one is the culprit, my C skills are almost nonexistent but i powered through!

src/line_editor.c:1622:5: error: incompatible function pointer types passing 'VALUE (VALUE, VALUE)' (aka 'unsigned long (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
    rb_define_singleton_method(mLineEditor, "completer_word_break_characters",
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/line_editor.c:1626:5: error: incompatible function pointer types passing 'VALUE (VALUE, VALUE)' (aka 'unsigned long (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
    rb_define_singleton_method(mLineEditor, "completer_quote_characters",
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@jjb
Copy link
Contributor Author

jjb commented Nov 17, 2024

i think something like this works

git checkout jjb-1
bundle --redownload
RUBY=$(which ruby) ./configure
make
sudo make install

@pjmorse
Copy link

pjmorse commented Sep 10, 2025

I'm not having any luck with @jjb 's 17 November 2024 recipe. I fail on the third step; I get -bash: ./configure: No such file or directory. I tried changing that line to RUBY=$(which ruby) ./configure.rb (after chmod 744 ./configure.rb) but that has its own problems:

./configure.rb: line 1: require: command not found
./configure.rb: line 3: syntax error near unexpected token `('
./configure.rb: line 3: `VAR_PATTERN = /\$\((?<name>[a-z_]+)\)/i'

Am I missing a step somewhere?

@jjb
Copy link
Contributor Author

jjb commented Sep 10, 2025

“ require: command not found” seems like a ruby script is being run as a shell script

@pjmorse
Copy link

pjmorse commented Sep 10, 2025

It does, doesn't it? But the earlier ./configure: No such file or directory suggests that there's a pre-Makefile step which needs to happen. Looking at commit messages, it seems like the configure.rb file is not that. But the INSTALL document is very clear that ./configure needs to happen without providing any clarity about how. (Also, there's a strong bias for "system rubies" rather than e.g. RVM-installed Ruby, which is kind of a problem when the current MacOS Ruby is 2.6.10.)

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.

2 participants