Prerequisites on installing Spidermonkey - spidermonkey

Considering there is no Mozilla related engines installed on a linux machine. What are the specific libraries or engines needed to successfully install Spidermonkey?

Having built Spidermonkey myself some time ago, I think there are actually no dependencies other than the standard clib and some posix stuff for things like the JS URI Objects.
There's the Mozilla Linux Build Prerequisites, if you want to build it as part of the mozilla tree, although the actual dependencies of Spidermonkey are considerably less.

I don't think it needs to be part of a Mozilla. I am working on a very resource-limited machine thats why I want to know what are the needed libraries to be able to compile Spidermonkey to become a library. I want to make a C application that uses Spidermonkey for its Javascript capability.

If your machine runs Ubuntu you can try using the Spidermonkey package from Launchpad Developers PPA. You can check the package build dependencies for such list.
sudo apt-add-repository ppa:launchpad/ppa
sudo apt-get update
sudo apt-get install spidermonkey-bin

Related

How to install older gcc package using APT from a repository?

I have GCC v9. But I'm trying to install a GCC 4.8.1 version to test a library compilation on that very old version of GCC.
The version is not available in the official Ubuntu repos,it is deprecated, but I've found it in other mirrors as told by the official GCC website. This one seems like popular one:
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
I have very little knowledge of linux package systems except for the basic. I want to keep both versions. So I should do this:
sudo apt -y install gcc-4.8.1 gcc-9
The reason why I want to use this command and not install it from the file, apart from the difficulty of doing that for me, is that I'm following a guide in order to have several GCCs on my system:
https://www.fosslinux.com/39386/how-to-install-multiple-versions-of-gcc-and-g-on-ubuntu-20-04.htm
When I add the url to the sources.list file seems like it is working.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update -q
But when I try to call the install with gcc-4.8.1 or gcc-4.8 , or even gcc-4 the package doesn't exist.
Package gcc-4.8 is not available, but is referred to by another
package. This may mean that the package is missing, has been
obsoleted, or is only available from another source E: Package
'gcc-4.8' has no installation candidate
Also, I don't know if websites like these can be added to the repos list in order to find the package using APT:
http://www.netgull.com/gcc/releases/gcc-4.8.1/
[EDIT]
I downloaded the package from the website I linked. I have no idea how to install this by hand. If only I could find a repository that could help me with this... I have no idea how to make APT help me with the installation.
But I'm trying to install a GCC 4.8.1 version to test a library compilation on that very old version of GCC.
Developers have tools up their sleeve so they don't have to install dependencies and bloating their systems for every library (and every configuration of that library!) they want to try out and test.
Use docker. You could write for example a testing script, assuming your project uses make:
# test_my_lib_in_gcc-4.8.sh
#!/bin/sh
docker run -ti --rm -v $PWD:/project -w /project gcc:4.8 -u $UID:$GID sh <<EOF
make && make test
EOF
that will compile and test your application in using 4.8 gcc. Consider how easy it is to change gcc version - just change the number. You could test your library in gcc, in different versions, and using other compilers and on different distributions to make sure it works for others. If you're a developer of the library, write an automatized CI pipeline that would automatically test your application each commit in specific docker environment, using ex. https://docs.gitlab.com/ee/ci/README.html or https://travis-ci.org/ .

missing libmpfr.so.6 when using a cross-compiler

I am using Ubuntu 18.04
I built a mips cross-compiler using buildroot, but when I tried to test whether it would work,I got this message
/home/daisy/repos/repo/buildroot/output/host/bin/../libexec/gcc/mipsel-buildroot-linux-uclibc/9.3.0/cc1: error while loading shared libraries: libmpfr.so.6: cannot open shared object file: No such file or directory
I searched for solutions , one of which said this:
sudo pacman -S mpfr
Well , my Linux isn't archlinux, this didn't work for me.
somebody please tells me how to deal with it.
The above suggestions of installing libmpfr on your host system are wrong. Buildroot is supposed to have build libmpfr, it should be present in host/lib, and picked up by the cross-compiler by virtue of it having a proper RPATH. If it doesn't work, we need to figure out why, but the correct thing is not to install libmpfr on your host system.
In Ubuntu, apt command (Advanced Packaging Tool) is used for performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.
Try this command :-
sudo apt-get update
sudo apt install libmpfr6
This will install shared libraries: libmpfr.so.6 to your Ubuntu system.
Hope It Helps !

Linux Installation libX11-devel

I am trying to build QT4 (porting from Redhat 5 to 7 with an upgraded gcc compiler) in RedHat 7 and I was getting an error saying X11/Xlib.h can't be found. Anyways, after doing some research most people said to install libX11-devel to get those x11 libraries. Since I am using an offline machine I can't do "apt-get" type commands and have to manually install RPMs. So, I went to my RH-7 installation DVD and got "libX11-devel-1.6.3-3.el7.x86-64" (I have 64 bit OS) and tried to install using "yum install libX11-devel-1.6.3-3.el7.x86_64" and I am getting dependencies errors. It's saying
...Requires: pkgconfig(kbproto)
...Required: pkgconfig(xcb)
...Requires: pkgconfig(xproto)
...Requires: pkgconfig(xcb) >= 1.1.92
So, here are my questions.
1) when it says "pkgconfig(kbproto)", is it saying find the "kbproto....RPM" and do a "yum install". In my dvd I only have "xorg-x11-proto-devel-7.7.13.el7.noarch.rpm". Do I have to somehow find "xorg-x11-proto......x86_64.rpm" since it's a 64 bit machine?
2) Is there a difference between "yum install" and pkgconfig "install"? Are there any other installation variants in Linux?
3)For an offline machine, Is there anyway I can get all the dependencies and install everything at once ?
4) Why is it saying "xcb" requires twice. If I just get a xcb...rpm version above 1.1.92 can I just install it once?
Before actually answering the questions, I am going to suggest to see if you can get the latest version of the packages. The packages on the installation DVD may be really out of date and contain known vulernabilities, and other bugs. Can you use yumdownloader - in an online environment - to download the latest version onto a separate DVD and use that as the installation source? See https://access.redhat.com/solutions/10154 for more information.
To answer the questions themselves:
Requires: foo can refer to a package foo or a "feature" foo. pkgconfig(kbproto) is a "feature" (or virtual requires). You can use yum/rpm to see what provides this. On my Fedora box, for example, rpm -q --provides xorg-x11-proto-devel shows that this package indeed provides pkgconfig(kbproto).
As for x86_64 vs noarch, it doesn't matter. noarch packages work everywhere. Other packages are restricted to the platform. So x86_64 only works on intel/amd x86 64-bit machines. Installing noarch should be fine in your case. If you only had a i686 package, though, that wouldn't be sufficient. You would have to find a x86_64 or noarch package.
Yes, there's a big difference between yum and pkg-config. They do completely different things. One is a system tool for installing RPM packages. The other is a tool for developers for using the right headers and compiler flags. If your concern is finding/installing RPMs, do not use pkg-config directly.
Do you have access to an online machine that can access the RHEL 7 yum repositories? On that machine, do something like this:
mkdir rhel7-packages
cd rhel7-packages
yum provides '*/X11/Xlib.h' # make a note of the package that provides this file. it's libX11-devel on Fedora here
yumdownloader --resolve libX11-devel # download libX11-devel and all dependencies not installed on the system
Then copy/install the RPMs on the machine without internet access.
It's probably printing out xcb twice because it's two different requirements. The unversioned requirement will be satisfied if you install any verison of xcb. The versioned requirement will only be satisfied if you install 1.1.92. If you install 1.1.92, it will satisified both the requirements.
1.
You have to resolve the dependency on the system where you are building your package. This means you need to have those dependencies installed, inclusing libX11-devel. To do that, download the RPMs manually from EL7 repos to local disk and run this:
$ mkdir -p /tmp/libX11_dep_rpms && cd /tmp/libX11_dep_rpms
# Download all dependencies from here. All your packages should be available here:
# http://mirror.centos.org/centos-7/7/os/x86_64/Packages/
# Then install
$ yum localinstall *.rpm
# After this you should be able to build your qt4 package, provided all dependencies are resolved. Otherwise, repeat the procedure for all dependencies
# If you can't download packages, then you need to create a FULL DVD ISO that will contain all packages.
2.
pkgconfig ensures that a requirement is coming from a particular build that provides a particular version of the library. Here are some detail.
3.
Get the Everything ISO from EL7.
4.
This has to do with the pkgconfig and library versions.

how to upgrade develop toolset on CentOS6.3 without the Internet?

Background: My CentOS have no access to the Internet and upgrading OS isn't permitted, but I can upload files to it. I want to use YCM to complete my c++ code.
I intended to install YCM on centos6.3 which have a clang2.8, but YCM needs libcalng3.9. So I have to upgrade my clang and llvm. Then I follow this tutorail to install llvm with source code, however I found that gcc cmake and many other fundamental tools also must be upgraded, or many errors would occur.
In order to install new tool chain, I have downloaded CentOS7.iso and use it as a local yum repo to upgrade development toolset. I don't know whether this way is proper, and it falt into loop dependence. So my questions are below.
Can install YCM without upgrade my development toolset?
Is there an easy/hard way to upgrade my development toolset?
What is the reason that I can't install software on CentOS6.3 using CentOS7.4?
You may use scientific linux's devtoolset packages from http://mirror.centos.org/centos/6/sclo/x86_64/rh/devtoolset-7/
Use rpm or yum to install devtoolset-7 and its dependecies. New binaries will be installed into /opt/rh/devtoolset-7/root/usr/bin. To make use of them you must add the path to the PATH environment variable.
The packages contain prebuilt binaries which require specific versions of shared librarirs, which are not available on mismatched version of centos.

How does one install Tesseract-OCR 3.03 in Ubuntu/Linux distributions?

A friend and I are interested in training the tesseract-OCR engine for a CV project. We tried using some wrappers such as PyTesser and pyocr, but the results are currently not as accurate as we need them to be. As such, we want to try training the tesseract to perform better for our purposes (i.e. identifying text on food labels), but are having some trouble installing the training tools.
What we've tried:
Looking on the google code website, the 'Compiling' page on the tesseract's google code wiki says the training tools are only available on version 3.03. However, the google code 'Downloads' page for tesseract-ocr only has the materials for 3.02. The bottom of the 'Compiling' page also has some comments about installing version 3.03 on Windows and OSX, but no comments yet for Linux users.
There also appears to be some sort of 3.03 source package for Ubuntu but we're not sure how to access it on our computers and the 'Compiling' page says we need to run these commands:
make training
sudo make training-install
We've also found a google group thread about tesseract 3.03 but again it seems like these posts do not include advice for Linux users (unless we missed something during the initial read).
Is this actually a really simple command-line install problem? Or, is there a way train tesseract with 3.02 (which we currently have installed)? Have we been looking at the wrong places for information?
Any advice or links to instructions for installing tesseract-ocr 3.03 for Linux distributions would be greatly appreciated! Thanks.
Tesseract can directly be installed in Ubuntu 14.04 using
sudo apt-get install tesseract-ocr
I don't have any idea if you can do it in older version of Ubuntu because the repo might be updated in later version of Ubuntu.
I had an aws ubuntu 14.04 instance.
when I tried installing Tesseract with
sudo apt-get install tesseract-ocr
It retuned package not found
But this worked for me.
sudo apt-get update
sudo apt-get install tesseract-ocr
Ubuntu is a debian based Linux distribution. The tesseract package you find will most likely be a debian package which will contain tesseract and the required default language files to allow you to run/train tesseract. You do NOT want the source package -- unless you just want to compile it yourself -- no need. You will not have to build tesseract, you just need to install the package. First, it appears you are new to Ubuntu, so please ready InstallingSoftware. It can be as easy as opening up an x-term and issuing the command apt-get install tesseract-pkgname (note: that means whatever the package name is).
There is no shortcut, take the time to understand whether you have a .deb package on your box that need to be installed or whether you are installing from a remote repository. The link above explains how to handle both.
Here is a specific Ubuntu thread dealing with installing tesseract Tesseract 3.0 + Ubuntu 10.04 Installation Guide Hope that helps. Tesseract is very good software.
I don't have any instructions for building Tesseract 3.03 for Linux specifically (I'm on Mac), but here's a link to download the source code for the 3.03 release candidate: https://tesseract-ocr.googlecode.com/archive/3.03-rc1.tar.gz
First run below command
sudo apt-get install tesseract-ocr
It will install tesseract version 3.04
Run below to update the tesseract
sudo apt-get --only-upgrade install tesseract-ocr
It will update tesseract to 4.1.3

Resources