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

How to cross compile this gem? #100

Open
torsakch opened this issue Aug 24, 2019 · 7 comments
Open

How to cross compile this gem? #100

torsakch opened this issue Aug 24, 2019 · 7 comments

Comments

@torsakch
Copy link

I'm trying to cross compile this gem. Unfortunately, it's not success. Do you have some steps to do that? Thanks

@mattn
Copy link
Owner

mattn commented Aug 24, 2019

I confirm that mruby-onig-regexp support Visual Studio, mingw64, Linux, OSX. What is target OS? Please show me compilation error.

@torsakch
Copy link
Author

torsakch commented Aug 24, 2019

I'm using OSX.

` MRuby::CrossBuild.new('android-armeabi') do |conf|

ENV['ANDROID_ARCH'] = 'armeabi'

toolchain :android

conf.gembox 'custom'

conf.cc.flags << '-O3'
conf.linker.flags << "-lm"

end `

I'm trying to cross compile like this. In the custom.gembox, I have the line like this.

conf.gem :github => 'mattn/mruby-onig-regexp'

I found that when the system built, the file "onigmo-6.1.3.tar.gz" don't get unzipped and the onigmo doesn't get compiled. Thank you for help.

@mattn
Copy link
Owner

mattn commented Aug 24, 2019

What error message?

@torsakch
Copy link
Author

The compile is fine. But it cannot be linked. The error messages are like "undef: _OnigEncodingASCII" when linked.

@mattn
Copy link
Owner

mattn commented Aug 24, 2019

What compiler do you use? gcc or clang? version?

@torsakch
Copy link
Author

I use clang.

clang -v
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

@mattn
Copy link
Owner

mattn commented Aug 25, 2019

Hmm, can you build onigmo-6.1.3 with extract tar.gz?

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