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

undefined method `Pathname' for MRuby::Toolchain::Android #4895

Closed
IK-O opened this issue Dec 21, 2019 · 1 comment
Closed

undefined method `Pathname' for MRuby::Toolchain::Android #4895

IK-O opened this issue Dec 21, 2019 · 1 comment

Comments

@IK-O
Copy link

IK-O commented Dec 21, 2019

the newest version of MRuby and 2.10 cannot build for Android.
It raises follow error.

"NoMethodError: undefined method Pathname' for #<MRuby::Toolchain::Android:0x0000557558125f48> /home/pc/mruby-newest/tasks/toolchains/android.rake:70:in home_path'"

How can I make for Android?
It could be made till v2.01

build_android.rb

MRuby::Build.new do |conf|
  conf.toolchain :clang
  conf.gem core: 'mruby-bin-mrbc'
end

MRuby::CrossBuild.new('android_arm64') do |conf|
  api = 21
  conf.toolchain :android, arch: "arm64-v8a", platform: "android-#{api}"
  conf.gem core: 'mruby-print'
  conf.gem core: 'mruby-bin-mruby'
  conf.gem 'mrbgems/mruby-io'
  conf.gem 'mrbgems/mruby-zlib'
  conf.gem 'mrbgems/mruby-dir'
  conf.cc do |cc|
    cc.defines << "__ANDROID_API__=#{api}"
    cc.flags << "--sysroot=#{ENV['ANDROID_NDK_HOME']}/sysroot"
  end
end`

build command

  rake MRUBY_CONFIG=build_android.rb ANDROID_NDK_HOME=/home/pc/android-ndk-r20/
@shuujii
Copy link
Contributor

shuujii commented Dec 21, 2019

Thank you for your report. I will fix soon.

@matz matz closed this as completed in 9f1167f Dec 22, 2019
matz added a commit that referenced this issue Dec 22, 2019
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

No branches or pull requests

2 participants