gjtorikian / jekyll-last-modified-at

A Jekyll plugin to show the last_modified_at time of a post.
MIT License
241 stars 38 forks source link

posix-spawn.c:226:34: error: passing argument 2 of ‘rb_hash_foreach’ from incompatible pointer type #97

Closed ambersun1234 closed 1 month ago

ambersun1234 commented 2 months ago

Description

I've encounter the following error in jekyll build with jekyll-last-modified-at plugin

current directory:
/github/workspace/vendor/bundle/ruby/3.2.0/gems/posix-spawn-0.3.15/ext
make DESTDIR\= sitearchdir\=./.gem.20240509-14786-bnxvr4
sitelibdir\=./.gem.20240509-14786-bnxvr4
compiling posix-spawn.c
posix-spawn.c: In function ‘posixspawn_file_actions_init’:
posix-spawn.c:226:34: error: passing argument 2 of ‘rb_hash_foreach’ from
incompatible pointer type [-Wincompatible-pointer-types]
226 |         rb_hash_foreach(options,
posixspawn_file_actions_operations_iter, (VALUE)fops);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                  |
|                                  int (*)(VALUE,  VALUE, 
posix_spawn_file_actions_t *) {aka int (*)(long unsigned int,  long unsigned
int,  posix_spawn_file_actions_t *)}

which seems like there's a breaking change in the plugin's dependency posix-spawn\ I've look into my Gemfile.lock and there's 2 version of posix-spawn

  1. 0.3.9, specified in jekyll-last-modified-at.gemspec
  2. 0.3.15

What I've tried

Updating the jekyll gem from 3.7 to 4.3.3 but still not working

The above error will only show in my action build, with local docker build it works well without issue\ You can find the full error log at https://github.com/ambersun1234/ambersun1234.github.io/actions/runs/9015175320/job/24769328248

medeiros commented 1 month ago

Exactly the same problem here

dtaivpp commented 1 month ago

@ambersun1234 hey check the most recent release to see if this has resolved your issue. We pulled posix-spawn and replaced with Open3

ambersun1234 commented 1 month ago

@dtaivpp It's now working again and I don't have to change anything, thanks :)