I recently built a web application which needs to run bcrypt and mongodb over a raspberry pi 4 model b.
Mongodb require a 64 bit OS.
Bcrypt succeed installation only with 32 bit OS.
I used Ubuntu 20.04 for 64 bit OS and the latest version of raspbian 32 bit.
I searched in the npm bcrypt package documentation and I found out that they only support pre-built binaries for:
Windows x32 and x64
Linux x64 (GlibC targets only). Pre-built binaries for MUSL targets
such as Apline Linux are not available.
macOS
Therefore, I have those options:
Find another package (bcrypt like) which is functionnal for 64 raspberry pi's os
Find a way to install bcrypt on armv7l 64 bit OS
Downgrade mongo with an old version who support 32 bits and use Raspbian
I documented compiled all the logs in this post.
I'm sure someone already faced this issue and knows how to deal with this. Or even, if you know another alternative, I'll be glad to hear! Thank you
Related
Is it possible or did someone manage to get TwinCAT BSD running on a raspberry pi?
I heard that ARM devices are not yet supported by this OS, but on the beckhoff website it is stated:
Quote: "FreeBSD supports both 32 and 64 bit platforms and makes scalable systems possible with ARM CPUs extending up to powerful Xeon CPUs"
Source: https://www.beckhoff.com/en-us/products/ipc/software-and-tools/twincat-bsd/
If not, would it be possible via a virtual machine running on the raspberry pi?
Or does it really need to run on top of a x86 or x64 CPU?
PS: I know that it's possible to get it running on VirtualBox on Windows, but I am specifically asking about a solution with a raspberry pi.
TcBSD/TwinCat is currently only available for x86 (32 bit) and x64 (64 bit) Intel and officially only supported on their industrial/embedded hardware.
FreeBSD, however is supported on Raspberry PI:
Raspberry Pi 3/4
I've never tried, but you should be able to install FreeBSD on a Rock Pi X which is compatible with many Raspberry Pi Hats but is Intel based. The Rock Pi X also runs Windows 10 and Ubuntu.
On the question of whether or not you could run TC/BSD on unsupported hardware:
You’d likely need to modify it and it would depend on FreeBSD working on the RockPi X first.
I have a working debian package that I'd like to backport to the current version of Raspberry Pi OS 64 bit (not 32-bit Raspbian).
Confusingly, while Debian itself seems to be robust about enabling cross-builds in their own package, there seems to be much less official documentation about how raspberry Pi OS (64 bit) packages are built¹.
Since I'm relatively certain this should be possible, I ask:
How to take a debian .dsc / debian rules, and build, on an x86_64, a 64 bit Raspberry Pi OS 64-bit compatible image
without using QEMU to actually build the image on arm64, without access to an actual RPi,
using an existing debian package that is known to work on sid on aarch64, and should be backportable,
making sure it's actually built against the correct set of Raspbian dependencies.
I'm guess this is a rather standard thing, I just don't know how to do it. I'm happy with using containers and similar technology, as I can easily integrate that with CI.
I do not plan to use an Arm64 VM, as the software in question takes about an hour to build and test, on an x86_64 server, natively.
¹I've talked to plugwash of Raspbian fame, and as earlier versions of this question showed: there's significant confusion about the heredity of Raspbian OS 64 bit: It's not Raspbian nor based on it. But people including Wikipedia and the RPi Foundation themselves conflate Raspberry Pi OS and Raspbian ("Raspberry Pi OS, formerly Raspbian"), which is 32 bit only.
RaspberryPi documentation here has explained how to build the x64 kernel from the source. What you want is in a way exactly like that.
Notice this line on the Kernel building page:
sudo apt install crossbuild-essential-arm64
This command on your Linux host machine installs a compiler that runs on an AMD64 machine but produces a binary that runs on an ARM machine.
And this line tells the compiler to actually build the source for that architecture:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs
Image modules dtbs are specific to your project. they may differ.
As for your Debian package, there is no way that you can transform an AMD64 package into an ARM one. Your package for the RaspberryPi if doesn't exist in an official or some third-party repository, must be built from the source.
Find the source code of your package and build it very similarly to RaspberryOS.
If your Package has dependencies it gets a little more complicated. First, install the dependency on your RaspberryPi. Then you should set up a sysroot on your host machine which is basically a mirror image of the preinstalled packages on RaspberryPi. Then for compiling your package you should give the sysroot address to cross compiler so that it can find dependencies.
There is another way too, you can put the source code of your package on your RaspberryPi and build it locally which can take a very long time based on the source code. Just to have a sense, Qt source code without WebEngine module took 48h for me. But Qt is big.
In conclusion, if your package binary is not on any repository you must compile it from the source.
Cross-compilation of different projects and executables are very similar to each other. To have a clear understanding of the process it can be beneficial to look for some other projects that were ported to RaspberryPi OS. Things like Qt, TagLib for android, and ...
First, I would take a look here:
https://github.com/Truelite/qt5custom for inspiration. I checked and those scritps work. However, you might have problems going completely „qemuless”; e.g. in case of QT some libraries needed to be added to host machine sysroot and qemu was simply the easiest way to add them properly: it seems to me that multiarch Debian has some deficiencies in the field of cross-compilation and the simplest way to overcome them is to pretend it’s the native one.
I have decided to install Cloudmin GPL for XEN in CentOS Server with 64 bit and my server configuration is Hard Disk : 4TB latest Xeon processor. The Scripts download from the URL :
http://cloudmin.virtualmin.com/gpl/scripts/cloudmin-gpl-redhat-install.sh
Which version can support for this.
Note: The CentOS 5.6 with 64 bit version does not support.
I have tested the script
http://cloudmin.virtualmin.com/gpl/scripts/cloudmin-gpl-redhat-install.sh
it's working fine and also you need to configure few things,
yum install birdge-utils*
for more help : https://www.virtualmin.com/documentation/cloudmin/virtualization/xen
i'm working on a web server hosted on a board based on an ARM processor, that is named UDOO (http://www.udoo.org) and is similar to the Raspberry PI, and on it you can install a version of Linaro Ubuntu (11.10) modified for ARM or Android, both are downloadable from the project's site. Lately i've found a version of Ubuntu Server for ARM (http://www.ubuntu.com/download/arm/) and i wanted to know if it is compatible with all ARM devices, include the UDOO board. Also i wanted to know if the basic packages for the web server (like apache2, php5, mysql) and other packages (like mysql-connector c++, libcurl, g++) also work on ARM, under Ubuntu Server or under other Linux, like Linaro Ubuntu or Android. Someone can help me?
To install a Web Server on UDOO you can use Tasksel Installer:
sudo apt-get install tasksel
you can launch application with
sudo tasksel
There are other ways to install Ubuntu on the UDOO Board
http://dave.cheney.net/2013/10/20/installing-ubuntu-precise-12-04-on-a-udoo-quad
I just got my UDOO board today and I am going in that direction. So if Ubuntu runs nicely then most Ubuntu applications will run to.
Is there a 64 bit version of Apache Tuscany SCA?
From https://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/INSTALL
Tuscany provides two automated install scripts for Ubuntu. You can start with
a fresh Ubuntu Server 10.10 64-bit system and these scripts will take care of
all the download, build and installation steps for you.