Compiling V8 JavaScript engine faster - v8

I have a project where I'm using the V8 JavaScript engine from Google. I also use Travis CI to build and deploy my project. The build often exceeds the maximum time limit (~45 min) and fails because of this. I have done the following to speed up the compile time for V8 (which made some difference):
Don't build tests
Disabled support for i18n
How could I speed up the compile time for V8 even more?

I use V8 binary package from a PPA. in my .travis.yml file. It looks like this:
before_install:
- sudo add-apt-repository ppa:pinepain/libv8-5.2 -y
- sudo apt-get update -q
- sudo apt-get install libv8-dev -y

I ended up using the built-in caching features in Travis CI. Time to compile went down from 45 min to 13 min. Happy! Thanks to the comments that pointed me in the right direction.

Related

Installing OpenMPI 4.1.4 on RHEL 9.1

I am trying to install OpenMPI on a new install of RHEL 9.1, and keep getting this error while using mock:
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.6QyYma (%build)
Macro expanded in comment on line 708: %{install_in_opt}, then we're instaling OMPI to
Bad exit status from /var/tmp/rpm-tmp.6QyYma (%build)
Full output here. Generated from $ mock -r rhel-9-x86_64 rebuild openmpi-4.1.4-1.src.rpm. Not sure if it changes things, but I did do $ mock -r rhel-9-x86_64 --init beforehand as well.
I got a src.rpm from the OpenMPI download page, and because I did not know how to install it, used this and this, as well as the epel docs to help me along the process. I changed any rhel or epel 7 references to 9, and during installation/initialization for mock, everything seemed to work alright (as far as I could tell).
Coming from Ubuntu, I previously used the deprecated mpif90 to compile mpi stuff, but I believe I was able to install that using a package. I now want to use mpifort. Is there a better/different way to install the mpifort compiler wrapper, or a problem with my installation process? Is it not supported currently, and should I install legacy support of some kind?

Hyperledger fabric composer test sample not work?

I follow and try same sample code in this instruction
Playground tutorial
but when I submit a transaction Error: Could not find any functions to execute for transaction org.acme.mynetwork.Trade#d77dbd2d-53e3-4435-b4fb-d802d5bd6bec.
Anyone have any idea?
This may have been an error you saw in Playground in v0.14.3. Suggest to update (ie re-install) your Composer dev environment to the current release v0.15.0 (as of Nov 10th) - there is a new tutorial (its changed from what you saw) and it will use Business network cards for the network deploy (createComposerProfile.sh is no longer needed) - makes life easier. To get the latest version, you will need to install the modules as per the docs -> https://hyperledger.github.io/composer/installing/development-tools.html - this will get the latest release. Make sure you do a full teardown using the scripts you downloaded in fabric-tools (as your CC containers will be 0.14.3 or earlier and thus out of date) and that you then subsequently, do an npm -g uninstall of the same module names eg composer-cli, composer-playground etc and such that they are all at the same level (0.15.0) upon subsequent npm -g install of same composer modules.

What to do when Installation can't find a library or program?

I am a pretty good programmer and I have been working with Linux for 10+ years, but sometimes when trying to build programs from source I hit a brick wall. The current problem occurs when trying to build vlc, it claims that
/usr/bin/ld: cannot find -lvorbisdec
This happens quite frequently. The first thing I do is try
sudo apt-get install vorbisdec
But that doesn't always [ever] work. Next I try googling it, but 99 times out of a hundred I get something like this
vorbisdec...did you mean vorbisenc
I had a very similar problem tyring to install libgoom2. It doesn't help that sometimes the binaries you need (ie. goom) are in a preppended and appended file name (ie. xmms-libgoom2-dev)
Could someone fill in the missing step (s) with respect to how to properly go about installing programs from source:
`sudo apt-get install
???
give up installing
Most of libraries requested by ./configure can be installed with
sudo apt-get install lib[library name]-dev
For example, vorbisdec is available in libvorbis-dev package. Sometimes you have to specify version number, like libxcb-composite0-dev, liblua5.2-dev, or if you don't know version number libxcb-composite*-dev. If apt-get still can't find requried packages, you have to compile them from source, and then run
sudo ldconfig
EDIT: You can also use Tab button to list packages starting with libvorbis:
$ sudo apt-get install libvorbis[Tab]
libvorbis libvorbisfile3 libvorbis-ocaml
libvorbis0a libvorbisfile-ruby libvorbis-ocaml-dev
libvorbis-dbg libvorbisfile-ruby1.8 libvorbisspi-java
libvorbis-dev libvorbisidec1
libvorbisenc2 libvorbisidec-dev
ANOTHER EDIT: There is more :D
$ apt-cache search vorbis
libshout3 - MP3/Ogg Vorbis broadcast streaming library
libshout3-dev - MP3/Ogg Vorbis broadcast streaming library (development)
libtag1-dev - audio meta-data library - development files
libtag1-doc - audio meta-data library - API documentation
libtag1-vanilla - audio meta-data library - vanilla flavour
libtag1c2a - audio meta-data library
libtagc0 - audio meta-data library - C bindings
[...]
You can solve with
sudo apt-get install libvorbis-dev

How can I install imagemagick Wheezy version in Squeeze

I have a little problem because I want to install Imagemagick in Squeeze but I need last version. Squeeze only supports up to 6.6.0.4-3 but Wheezzy supports up to 6.7.7.10 and I need this version. The problem is that the place where I want to install is a production server and I can not change the source to testing package.
I think I have to compile and install it but I do not know if I'll have any problems with the dependencies.
Can anybody help me, please?
Thanks :)
in theory, you might be able to get wheezy packages for squeeze using [backports.debian.org][1]
in practice, it seems that there is no imagemagick backport.
however, you might have luck with trying to build the package yourself.
the following is untested (as i don't have any squeeze machine at hand), but should work (as root)
# echo "add backports.debian.org to your apt-sources (for debhelper >=9)"
# echo "deb http://backports.debian.org/debian-backports squeeze-backports main" >> /etc/apt/sources.list
# aptitude update
# aptitude install debhelper/backports
# dget -u --build http://ftp.de.debian.org/debian/pool/main/i/imagemagick/imagemagick_6.7.7.10-5.dsc
most likely the last will fail due to missing build-dependencies: simply install those missing deps (they will be printed in the error-message you get)
once the build succeeded, you will end up with a number of .debs in your working directory, which form the entire set of wheezy imagemagick packages - build for squeeze!

Install previous version of a package from old source in windows [duplicate]

A friend sent me along this great tutorial on webscraping The New York Times with R. I would really love to try it. However, the first step is to install a package called [RJSONIO][2] from source.
I know R reasonably well, but I have no idea how to install a package from source.
I'm running macOS (OS X).
If you have the file locally, then use install.packages() and set the repos=NULL:
install.packages(path_to_file, repos = NULL, type="source")
Where path_to_file would represent the full path and file name:
On Windows it will look something like this: "C:\\RJSONIO_0.2-3.tar.gz".
On UNIX it will look like this: "/home/blah/RJSONIO_0.2-3.tar.gz".
Download the source package, open Terminal.app, navigate to the directory where you currently have the file, and then execute:
R CMD INSTALL RJSONIO_0.2-3.tar.gz
Do note that this will only succeed when either: a) the package does not need compilation or b) the needed system tools for compilation are present. See: R for Mac OS X
You can install directly from the repository (note the type="source"):
install.packages("RJSONIO", repos = "http://www.omegahat.org/R", type="source")
A supplementarily handy (but trivial) tip for installing older version of packages from source.
First, if you call "install.packages", it always installs the latest package from repo. If you want to install the older version of packages, say for compatibility, you can call install.packages("url_to_source", repo=NULL, type="source"). For example:
install.packages("http://cran.r-project.org/src/contrib/Archive/RNetLogo/RNetLogo_0.9-6.tar.gz", repo=NULL, type="source")
Without manually downloading packages to the local disk and switching to the command line or installing from local disk, I found it is very convenient and simplify the call (one-step).
Plus: you can use this trick with devtools library's dev_mode, in order to manage different versions of packages:
Reference: doc devtools
From CRAN, you can install directly from a GitHub repository address. So if you want the package at https://github.com/twitter/AnomalyDetection, using
library(devtools)
install_github("twitter/AnomalyDetection")
does the trick.
In addition, you can build the binary package using the --binary option.
R CMD build --binary RJSONIO_0.2-3.tar.gz
If you have source code you wrote yourself, downloaded (cloned) from GitHub, or otherwise copied or moved to your computer from some other source, a nice simple way to install the package/library is:
In R
It's as simple as:
# install.packages("devtools")
devtools::install('path/to/package')
From terminal
From here, you can clone a GitHub repo and install it with:
git clone https://github.com/user/repo.git
R -e "install.packages('devtools');devtools::install('path/to/package')"
Or if you already have devtools installed, you can skip that first bit and just clone the repo and run:
R -e "devtools::install('path/to/package')"
Note that if you're on ubuntu, install these system libraries before installing devtools (or devtools won't install properly).
apt-get update
apt-get install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev -y

Resources