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

Support ARM on Linux #12160

Merged
merged 7 commits into from
Feb 15, 2024
Merged

Support ARM on Linux #12160

merged 7 commits into from
Feb 15, 2024

Conversation

aquinoit
Copy link
Contributor

@aquinoit aquinoit commented Aug 25, 2022

Hello there! We are working on ARM support to continue PR.

Thanks, @nathan-muir, for the excellent contribution.

We decided to open a new PR from the latest devel branch, We've already made it work with Ubuntu and Amazon Linux, but we're doing more testing.

Soon we will release a beta version so we can test directly on a clean server.

I will post more details and the progress of the task soon.

Thanks.

@CLAassistant
Copy link

CLAassistant commented Aug 25, 2022

CLA assistant check
All committers have signed the CLA.

@aquinoit aquinoit mentioned this pull request Aug 25, 2022
@fredmaiaarantes fredmaiaarantes changed the title Meteor - Support ARM on Linux Support ARM on Linux Aug 25, 2022
@fredmaiaarantes fredmaiaarantes added this to the Release 2.9 milestone Aug 25, 2022
@JonathanLehner
Copy link

Could it be added soon? We need it for raspberry pi

@xet7
Copy link
Contributor

xet7 commented Oct 16, 2022

Also needed for Asahi Linux on M1

@xet7
Copy link
Contributor

xet7 commented Oct 16, 2022

And for Linux arm64 build server

@denihs denihs mentioned this pull request Oct 24, 2022
3 tasks
@denihs denihs changed the base branch from devel to release-2.9 October 24, 2022 18:23
@aquinoit
Copy link
Contributor Author

aquinoit commented Oct 24, 2022

Thanks for the suggestions @xet7 @JonathanLehner

We are still working on this task, this is a significant change that requires careful regression.

We are doing some tests and will soon update you here.

Best Regards,

@denihs denihs modified the milestones: Release 2.9, Release 2.10 Nov 3, 2022
@JonathanLehner
Copy link

Can we already deploy the branch? Do you need any assistance?

@xet7
Copy link
Contributor

xet7 commented Mar 16, 2023

Currently I'm using OrangePi arm64 that has 16 GB RAM and 128 GB microSD card. To build Meteor, I need to remote desktop with virt-manager to other server that is amd64. I can not build Meteor locally, before this is merged. Same is also at Asahi Ubuntu on M1 and at build server that is arm64.

@xet7
Copy link
Contributor

xet7 commented Mar 16, 2023

@xet7
Copy link
Contributor

xet7 commented Mar 16, 2023

OrangePi is connected with HDMI to my 4K LED TV currently at resolution 3840x2160 at 60 Hz. Current uptime 4 days. Works very well for development.

@JonathanLehner
Copy link

Cool thanks! Have you tried building from the branch?

@xet7
Copy link
Contributor

xet7 commented Mar 16, 2023

@JonathanLehner

Building from branch how? What commands?

@JonathanLehner
Copy link

Checkout the branch and build?

@xet7
Copy link
Contributor

xet7 commented Mar 16, 2023

@JonathanLehner

It's the first time you've run Meteor from a git checkout.
I will download a kit containing all of Meteor's dependencies.
##O=#    #                                                                                                                

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Failed to install dependency kit.
It's the first time you've run Meteor from a git checkout.
I will download a kit containing all of Meteor's dependencies.
##O=#    #                                                                                                                

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Failed to install dependency kit.

@xet7
Copy link
Contributor

xet7 commented Mar 17, 2023

Maybe Meteor has somewhere some script to build dependency kit ?

@JonathanLehner
Copy link

what do you mean dependency kit?

@xet7
Copy link
Contributor

xet7 commented Mar 25, 2023

Ok I found the final step. Downloading mongodb tgz for arm64, version that is statically linked with OpenSSL, it works. Existing dynamically linked does not work.

cd ~/.meteor/dev_bundle/mongodb/bin

cp /home/user/Downloads/mongodb-linux-aarch64-ubuntu2204-6.0.5/bin/mongo* .

@xet7
Copy link
Contributor

xet7 commented Mar 25, 2023

I added Meteor 2.11 for arm64 ~/.meteor directory in tar.gz to https://releases.wekan.team/raspi3/

Here I'm running WeKan Open Source kanban https://wekan.github.io on M1 Air Asahi Ubuntu:

wekan-meteor-arm64

@xet7
Copy link
Contributor

xet7 commented Mar 25, 2023

Here running on OrangePi 5 arm64 that has 16 GB RAM and 128 GB microSD. Currently my 1 TB NVME disk is not connected to other side of OrangePi 5. Running Armbian that is based on Ubuntu 22.04.2 LTS arm64.

wekan-meteor-arm64-orangepi5

@jacoatvatfree
Copy link

Voting for this to be merged please

@henriquealbert
Copy link
Member

@aquinoit will be taking charge of this task on Friday. We hope to merge it as soon as possible.

@aquinoit
Copy link
Contributor Author

From Friday, I will be working on this task again!

@xet7
Copy link
Contributor

xet7 commented Dec 7, 2023

Update 2023-12-07

I did get newest Meteor 3.0 working at Linux arm64. Here are all the details.

Screenshot of Meteor 3.0 at Linux arm64

meteor-arm

Installing Meteor 3.0 to Linux arm64

Using Debian 12 arm64 in this case. (Could also be newest Ubuntu).

ssh user@arm64linux

sudo apt -y install sqlite3 libsqlite3-dev build-essential autoconf automake cmake curl wget zip unzip p7zip-full nano

Scripts use command /usr/bin/python , that does not exists,
so link it to /usr/bin/python3 .

sudo su

cd /usr/bin

ln -s python3 python

exit

And continue:

sudo apt -y install npm

sudo npm -g install n

sudo n 20.10.0

sudo npm -g install @mapbox/node-pre-gyp

sudo npm -g install node-gyp

git clone https://github.com/meteor/meteor .meteor

cd .meteor

git checkout remotes/origin/release-3.0

git merge remotes/origin/feature-linux-arm

There is this one merge conflict file. Edit it and remove everything between <<< and >>> lines, and those lines itself also:

nano -c packages/promise/.npm/package/npm-shrinkwrap.json

Save and exit with Ctrl-o Enter Ctrl-x Enter

Generate dev bundle, here also timing how long it takes:

time ./scripts/generate-dev-bundle.sh

cd ..

Optional is installing MongoDB 6. meteor command uses Meteor embedded MongoDB, but when not developing, and running bundle, installed version of Node and MongoDB is used at cd armtest/.build/bundle && node main.js.
I installed just in case, if it has some of the required dependencies.

Download missing MongoDB .so files, that I found from some MongoDB directories by trial and error. These are needed, because otherwise building with meteor command has MongoDB errors, MongoDB that is embedded to Meteor fails to start, causing meteor command fail to start. More info at wekan/wekan#5142 (comment)

wget https://wekan.github.io/LD_LIBRARY-linux-arm64.zip

unzip LD_LIBRARY-linux-arm64.zip

nano .bashrc

There add at bottom, and copy paste it to bash shell to use at current bash session:

export PATH=~/.meteor:$PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/lib

Then save and exit with Ctrl-o Enter Ctrl-x

To use those paths at current bash shell (without exit and back with ssh user@arm64linux):

source .bashrc

Then create meteor project:

mkdir repos

cd repos

meteor create --blaze armtest

cd armtest

meteor

@xet7 xet7 mentioned this pull request Dec 15, 2023
@xet7
Copy link
Contributor

xet7 commented Dec 15, 2023

Currently to build for Linux arm64, this additional step is needed: #12359 (comment)

@aquinoit aquinoit changed the base branch from release-2.9 to release-3.0 January 12, 2024 19:48
@denihs denihs merged commit c6a1d26 into release-3.0 Feb 15, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants