Sitelet https://github.com/rtomayko/posix-spawn/issues/91
Skip to content

Unable to install on Termux #91

Description

@khemarato

Running gem install posix-spawn on Termux currently gives me:

ERROR:  Error installing posix-spawn:
        ERROR: Failed to build gem native extension.

    current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/posix-spawn-0.3.15/ext
/data/data/com.termux/files/usr/bin/ruby extconf.rb
creating Makefile

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/posix-spawn-0.3.15/ext
make DESTDIR\= sitearchdir\=./.gem.20240307-28064-kq11bf sitelibdir\=./.gem.20240307-28064-kq11bf clean

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/posix-spawn-0.3.15/ext
make DESTDIR\= sitearchdir\=./.gem.20240307-28064-kq11bf sitelibdir\=./.gem.20240307-28064-kq11bf
compiling posix-spawn.c
posix-spawn.c:226:27: error: incompatible function pointer types passing 'int (VALUE, VALUE, posix_spawn_file_actions_t *)' (aka 'int (unsigned long, unsigned long, struct __posix_spawn_file_actions **)') to parameter of type 'int (*)(VALUE, VALUE, VALUE)' (aka 'int (*)(unsigned long, unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
  226 |         rb_hash_foreach(options, posixspawn_file_actions_operations_iter, (VALUE)fops);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/ruby-3.2.0/ruby/internal/intern/hash.h:83:40: note: passing argument to parameter 'func' here
   83 | void rb_hash_foreach(VALUE hash, int (*func)(VALUE key, VALUE val, VALUE arg), VALUE arg);
      |                                        ^
1 error generated.
make: *** [Makefile:248: posix-spawn.o] Error 1

make failed, exit code 2

Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/posix-spawn-0.3.15 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/aarch64-linux-android/3.2.0/posix-spawn-0.3.15/gem_make.out

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions