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

Meteor on Arm Linux #442

Closed
giacecco opened this issue Oct 31, 2012 · 80 comments

Comments

@giacecco
Copy link

commented Oct 31, 2012

Dear Meteor team,
Do you have any plans to port Meteor to Arm Linux, e.g. Raspbian “wheezy” running on Raspberry Pis? If so, and you need a beta tester, let me know. Thanks!

G.

@n1mmy

This comment has been minimized.

Copy link
Member

commented Nov 4, 2012

No immediate plans to add official ARM support. In theory, all the dependencies should build on ARM, so you could try building the dev bundle on your platform. See https://github.com/meteor/meteor#slow-start-for-developers

@n1mmy n1mmy closed this Nov 4, 2012

@n1mmy

This comment has been minimized.

Copy link
Member

commented Nov 4, 2012

Oh, hah, reading the script it looks like ARM is turned off at the beginning. You can try disabling the "unsupported architecture" check and seeing if it builds.

If it does build and work, please report back. And if it doesn't, we'd gladly take a PR to make it build =)

@giacecco

This comment has been minimized.

Copy link
Author

commented Dec 1, 2012

Dear All,
I've finally had the time to try what n1mmy suggested and the outcome is at http://giacec.co/QUz1ox . I have simply removed from ./admin/generate-dev-bundle.sh all references to the architecture needing being x86_64.

Compilation fails when the script attempts downloading the MongoDB binaries that unfortunately do not exist for "armv6l" (that is the architecture Raspbian Wheezy declares in uname -a).

I have then tried installing MongoDB from source, but apparently this is simply not possible because the source is written for little endian systems. The last successful attempt at porting the code was a branch of MongoDB 1.8.x, too old at the moment of writing to be relevant as MongoDB is beyond 2.2.x.

It looks like this kills the idea of running Meteor on ARM machines, at least if I don't want to use a MongoDB running on some other server.

Giacecco

@n1mmy

This comment has been minimized.

Copy link
Member

commented Dec 2, 2012

@giacecco Thanks for looking into this and writing back.

@TaraWij

This comment has been minimized.

Copy link
Contributor

commented Dec 3, 2012

Will have a RPi within one or two weeks, you may see me porting...

The last successful attempt at porting the code was a branch of MongoDB 1.8.x, too old at the moment of writing to be relevant as MongoDB is beyond 2.2.x.

Is this publically available somewhere?

Might be interesting to learn from its diff against MongoDB itself as well as to patch it up to 2.2.x.

@giacecco

This comment has been minimized.

Copy link
Author

commented Dec 4, 2012

Hi TomWij, this is very good news! The 1.8 port is skrabban / mongo-nonx86.

May I ask if you're thinking of just a quick hack or you're actually planning to contribute back to the MongoDB master? What's the purpose of the Meteor fork you're working on?

@TaraWij

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2012

Hi TomWij, this is very good news! The 1.8 port is skrabban / mongo-nonx86.

Thanks for the reference.

May I ask if you're thinking of just a quick hack or you're actually planning to contribute back to the MongoDB master?

In main instance for Meteor, but it might be interesting to take the fork upstream.

What's the purpose of the Meteor fork you're working on?

I guess you've linked that korean docs fork in error, mine is at TomWij/meteor and as you can see from the branch it's the unofficial Windows fork of Meteor which can be found at http://win.meteor.com. Need to bump that to 0.5.2.

@giacecco

This comment has been minimized.

Copy link
Author

commented Dec 4, 2012

Thanks, and sorry for the wrong link.

@giacecco

This comment has been minimized.

Copy link
Author

commented Dec 16, 2012

Hi All,
Someone managed to compile MongoDB 2.1.1 by changing just one source file, the instructions are at http://www.timandpaige.com/technology/installing-mongodb-on-the-raspberry-pi-part-2.

@thebadger412

This comment has been minimized.

Copy link

commented Jan 1, 2013

Has anyone managed to get meteor up and running on the pi yet?

@TaraWij

This comment has been minimized.

Copy link
Contributor

commented Jan 1, 2013

Well, I can't get V8 and Node.js to run yet; V8 is a dependency of Node.js, if you can't get V8 to compile you can't get Node.js to compile and run...

@thebadger412

This comment has been minimized.

Copy link

commented Jan 2, 2013

What your having trouble with installing node? I am confused by your comment.

@MarcusRiemer

This comment has been minimized.

Copy link

commented Jan 2, 2013

@giacecco

This comment has been minimized.

Copy link
Author

commented Jan 2, 2013

Guys careful not to go off topic. Node.js is far from being a problem, 0.8.x installs from source on Raspberry Pis without any issues, and older packages for Raspbian are available, too. At the moment only MongoDB is the issue, go back to my post on 16 Dec.

@thebadger412

This comment has been minimized.

Copy link

commented Jan 2, 2013

Here are instructions on how to install node if anyone is looking..
http://www.badgersblog.co.uk/2012/12/nodejs-raspberry-pi-tutorial-1.html

I have MongoDB now installed, 2.1.1 on the pi and running and I have node running fine.. I have tried to get meteor going by taking out all the "exit 1" statements from the arch checking code in /admin/generate-dev-bundle.sh and because mongo is already installed I removed the references to it.. however meteor now bitches about stdin not being gzip or something.. I am now out of my depth..

@giacecco

This comment has been minimized.

Copy link
Author

commented Jan 2, 2013

Well it's good progress anyway, can you share the actual "stdin not being gzip" error, or, even better, a gist of the whole output of whatever command you're stuck with?

@TaraWij

This comment has been minimized.

Copy link
Contributor

commented Jan 2, 2013

My platform compiles Node.js using an external V8, I'll look into adapting the package script to not depend on an external V8 and compile similar to the instructions in those provided links; I'll not complain about that anymore but thanks for pointing out how you guys got it working from source (and how no external V8 does the job).

however meteor now bitches about stdin not being gzip or something.. I am now out of my depth..

@thebadger412: You need both tar and gzip on your Raspberry Pi; it might be possible that you have a different tar and gzip than you would have on your host, which can cause the fork used to do the gzip to fail. As far as I remember from having this error on Windows, you need the GNU tar and GNU gzip for this to succeed.

whatever command?

@giacecco: admin/generate-dev-bundle.sh generates a development bundle which has the extension .tar.gz, it thus a simple call to tar czf ... at https://github.com/meteor/meteor/blob/master/admin/generate-dev-bundle.sh#L157. It either fails trying to pack that here or to unpack that on the first Meteor run.

@thebadger412

This comment has been minimized.

Copy link

commented Jan 2, 2013

https://gist.github.com/4436162

here is a gist of what is going wrong for me..

@TomWij I am kinda confused what you are telling me tbh.. What do I have to tar and gzip on the Pi? Thanks btw

@TaraWij

This comment has been minimized.

Copy link
Contributor

commented Jan 2, 2013

@thebadger412: I've adapted my previous comment to explain that, but I'll repeat the important bit for you:

A development bundle has the extension .tar.gz.

Hence, it's important that you have a correctly working tar and gzip; preferably those from GNU.

I will download a kit containing all of Meteor's dependencies.

You do not want this to happen, since there simply isn't a development bundle for the ARM architecture; don't make it try to download one, because it will simply not work. Most likely, it fails because you are downloading a file that doesn't exist, hence it complains about it not being gzip.

What you want to do instead is generate one yourself using admin/generate-dev-bundle.sh.

@thebadger412

This comment has been minimized.

Copy link

commented Jan 2, 2013

Hey man, so this is my generate file

https://gist.github.com/4436362

because mongo is already installed and running I have commented all of the mongo code out.. I have also added the comments to all the exits on the arch checking bit..

I can see the tar line at the very end.. are you saying I should comment this out and then tar is once the bundling is complete?
I really hope we can get this thing working..

@HaroldGray

This comment has been minimized.

Copy link

commented Apr 3, 2013

https://groups.google.com/d/msg/meteor-talk/CcXzU14EHH8/3wvB-d1RfaAJ

Made a little bit of progress.
A link to my generate is posted on that page. I'm able to "run" meteor, but I get a SIGBUS error. Feel free to add to the discussion if you have any tips.

@electricjesus

This comment has been minimized.

Copy link

commented Apr 4, 2013

Ah this would be quite awesome I imagine! I always wanted to find out whether or not we can run meteor on ARM (such as mobile phones, RPi) in the near future or so!

@rpersaud

This comment has been minimized.

Copy link

commented Aug 23, 2013

I've tried these steps and then some on the Samsung Series 3 Chromebook ARMv71 to no avail. It's the perfect development machine for under $300, and it's such a shame it doesn't work with meteor out of the box. Now I have to go get one of those Acers :)

@vflyson

This comment has been minimized.

Copy link

commented Oct 3, 2013

Please, add the ARM support, it doesn't seem to be a lot of work, but will allow people to run this wonderful framework on RPi's and many other embedded platforms. Please!

@Slava

This comment has been minimized.

Copy link
Member

commented Oct 3, 2013

Hi @flatr0ze,

Since people report node.js to run on ARM, why can't you just bundle your meteor app and run it with your own node (but be careful to use the correct version, Meteor 0.6.5 expects node 0.8.x) and connect to the external MongoDB cluster (http://docs.meteor.com/#deploying)? You might need to get node-fibers running as well.

Did you try any of these?

@vflyson

This comment has been minimized.

Copy link

commented Oct 3, 2013

hey there again @Slava,

I'm trying to accomplish it right now, but would rather work on my project, having the ARM support ready; if it's not a big deal, why haven't meteor developers released an ARM version?
it also currently requires many modifications to the main script.

Could you please make a reference to a material which would explain how I could use an external MongoDB cluster with meteor?

@vflyson

This comment has been minimized.

Copy link

commented Oct 3, 2013

status:
had to recompile node.js using
./configure --without-snapshot
to fix Segmentation Fault while using npm

@belisarius222

This comment has been minimized.

Copy link

commented Oct 3, 2013

Yep, you also have to use a nonx86 fork of mongo (I had to patch it a bit
to get it to compile on the beaglebone black:
https://github.com/belisarius222/mongo-nonx86/tree/BBB), and modify the
generate-dev-bundle script to prevent it from
a) bailing for not being a supported version, or
b) trying to download mongo binaries.

In general the pattern I took is: download a Meteor repo (I forked it a
bit; see below), create a dev bundle by running generate-dev-bundle.sh,
then run a Meteor application.

I also found that the -j4 option (use 4 compilation threads) to make node
was too many for the BBB, and that the compilation went much faster if I
took that out. My guess is this is true for other ARMs as well.

Oh, and then when you run Meteor be sure to specify the MONGO_URL
environment variable, because otherwise Meteor will try to start its own
mongo server, which probably won't work. I had to start the mongod server
separately, as root. It's probably possible to get it to work with Meteor
more seamlessly with some more configuration, but it was easy enough in my
case to just start both processes.

Eventually I got Meteor running on the BBB. I forked Meteor slightly to do
this (just in the tools/scripts/installation, not in the runtime or
anything like that). Here's the repo I've been using:
https://github.com/belisarius222/meteor-beaglebone-black/tree/tempo-sd

It's got a few things that are specific to the hardware I was using, so it
won't work out of the box for someone else, but it should be a good
starting point. When I get some more spare time I've been meaning to write
up a blog post or something about how to do this.

On Wed, Oct 2, 2013 at 11:02 PM, flatr0ze notifications@github.com wrote:

status:
had to recompile node.js using
./configure --without-snapshot
to fix Segmentation Fault while using npm


Reply to this email directly or view it on GitHubhttps://github.com//issues/442#issuecomment-25599953
.

@vflyson

This comment has been minimized.

Copy link

commented Oct 3, 2013

Meteor developers, please, make a working ARM version, it's such a simple thing to do for you and such a hassle for us.
Many-many people use their RPi's and similar embedded ARM boards as web-servers, can you imagine how great it would be for them to start using Meteor? Please, make it work.

@TPXP

This comment has been minimized.

Copy link

commented Jun 21, 2014

@josteinaj It looks like it is not the mongod process that encounters a problem, but the mongo one. Try launching mongo while mongod is running (use two terminals or launch mongod adding & at the end of the command so that it runs in background - you'll have to kill it using kill $(pidof mongod)) and ensure you get connected to MongoDB.

Anyway, meteor uses its own binaries to launch MongoDB. Therefore, you should try launching mongoDB using the binaries in (~/.meteor/tools/latest/mongodb/bin/ ). If these binaries don't work, you should remove them and create a symlink to the working mongod and mongo, using ln -s /path/to/mongo. Note you can get the path of the working mongo (the one launched from your terminal) using whereis mongo*.

@josteinaj

This comment has been minimized.

Copy link

commented Jun 21, 2014

Yes, I've symlinked ~/meteor/dev_bundle/mongodb/bin/mongo (and mongod) to /usr/bin/mongo (and /usr/bin/mongod) already.

By setting dbpath, I can start mongod. It seems the issue is with the mongo client (mongo). The weird thing is that after I start mongod on my ARM device, I can connect to it using mongo on my laptop, but I can't connect to it using mongo on the ARM device itself (separate terminal, mongod running in the background).

debian@udoo-debian-hfp:~$ mongo --host 192.168.1.103 --verbose
MongoDB shell version: 2.4.10
Sat Jun 21 10:22:12.401 versionArrayTest passed
connecting to: 192.168.1.103:27017/test
Sat Jun 21 10:22:12.566 creating new connection to:192.168.1.103:27017
Sat Jun 21 10:22:12.567 BackgroundJob starting: ConnectBG
Sat Jun 21 10:22:18.576 Error: couldn't connect to server 192.168.1.103:27017 at src/mongo/shell/mongo.js:147
Sat Jun 21 10:22:18.577 User Assertion: 12513:connect failed
exception: connect failed
@TPXP

This comment has been minimized.

Copy link

commented Jun 21, 2014

@josteinaj Try using host 127.0.0.1 instead of the device's IP.

@josteinaj

This comment has been minimized.

Copy link

commented Jun 21, 2014

@TPXP: Same error.

@TPXP

This comment has been minimized.

Copy link

commented Jun 21, 2014

@josteinaj Can you read anything about this error in the mongod log ?

@josteinaj

This comment has been minimized.

Copy link

commented Jun 21, 2014

There's no output to the mongod terminal when I try to connect with mongo.

Is there any way I can get more detailed debugging info?

debian@udoo-debian-hfp:~$ mongod
mongod --help for help and startup options
Sat Jun 21 11:53:34.714 
Sat Jun 21 11:53:34.715 warning: 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
Sat Jun 21 11:53:34.715 
Sat Jun 21 11:53:34.752 [initandlisten] MongoDB starting : pid=7675 port=27017 dbpath=/data/db/ 32-bit host=udoo-debian-hfp
Sat Jun 21 11:53:34.752 [initandlisten] 
Sat Jun 21 11:53:34.753 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
Sat Jun 21 11:53:34.753 [initandlisten] **       32 bit builds are limited to less than 2GB of data (or less with --journal).
Sat Jun 21 11:53:34.753 [initandlisten] **       Note that journaling defaults to off for 32 bit and is currently off.
Sat Jun 21 11:53:34.753 [initandlisten] **       See http://dochub.mongodb.org/core/32bit
Sat Jun 21 11:53:34.754 [initandlisten] 
Sat Jun 21 11:53:34.754 [initandlisten] db version v2.4.10
Sat Jun 21 11:53:34.755 [initandlisten] git version: nogitversion
Sat Jun 21 11:53:34.755 [initandlisten] build info: Linux howells 3.2.0-4-mx5 #1 Debian 3.2.57-3+deb7u1 armv7l BOOST_LIB_VERSION=1_55
Sat Jun 21 11:53:34.755 [initandlisten] allocator: system
Sat Jun 21 11:53:34.755 [initandlisten] options: {}
Sat Jun 21 11:53:34.825 [websvr] admin web console waiting for connections on port 28017
Sat Jun 21 11:53:34.825 [initandlisten] waiting for connections on port 27017
debian@udoo-debian-hfp:~$ mongo
MongoDB shell version: 2.4.10
connecting to: test
Sat Jun 21 11:52:51.114 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
exception: connect failed
@TPXP

This comment has been minimized.

Copy link

commented Jun 21, 2014

@josteinaj The error you get seems related to the mongo binary, as you can connect to the databse from a remote computer. Moreover, this issue seems to have a topic on StackOverflow, you may find the solution to your problem here : https://stackoverflow.com/questions/17288707/cant-connect-to-mongodb-locally-even-though-mongod-is-running .

@josteinaj

This comment has been minimized.

Copy link

commented Jun 21, 2014

@TPXP Thanks, that looks like the exact same error I'm facing. It seems the solution is to patch mongodb and recompile though, so I suppose that means installing the debian package with apt-get is a no-go.

I've been trying some more to compile mongo-nonx86 and it seems to compile nicely after a fixing the source code a bit. It's taking forever though, so we'll see.

@TPXP

This comment has been minimized.

Copy link

commented Jun 22, 2014

@josteinaj As the apt-get solution is not working properly, you should report this issue to the people in charge of the repository (or maybe even to the libboost developpers). This way, they will fix the package and make it work for everyone.

@josteinaj

This comment has been minimized.

Copy link

commented Jun 22, 2014

Yeah I considered it initially but submitting bugs to debian wasn't exactly straight forward (probably just because I haven't done it before).

Anyway, I did it now: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752332

@josteinaj

This comment has been minimized.

Copy link

commented Jun 30, 2014

So I finally got it working a few days ago, and have set up instructions for setting it up here: josteinaj/meteor-udoo. The reason I didn't get mongo working earlier was that by default, debian had disabled the loopback interface, to mongo was not able to resolve localhost. I don't know if this is default in all Debian distros or just this armHF one (I'm usually using Ubuntu), but it seems strange to have it disabled by default.

Anyway, I chose to install it from the debian repos using apt-get and link to node and mongo instead of building them. But I think I could've managed to build all the binaries now that I figured out the loopback issue.

Thanks for the help everyone!

I hope there will be official support for meteor on ARM in the future!

@TomFreudenberg

This comment has been minimized.

Copy link
Contributor

commented Sep 27, 2014

Hi, today I created a fork to build an universal bundle for meteor (currently 0.9.3). It runs successfull for us on UDOO and Raspi.

Available from branch release-0.9.3-universal on:

https://github.com/4commerce-technologies-AG/meteor/tree/release-0.9.3-universal


Update on Nov 4th, 2014

Now also available for release 1.0 of meteor. I always direct the default branch to latest available release. Please check out on:

https://github.com/4commerce-technologies-AG/meteor

@ggaabe

This comment has been minimized.

Copy link

commented Nov 4, 2014

Hi Tom, just wondering, how do I get your script working? Everytime I try running it, I get the following error:
Unsupported architecture: armv6l
Meteor only supports i686 and x86_64 or universal for now.
To use universal architecture make sure that node and mongo packages are pre-installed.

From what I can tell, I have node installed, and mongo installed. However, whenever I call the mongo command by itself, I get a command not found error, even if
sudo /etc/init.d/mongod start
Successfully starts mongo for me. Still can't use the mongo shell, basically. Just not sure if that's required by the "universal" build.

@TomFreudenberg

This comment has been minimized.

Copy link
Contributor

commented Nov 4, 2014

Hi Gabriel ( @ggaabe ), I moved your request forward to a ticket at:

4commerce-technologies-AG#2

@TomFreudenberg

This comment has been minimized.

Copy link
Contributor

commented Feb 21, 2015

For anyone who is coming here by searching for running great meteor on yet unsupported architectures.

You will find an updated universal fork on https://github.com/4commerce-technologies-AG/meteor. The repo is kept updated always to latest meteor stable releases.

An additional blog with comments and hints from issues all over the time is available at: http://meteor-universal.tumblr.com/. Help and comments are welcome! You can send me your comments via github issues or by MENU->SuggestionBox on blog.

@suchipi

This comment has been minimized.

Copy link

commented Oct 16, 2015

@TomFreudenberg thanks for the comment; I was able to use meteor on an ARM Chromebook with that fork no problem.

@stalgiag

This comment has been minimized.

Copy link

commented Oct 16, 2015

@TomFreudenberg I had great luck running your fork on a Raspberry Pi. Thanks so much!

@ontoport

This comment has been minimized.

Copy link

commented Jan 5, 2016

Hi, I just tried to install meteor on an Cubieboard 4 CC A80 (hardware architecture is armv7l), running Lubuntu Linaro 14.04 trusty) and got the message "Meteor only supports i686 and x86_64 for now" which led me finally to this thread. @TomFreudenberg Is this covered by your package mentioned above?

@skaag

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2016

I strongly suggest you try the 4commerce distribution, I personally tried it and it worked wonderfully (it is also the quickest because it uses distro supplied binaries instead of compiling stuff for hours, or in the case of the ARM systems, DAYS!).

@TomFreudenberg

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2016

Hi Wolfram ( @wbartussek ), yes it should work otherwise feel free to give me a post in the issue queue on https://github.com/4commerce-technologies-AG/meteor.

@skaag - thanks for your referral

@ontoport

This comment has been minimized.

Copy link

commented Jan 5, 2016

Thanks for the quick response. I'll try it and report on my experience.

@ontoport

This comment has been minimized.

Copy link

commented Jan 5, 2016

Success!
Now you can add the Cubieboard 4 CC A80 to your supported hardware!
One hint how to overcome a strange message specific to Lubuntu on Cubieboard:
After starting your app with meteor you may possibly get:

=> Started proxy.
Unexpected mongo exit code 1. Restarting.
Unexpected mongo exit code 1. Restarting.
Unexpected mongo exit code 1. Restarting.
Can't start Mongo server.
MongoDB failed global initialization

Looks like MongoDB doesn't understand your locale settings. See
#4019 for more details.

You can now get those language settings with
perl -e exit
which will yield an output like:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Obviously there is an inconsistency in language settings (due to the Chinese make of Cubieboard). This can be repaired by issuing:
sudo locale-gen en_US.UTF-8
or e.g. for a German locale:
sudo locale-gen de_DE.UTF-8

Then everything works as expected.
@TomFreudenberg "Ich bin begeistert!"

@TomFreudenberg

This comment has been minimized.

Copy link
Contributor

commented Jan 8, 2016

Hi Wolfram ( @wbartussek ) great to hear about success on Cubie as well.

For anyone fell in same condition about LOCALE settings on Raspi please see the section Good to know and the hints at "Mongo locale error on starting meteor"

@trusktr

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2016

Hello All, Mongo for ARM is officially complete! We're one nice step closer...

@TPXP

This comment has been minimized.

Copy link

commented Aug 24, 2016

⚠️ This is only for 64-bit ARM architectures, so armv5/6/7 are still not supported...

@Dev1an

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2017

Why is this issue closed? How can we run meteor (1.4 and later) on 64-bit ARM devices?

@duvrai

This comment has been minimized.

Copy link

commented Oct 4, 2017

This issue lives now here: meteor/meteor-feature-requests#130
@Dev1an as per #6033 (comment) it seems this one was closed in 2012 because "MDG had no immediate plans for adding official ARM support".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.