Meteor on Arm Linux #442

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

Comments

Projects
None yet

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.

Owner

n1mmy 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

Owner

n1mmy 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 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

Owner

n1mmy commented Dec 2, 2012

@giacecco Thanks for looking into this and writing back.

Contributor

TomWij 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 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?

Contributor

TomWij 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 commented Dec 4, 2012

Thanks, and sorry for the wrong link.

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.

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

Contributor

TomWij 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...

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

giacecco 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.

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 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?

Contributor

TomWij 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.

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

Contributor

TomWij 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.

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..

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.

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!

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 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!

Member

Slava 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 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 commented Oct 3, 2013

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

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/meteor/meteor/issues/442#issuecomment-25599953
.

vflyson 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.

There are many different flavors of ARM: hardware floating point, software
floating point, armv6, arvm7, etc. Not to mention that you can run any
number of different OS's on ARM, and there's no officially supported ARM
version of MongoDB. So, I wouldn't say it's simple.

That being said, it wouldn't be a bad idea to have community-maintained
forks / instructions / sd-card-images of Meteor for the raspberry pi and/or
beaglebone black, and maybe a couple other popular boards that people use
for embedded servers. The repos I posted a few minutes ago, while not very
polished at the moment, are open-source; I hope they're useful for other
people, and pull requests, bug fixes, and collaborations are welcome :)

On Thu, Oct 3, 2013 at 4:16 PM, flatr0ze notifications@github.com wrote:

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.


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

vflyson commented Oct 10, 2013

We're almost there, just getting this error on Debian ARM linux: https://gist.github.com/skaag/6911239
Does anyone know what it may be?

Contributor

skaag commented Oct 11, 2013

I managed to overcome the path.join() crash, by making sure it's a string even when it's undefined. Now I get to this error:

=> Errors prevented startup:

While building the application:
error: MDG does not publish dev_bundles for arch: os.linux.armv7l

=> Your application has errors. Waiting for file change.

Any ideas how to circumvent this?

Contributor

skaag commented Oct 11, 2013

Ok, I circumvented this in bundler.js, and now I have meteor running on ARMv7l.
When I add the architecture in bundler.js all of a sudden the path.join() problem disappears.

Contributor

skaag commented Oct 11, 2013

I can confirm I now have Meteor running just fine under ARMv7l, with all problems solved.
My ARM platform is an Olimex Olinuxino A13 with 512mb RAM.

IGx89 commented Oct 21, 2013

And I can confirm I have it working under ARMv6l, on a Raspberry Pi running a minimalist image of Raspbian. My changes to do so can be found here: https://github.com/IGx89/meteor. Only thing it's currently lacking is local mongodb support, though that should be possible too.

Contributor

skaag commented Oct 21, 2013

My latest changes include downloading and building a non-x86 version of mongo, but currently this crashes during compilation. I did manage to compile it before, so I already have a full Meteor + MongoDB running on my own ARMv7l. I am looking at the script to figure out why it is crashing in the new version. Perhaps I forgot some configure flag. It just takes FOREVER to compile on the ARMv7l platform so the debug/repair cycle is very long :-)

vflyson commented Oct 21, 2013

@IGx89 Does it mean you're running mongodb on a remote host? If so, could you please describe how you're doing that and what happens if you get disconnected?
Thank you.

IGx89 commented Oct 21, 2013

Sure. You just set MONGO_URL before starting Meteor (an example URL is found in the README in my fork), and as for what happens if the database server goes down, at least with autopublish enabled the web server seems to continually restart until the database server is back up. I imagine (hopefully) that a production-configured meteor app would behave better -- I have about 8 total hours of experience with meteor so I'm still pretty fresh on things :)

vflyson commented Oct 21, 2013

Oh, thanks a lot for the tip.
We're trying to save RAM on our platform, I believe this could help.

TPXP commented May 29, 2014

Hi guys!

I also tried to run Meteor on an ARM platform (an Odroid-XU Lite - armv7l ). And, as far as I can see, it works perfectly! 😄

Basically, what I did is : for meteor 0.8.3.1

  • Make sure you have the basic development tools : there should be a package called base-devel on your distribution's repositories, so install it!
  • Download the usual install script wget https://install.meteor.com
  • Set the architecture to i686 in the install file (it will download wrong binairies but that should be OK, as we'll change them after). Use your favorite editor for that 😉 then run the install script.
  • Install node.JS and mangodb from your distribution's package provider (pacman -S mongodb nodejs on Arch Linux, apt-get install mongodb nodejs on Debian I assume...)
  • Change the binairies! Bascially, you can Symlink them. Go to ~/.meteor/tools/lastest/bin/, delete node and npm and use ln -s /path/to/node to symlink the node binairy to meteor. Do the same for npm (you can find their path using whereis).
  • While we're here, set the arch in the meteor file to i686 so that it runs.
  • Then we have to change the mongodb binairies which are in ~/.meteor/tools/lastest/mongodb/bin/. Proceed as for node and npm but here for mongod and mongo.
  • The fibers binairy is neither good. We have to change some node modules in consequence. Go to /.meteor/tools/lastest/lib/. You can have a look at installed modules by going to the subdirectory node_modules. In order to install the correct binairies for every module, run in /.meteor/tools/lastest/lib/ the command npm install $(ls node_modules/).
  • A file in Meteor is also checking the architecture. It's called archinfo.js and is located in ~/.meteor/tools/lastest/tools/. I may be wrong, but I don't think this file is served to the client so you can safely edit the line var machine = run('uname', '-m'); to var machine = "i686";. That's kind of a dirty hack, but it works perfectly so... 😕
  • The mangodb package is also having a trouble loading a dependency called bson (it tries to load a binairy which is not compatible and causes a warning as a consequence). In order to avoid it, you have to go to ~/.meteor/packages/mongo-livedata/{some stuff (for me : 0120179b5c)}/npm and then run in npm install $(ls node_modules/).
  • I think that's it, with these steps you should be able to run a meteor app. For me, the example leaderboard worked perfectly. 😎 And fixing packages is as easy as 🔢 as I explained it in the pervious point with the example of mongodb.

Hope I could help!

Would love an Meteor installer on Raspberry Pi too.

I almost got it working. I checked out @skaag's repository which I managed to build on my udoo quad (armv7l).

So to test things out I created a helloworld project: meteor create helloworld.

When I try to run meteor in the helloworld project, I get:

Error: Unsupported architecture: armv7l
    at Object.host (/home/ubuntu/meteor/tools/archinfo.js:156:15)
    at _.extend._activePluginPackages (/home/ubuntu/meteor/tools/packages.js:661:33)
    ...

So I edit archinfo.js, and add armv7l to the allowed architectures:

    else if (uname === "Linux") {
      var machine = run('uname', '-m');
      if (_.contains(["i386", "i686", "x86"], machine))
        _host = "os.linux.x86_32";
      else if (_.contains(["x86_64", "amd64", "ia64"], machine))
        _host = "os.linux.x86_64";
      else if (_.contains(["armv7l"], machine))
        _host = "os.linux.armv7l";
      else
        throw new Error("Unsupported architecture: " + machine);
    }

This gets me somewhat further. But now I get this error:

/home/ubuntu/meteor/dev_bundle/lib/node_modules/fibers/future.js:173
                        throw(ex);
                              ^
Error: livedata does not have a slice named 'main' that runs on architecture 'os.linux.armv7l'
    at _.extend.getSingleSlice (/home/ubuntu/meteor/tools/packages.js:880:13)
    at /home/ubuntu/meteor/tools/packages.js:909:19
    at Array.map (native)
    at Function._.map._.collect (/home/ubuntu/meteor/dev_bundle/lib/node_modules/underscore/underscore.js:97:56)
    at _.extend.getDefaultSlices (/home/ubuntu/meteor/tools/packages.js:908:14)
    at _.extend.getSlices (/home/ubuntu/meteor/tools/library.js:298:18)
    at _.extend.eachUsedSlice (/home/ubuntu/meteor/tools/packages.js:621:30)
    at _.extend._activePluginPackages (/home/ubuntu/meteor/tools/packages.js:661:10)
    at _.extend._allHandlers (/home/ubuntu/meteor/tools/packages.js:697:17)
    at _.extend.registeredExtensions (/home/ubuntu/meteor/tools/packages.js:721:24)
    at slice.getSourcesFunc (/home/ubuntu/meteor/tools/packages.js:1662:41)
    at _.extend.build (/home/ubuntu/meteor/tools/packages.js:235:17)
    at /home/ubuntu/meteor/tools/packages.js:1041:13
    at Array.forEach (native)
    at Function._.each._.forEach (/home/ubuntu/meteor/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at _.extend.build (/home/ubuntu/meteor/tools/packages.js:1040:7)
    at _.extend.getForApp (/home/ubuntu/meteor/tools/library.js:280:9)
    at /home/ubuntu/meteor/tools/bundler.js:1621:25
    at Object.capture (/home/ubuntu/meteor/tools/buildmessage.js:175:5)
    at Object.exports.bundle (/home/ubuntu/meteor/tools/bundler.js:1555:31)
    at /home/ubuntu/meteor/tools/run.js:509:32
    at /home/ubuntu/meteor/tools/fiber-helpers.js:24:12

I'm not sure what to do from here... Ideas?

Contributor

skaag commented Jun 11, 2014

I made a list for myself, in case a new version of meteor comes out, so I can repeat the same patches on the new source tree. I’m pasting it here so you can try it yourself. If you find something I forgot, please let me know :-)

And to the Meteor devs, if you are reading this, I feel this patch could easily make it to the core. I really see no reason why it shouldn’t. I’ve been compiling it successfully from 0.6.x all the way to the most recent release with the below patch, and it works beautifully.

METEOR PATCHES FOR ARMV7L

in meteor/tools/archinfo.js line 153 add:
else if (_.contains(["armv7l"], machine))

     _host = "os.linux.armv7l";

in meteor/tools/warehouse.js line 497 add:

else if (arch === "armv7l")

  arch = "armv7l";

in meteor/tools/bundler.js line 1382 add this item to the “archToPlatform” array:
'os.linux.armv7l': ‘Linux_ARMv7l'

in ./meteor line 22 replace the Linux block with this one:

elif [ "$UNAME" = "Linux" ] ; then

ARCH="$(uname -m)"

if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" -a "$ARCH" !="armv7l" ] ; then

    echo "Unsupported architecture: $ARCH"

    echo "Meteor only supports armv7l, i686 and x86_64 for now."

    exit 1

fi

fi

This is it. Once you apply the above modifications, you should be able to generate a dev_bundle, and run your meteor projects.
It works very well for us at InterWallet, and we are very happy with the result. It’s pretty quick too (surprisingly!).

Let me know if you encounter any issues.

Skaag

On Jun 10, 2014, at 4:49 PM, Jostein Austvik Jacobsen notifications@github.com wrote:

I almost got it working. I checked out @skaag's repository which I managed to build on my udoo quad (armv7l).

So to test things out I created a helloworld project: meteor create helloworld.

When I try to run meteor in the helloworld project, I get:

Error: Unsupported architecture: armv7l
at Object.host (/home/ubuntu/meteor/tools/archinfo.js:156:15)
at _.extend._activePluginPackages (/home/ubuntu/meteor/tools/packages.js:661:33)
...
So I edit archinfo.js, and add armv7l to the allowed architectures:

else if (uname === "Linux") {
  var machine = run('uname', '-m');
  if (_.contains(["i386", "i686", "x86"], machine))
    _host = "os.linux.x86_32";
  else if (_.contains(["x86_64", "amd64", "ia64"], machine))
    _host = "os.linux.x86_64";
  else if (_.contains(["armv7l"], machine))
    _host = "os.linux.armv7l";
  else
    throw new Error("Unsupported architecture: " + machine);
}

This gets me somewhat further. But now I get this error:

/home/ubuntu/meteor/dev_bundle/lib/node_modules/fibers/future.js:173
throw(ex);
^
Error: livedata does not have a slice named 'main' that runs on architecture 'os.linux.armv7l'
at .extend.getSingleSlice (/home/ubuntu/meteor/tools/packages.js:880:13)
at /home/ubuntu/meteor/tools/packages.js:909:19
at Array.map (native)
at Function.
.map._.collect (/home/ubuntu/meteor/dev_bundle/lib/node_modules/underscore/underscore.js:97:56)
at _.extend.getDefaultSlices (/home/ubuntu/meteor/tools/packages.js:908:14)
at _.extend.getSlices (/home/ubuntu/meteor/tools/library.js:298:18)
at _.extend.eachUsedSlice (/home/ubuntu/meteor/tools/packages.js:621:30)
at _.extend._activePluginPackages (/home/ubuntu/meteor/tools/packages.js:661:10)
at _.extend._allHandlers (/home/ubuntu/meteor/tools/packages.js:697:17)
at .extend.registeredExtensions (/home/ubuntu/meteor/tools/packages.js:721:24)
at slice.getSourcesFunc (/home/ubuntu/meteor/tools/packages.js:1662:41)
at .extend.build (/home/ubuntu/meteor/tools/packages.js:235:17)
at /home/ubuntu/meteor/tools/packages.js:1041:13
at Array.forEach (native)
at Function.
.each.
.forEach (/home/ubuntu/meteor/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at _.extend.build (/home/ubuntu/meteor/tools/packages.js:1040:7)
at _.extend.getForApp (/home/ubuntu/meteor/tools/library.js:280:9)
at /home/ubuntu/meteor/tools/bundler.js:1621:25
at Object.capture (/home/ubuntu/meteor/tools/buildmessage.js:175:5)
at Object.exports.bundle (/home/ubuntu/meteor/tools/bundler.js:1555:31)
at /home/ubuntu/meteor/tools/run.js:509:32
at /home/ubuntu/meteor/tools/fiber-helpers.js:24:12
I'm not sure what to do from here... Ideas?


Reply to this email directly or view it on GitHub.

Thanks @skaag!

Most of those patches were already applied by your build script. Unfortunately it haven't brought me any further.

Would you happen to have some precompiled version available? The one that your build script tries to fetch seems to be unavailable.

Contributor

skaag commented Jun 11, 2014

You aren’t supposed to fetch anything. After applying those patches, you need to go into your /scripts/ folder and running the generate-dev-bundle.sh script. What this script does is build the meteor dependencies and the result is a file called dev_bundle_Linux_armv7l_0.3.37.tar.gz in your meteor root folder.

Once this file is there, the meteor script will find it, extract it, and you’ll be able to run meteor projects.

On Jun 10, 2014, at 5:54 PM, Jostein Austvik Jacobsen notifications@github.com wrote:

Thanks @skaag!

Most of those patches were already applied by your build script. Unfortunately it haven't brought me any further.

Would you happen to have some precompiled version available? The one that your build script tries to fetch seems to be unavailable.


Reply to this email directly or view it on GitHub.

I can't get any version node 0.10.x that I compile running. When running the compiled version of node, it just eats 100% of the CPU forever and does nothing. I was able to locate a DEB of node 0.10.1 which installs and works for me, and I'm now trying to find out if I can use it with some old meteor version. I can compile and run the 0.11.x series of node just fine, but it doesn't work with the meteor dependencies it seems.

I will continue trying to get things working, but it would be really convenient if arm (armv7l / armel in my case) were supported.

vflyson commented Jun 16, 2014

0.10.28 works fine for us

I switched from Linaro Ubuntu 12.04 LTS to Debian Wheezy armHF and now I get node compiled and working. Maybe it was an issue with hard float and soft float, I'm not sure.

However, now I'm having issues compiling mongodb. The main mongo repo didn't work (as expected) so I checked out mongo-nonx86. When compiling I get:

In file included from src/third_party/boost/boost/thread/pthread/mutex.hpp:14:0,
                 from src/third_party/boost/boost/thread/mutex.hpp:16,
                 from src/third_party/boost/boost/thread/pthread/thread_data.hpp:12,
                 from src/third_party/boost/boost/thread/pthread/condition_variable.hpp:10,
                 from src/third_party/boost/boost/thread/condition_variable.hpp:16,
                 from src/mongo/util/goodies.h:22,
                 from src/mongo/pch.h:78,
                 from src/mongo/shell/dbshell.cpp:18:
src/third_party/boost/boost/thread/xtime.hpp:23:5: error: expected identifier before numeric constant
src/third_party/boost/boost/thread/xtime.hpp:23:5: error: expected '}' before numeric constant
src/third_party/boost/boost/thread/xtime.hpp:23:5: error: expected unqualified-id before numeric constant
src/third_party/boost/boost/thread/xtime.hpp:38:13: error: 'int_fast64_t' does not name a type
src/third_party/boost/boost/thread/xtime.hpp:41:13: error: 'int_fast32_t' does not name a type
src/third_party/boost/boost/thread/xtime.hpp:43:5: error: 'xtime_sec_t' does not name a type
src/third_party/boost/boost/thread/xtime.hpp:44:5: error: 'xtime_nsec_t' does not name a type
src/third_party/boost/boost/thread/xtime.hpp:46:14: error: expected type-specifier before 'system_time'
src/third_party/boost/boost/thread/xtime.hpp: In function 'xtime get_xtime(const system_time&)':
src/third_party/boost/boost/thread/xtime.hpp:64:9: error: 'struct xtime' has no member named 'sec'
src/third_party/boost/boost/thread/xtime.hpp:64:25: error: expected type-specifier
src/third_party/boost/boost/thread/xtime.hpp:64:25: error: expected '>'
src/third_party/boost/boost/thread/xtime.hpp:64:25: error: expected '('
src/third_party/boost/boost/thread/xtime.hpp:64:25: error: 'xtime_sec_t' is not a member of 'xtime'
src/third_party/boost/boost/thread/xtime.hpp:64:78: error: expected ')' before ';' token
src/third_party/boost/boost/thread/xtime.hpp:65:9: error: 'struct xtime' has no member named 'nsec'
src/third_party/boost/boost/thread/xtime.hpp:65:26: error: expected type-specifier
src/third_party/boost/boost/thread/xtime.hpp:65:26: error: expected '>'
src/third_party/boost/boost/thread/xtime.hpp:65:26: error: expected '('
src/third_party/boost/boost/thread/xtime.hpp:65:26: error: 'xtime_nsec_t' is not a member of 'xtime'
(... plus a lot more similar errors about boost xtime.hpp ...)

What is the latest version of mongodb that people have compiled successfully for ARM? I will check out some older versions in git and try compiling them as well to see if that helps. The latest version of mongodb-nonx86 as of this post is 47fbbdceb21fc2b791d22db7f01792500647daa9.

TPXP commented Jun 19, 2014

@josteinaj Not a C expert, but this appears to be a problem related to LibBoost. A guide about compilation on Debian was written, you might want to have a look at it, so that you install the dev packages of libBoost made for your distribution.

Once you'll have done this, you'll be able to ask scones to build MongoDB using files installed for your distribution, editing this file (have a look at lines 17-26).

By the way, have you tried apt-get install mongo ? Who knows, there's maybe a pre-compiled version of Mango already available!

Thanks @TPXP ! I'll have a look at that site.

I did try this one which starts out by installing a bunch of libboost packages:
http://aloon.com/install-mongodb-in-raspberry-pi/

...but I'll try your link as well.

After thing I'm trying is to add the unstable "sid" branch of debian to my debian install, which let me install pretty much the newest mongodb (sid also has the newest version of node it seems, but I won't bother with that as I managed to compile the standalone version). I symlinked mongodb/bin/mongo and mongod to /usr/bin/mongo and mongod (going by memory now, I'm not by the device to check the exact paths), and now I seem to be very close to get it working, but mongo seems to be unable to open the correct port or something. I'll post the error I get when I get back home - maybe there's just some config setting I've missed.

The installed mongodb is not statically linked unfortunately; otherwise I could've copied it into the dev_bundle and used it from there (and maybe uploaded a version somewhere for anyone else to use as well).

Error I'm currently getting when trying to start meteor:

debian@udoo-debian-hfp:~/meteor/docs$ meteor
=> Running Meteor from a checkout -- overrides project version (0.8.1.3)
[[[[[ ~/meteor/docs ]]]]]

=> Started proxy.
Unexpected mongo exit code 48. Restarting.
Unexpected mongo exit code 48. Restarting.
Unexpected mongo exit code 48. Restarting.
Can't start Mongo server.
MongoDB exited because its port was closed, or was already
taken by a previous instance of MongoDB

Check for other processes listening on port 3001
or other Meteor instances running in the same project.

TPXP commented Jun 20, 2014

@josteinaj Try sudo netstat -lp | grep 3001. Perhaps a process is using this port.

Also make sure mongoDB is working using mongod. Perhaps something like mongod --dbpath ~/mongodb-test (note the directory must be created).

@TPXP: no other processes seem to be using port 3001. By setting --dbpath I'm able to start mongod manually; thanks!

If I run mongod without setting --dbpath, I get ERROR: dbpath (/data/db/) does not exist. I don't know what --dbpath is set to when mongod is started through meteor. meteor --dbpath /home/debian/meteor/docs/.meteor/local/db/ does not work (it gives me --dbpath: unknown option.).

TPXP 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*.

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 commented Jun 21, 2014

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

@TPXP: Same error.

TPXP commented Jun 21, 2014

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

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 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 .

@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 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.

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

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!

Contributor

TomFreudenberg 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 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.

Contributor

TomFreudenberg commented Nov 4, 2014

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

4commerce-technologies-AG#2

Contributor

TomFreudenberg 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 commented Oct 16, 2015

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

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

ontoport 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?

Contributor

skaag 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!).

Contributor

TomFreudenberg 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 commented Jan 5, 2016

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

ontoport 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!"

Contributor

TomFreudenberg 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"

Contributor

trusktr commented Aug 23, 2016

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

TPXP commented Aug 24, 2016

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

Contributor

Dev1an commented Jun 6, 2017

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

duvrai 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