metanorma / metanorma-cli

CLI (Command Line Interface) for Metanorma
BSD 2-Clause "Simplified" License
5 stars 5 forks source link

Installation issue with expressir, rice #231

Closed abunashir closed 3 years ago

abunashir commented 3 years ago

Hey there, I was trying to install the cli, and noticed we are having a similar issue that was there couple of months back (build failing for expressir/rice). I can manually try to fix that for now, but I wonder if that occurs on actual user's devices and if we need to suggest anything for fix here?

Screenshot 2021-03-15 at 16 36 32

//cc: @CAMOBAP, @ronaldtse

abunashir commented 3 years ago

I believe fhe first occurrence of this was around here - https://github.com/metanorma/metanorma-cli/runs/2030136038

CAMOBAP commented 3 years ago

Let me check, we 100% have published https://rubygems.org/gems/expressir/versions/0.2.21-x86_64-darwin platform gem for macos for both arm64 and x86_64

@abunashir what is your is version/arch, could you please print gem env

abunashir commented 3 years ago

That was super fast! I'm on x86_64-linux, tried to rebuild ruby though!

Screenshot 2021-03-15 at 16 50 17
CAMOBAP commented 3 years ago

Also will gem install expressive --platform x86_64-darwin install prebuilt gem? Or it still fall into the same issue?

abunashir commented 3 years ago

I can install expressive but the Metanorma-cli is still seems to be failing

Also will gem install expressive --platform x86_64-darwin install prebuilt gem? Or it still fall into the same issue?

abunashir commented 3 years ago

FYI - The latest build in the CI seems to be working fine though.

CAMOBAP commented 3 years ago

Sorry for the confusion, I wrongly thought that you are on macos

I faced this issue previously on macOS and some docker container, but it wasn't critical for me.

Looks like it's time to investigating it. @abunashir could you please send verbose log from gem install or bundle install there must be some statement about why it's going to be compiled from scratch

abunashir commented 3 years ago

I manually fixed it by installing the automake for now, but I can send you the logs if I see the same issue again.

CAMOBAP commented 3 years ago

@abunashir if it will be ok for you, could you please temporary remove autotools and expressir, rice gems, and try to install them again to generate verbose logs?

IMHO, make sense to understand the reason for future

ronaldtse commented 3 years ago

I'm sure this is addressed but for the record, the gem in question is expressir not expressive 😉

Aren't the linux binary gems already available? Why would installation require compilation?

Screenshot 2021-03-16 at 3 46 51 PM
abunashir commented 3 years ago

This is little bit wired, I just created another ubuntu VM with the same image I normally use, and looks like if I run gem install metanorma-cli then it seems to be working without any issue.

But if I run the bin/setup script on the Metanorma-CLI project then it's fails with this output. The image is using this bootstrap.sh script with ruby version 2.6.3. Let me know if you need a VM to reproduce it, then I can spin up one for you.

CAMOBAP commented 3 years ago

@abunashir thanks a lot for steps , this is more than enough to start

ronaldtse commented 3 years ago

I saw this message in the output:

Fetching rice 3.0.0
Installing rice 3.0.0 with native extensions
Building native extensions. This could take a while...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

This is because of the rice gem due to expressir?

CAMOBAP commented 3 years ago

@ronaldtse expressir depends on rice gem. But we remove this dependency for gem with prebuilt exetnsion:

ronaldtse commented 3 years ago

Seems that this is done, thanks!