How can one build v8 from source on most recent Centos 7?
I tried, but ninja build always fails right away with "centos /lib64/libc.so.6: version `GLIBC_2.18' not found" message.
Plus, dependency installer script tells that Centos platform is not supported.
So, is there a way?
Thanks!
That error is due a not compatible C compiler, try compiling a newer GCC. On CentOS 7:
sudo yum install bzip2
cd /usr/local/src
wget https://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-8.3.0/gcc-8.3.0.tar.gz
tar zxf gcc-8.3.0.tar.gz
cd gcc-8.3.0/
./contrib/download_prerequisites
./configure --disable-multilib --enable-languages=c,c++
make
sudo make install
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
echo "/usr/local/lib64" > /etc/ld.so.conf.d/gcc-8.3.0.x86_64.conf
ldconfig
(From their wiki)
You can try using docker to build V8.
See https://github.com/gengjiawen/v8-build.
Related
I have not been able to install either llvm version 9 or clang version 9 on Ubuntu. We have installed them on Windows.
I have tried a command and saw this response.
sudo apt-get install llvm-9
Reading package lists... Done
Building dependency tree
Reading state information...
Done E: Unable to locate package llvm-9
I have also tried and saw this response.
sudo apt-get install clang-9
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package clang-9
My /etc/apt/sources.list file contains
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9.0 main
I found the website and saw that the folder was llvm-toolchain-xenial-9. Trying that version did not work either.
What else can I do?
I have looked at downloading the binaries but am not sure what installation steps I might be missing. I am not interested in compiling source code.
The Clang/LLVM project provides Nightly build packages for Ubuntu and Debian.
See the https://apt.llvm.org
The goal is to provide Debian and Ubuntu [Clang and LLVM] packages ready to be installed with minimal impact on the distribution.
Packages are available for amd64 and i386 (except for recent Ubuntu) and for both the stable, old-stable and development branches (currently 8, 9 and 10).
Packages are built using stage2 and extremely similar to the one shipping in Debian & Ubuntu.
To use:
Add the appropriate repositories to the /etc/apt/sources.list file; there are distinct repos for different Debian and Ubuntu versions.
Add the apt key (shown in the link).
Run an apt update to refresh the cache.
Add packages with apt install clang-9 (or other package as desired).
If something "did not work" using the vetted package system, diagnose that issue directly. Xenial has Clang/LLVM 9 packages, and I've recently installed the packages into Disco.
The described symptom ("Unable to locate package") sounds as though one neglected to run apt update, in which case the packages from the newly-added sources would not be visible to apt. This is a tool-usage issue, not a lack of available packages.
LLVM INSTALLATION STEPS
-----------------------
LLVM Compiler Prerequisites:
OPERATING SYSTEM : Ubuntu 16.04 LTS
RAM : Minimum 16GB to 32GB
SWAP MEMORY : Minimum 10GB to 20GB
MEMORY NEEDED : Minimum 70GB
Install CMake version 3.5.1:
$sudo apt install cmake
LLVM Compiler Installation Steps
Step1:
#download llvm from https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/llvm-8.0.1.src.tar.xz
#download clang from https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/cfe-8.0.1.src.tar.xz
#extract files into folders:
tar -xf cfe-8.0.1.src.tar.xz
tar -xf llvm-8.0.1.src.tar.xz
#change directory names to llvm8 and clang
mv cfe-8.0.1.src clang
mv llvm-8.0.1.src llvm8
Step2 : #change present working directory to llvm_source_directory here it is llvm8
$cd llvm8
##create build directory
$mkdir build
##change pwd to build directory
$cd build
#Build (PATH =/llvm8/build)
#execute following command in build directory:
$cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../
Step3: #execute make command in pwd:
/llvm8/build$ make
Step4 : #after 100% of linking process execute following command in build directory:
$sudo make install
$ sudo reboot
step5 : #after installation restart your system!
#for checking llvm installation type
$llvm-config --version #it shows 8.0.1
$clang --version #it shows 8.0.1
Here are the commands for LLVM 9:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get update
sudo apt-get install clang-9 libclang-9-dev llvm-9-dev
How to install gcc version 4.8 on centos or scientific linux operating systems which require yum for installing.
I tried to download gcc from https://ftp.gnu.org/gnu/gcc/gcc-4.8.2/ and then ran ./configure and then make. After running make it gives me the error: configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
Is there some way by which I may install gcc version 4.8 on linux using yum install
I tried:
1). I tried with yum --enablerepo=testing-2-devtools-6 install devtoolset-2-gcc devtoolset-2-gcc-c++ it gives me repository not found
2). yum group install "Development Tools". It gives me Package gcc-4.4.7-11.el6.x86_64 already installed and latest version
3). building it from scratch, you'll have to do ./contrib/download_prerequisites first to get MPFR, GMP and MPC in the GCC source tree, then make a separate directory and run /path/to/gcc/source/configure.
It gives:
configure: error: building out of tree but /home/Softwares/gcc-4.8.2
contains host-x86_64-unknown-linux-gnu
https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3/html/3.0_Release_Notes/DTS3.0_Release.html#Features
Install the Red Hat Developer Toolset 3.0 (or 2.X) in a way similar to what is described here. (Basically you use a repo someone else built for CentOS).
Google says to try
yum group install "Development Tools"
check out: http://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/
Are there specific steps I can take to build the Xuggle Xuggler source code from Windows 32-bit, Windows 64-bit, Linux 32-bit, and Linux 64-bit? I've tried multiple times on multiple systems and keep getting lots of different errors.
Update
I spent several days trying to get Xuggle Xuggler to compile (and
cross-compile). I successfully tackled compiling both the original GPL
version of the code and an LGPL version. I thought I'd post an
answer to my own question on Stack Overflow to share my knowledge.
Update on Raspberry Pi
I was also able to build and run Xuggler on the Raspberry Pi following these same basic instructions below. I just used
my LGPL version of the code that I maintain on Github, and made modifications for the Pi. I can use the compiled JAR file and binaries on my Radxa Rock (another ARM device) too. If you're interested
in building on the Pi, you can use my pi branch:
https://github.com/e-d/xuggle-xuggler
If you are lazy and just want the precompiled .jar files for the Pi/ARM:
GPL Version (supports H.264)
LGPL Version (no H.264 support)
Here is a formatted version of my answer in a published Google Document.
For completeness (and in case the link goes dead one day), here is less-nicely-formatted text:
Building Xuggle Xuggler (GPL and LGPL Licensed Versions)
[Linux 32-bit, Linux 64-bit, Windows 32-bit, Windows 64-bit]
To build the Xuggle Xuggler library, you will need two Linux virtual machines running Ubuntu 11.10 (32-bit and 64-bit operating systems). A 32-bit version of the OS is required to build Linux 32-bit, cross compiling Windows 32-bit, and cross compiling Windows 64-bit binaries. A 64-bit version of the OS is required to build Linux 64-bit binaries.
Using VirtualBox, I created the two virtual machines discussed above with the ubuntu-11.10-server-i386.iso and ubuntu-11.10-server-amd64.iso disk images. These are headless server versions of Ubuntu. After installation of the OS, follow these steps to build Xuggler (you are welcome to try different dependency versions and not use the root user, but this is what I did to build successfully):
Change to root user:
sudo su
Just use root’s home directory:
cd /root
Update apt-get to use specific repository:
apt-get install python-software-properties
add-apt-repository ppa:ferramroberto/java
apt-get update
Install Java:
apt-get install sun-java6-jdk sun-java6-plugin
Verify the HotSpot Java 6 JVM is the default java:
java -version
If the incorrect version of Java appears, configure the default by running:
update-alternatives --config java
Install gcc, g++, make and all the other build essentials:
apt-get install build-essential
Install YASM:
apt-get install yasm
Install Open SSL:
apt-get install openssl
Install Package Config:
apt-get install pkg-config
Install Git:
apt-get install git
Install Ant:
apt-get install ant-optional
Install JUnit:
apt-get install junit
Install MingGW to be able to build for Windows (mingw-w64 can do 32 and 64-bit Windows):
apt-get install mingw-w64
Download the LGPL configured Xuggle source code (Ed’s fork of the code from Jeff Wallace’s fork from the original GPL xuggle code) or the original GPL version:
LGPL: git clone https://github.com/e-d/xuggle-xuggler.git
GPL: git clone https://github.com/xuggle/xuggle-xuggler.git
Compile and build the JAR files (with binaries inside). Be sure to run the 64-bit Linux build on the 64-bit version of Ubuntu. Also note that between builds you will need to run “ant clobber” to remove all of the compiled files from the previous architecture. To build run:
(32/64-bit Linux): ant stage
(64-bit Windows): ant -Dbuild.configure.os=x86_64-w64-mingw32 stage
(32-bit Windows): ant -Dbuild.configure.os=i686-w64-mingw32 stage
The JAR files will be in the /dist/lib directory.
If you need the Linux binaries to additionally work on CentOS, you’ll now need to change the version of GCC and G++ to use 3.4 instead of 3.6.
Install GCC 4.4:
apt-get install gcc-4.4
Update symbolic links to use 4.4 (the arch-specific link will be different on 32-bit VM):
rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/x86_64-linux-gnu-gcc
ln -s /usr/bin/x86_64-linux-gnu-gcc-4.4 /usr/bin/x86_64-linux-gnu-gcc
Install C++ (G++) 4.4:
apt-get install c++-4.4
Update symbolic links to use 4.4 (the arch-specific link will be different on 32-bit VM):
rm /usr/bin/cpp
ln -s /usr/bin/cpp-4.4 /usr/bin/cpp
rm /usr/bin/x86_64-linux-gnu-cpp
ln -s /usr/bin/x86_64-linux-gnu-cpp-4.4 /usr/bin/x86_64-linux-gnu-cpp
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
rm /usr/bin/x86_64-linux-gnu-g++
ln -s /usr/bin/x86_64-linux-gnu-g++-4.4 /usr/bin/x86_64-linux-gnu-g++
Verify default versions:
gcc --version
c++ --version
cpp --version
gcc --version
You can now run the builds the same way as before (you only need to re-build Linux binaries). The binaries will now be compatible with slightly older versions of many Linux distros (including CentOS compatibility). These 4.4 compiled binaries should still work everywhere the 4.6 compiled versions would run too.
Special thanks to this blog for pointing me in the right direction and giving me the majority of what I detailed above.
How to download and install GDB(GNU Debugger) on Fedora Linux Machine.. I have tried downloading from gnu website 7.1 package, but then it fails during
./configure and then make command...
Please share the source from where i can get information on the same.
Thanks..
I have found this tutorial which might be helpful to install gdb.
http://www.tutorialspoint.com/gnu_debugger/installing_gdb.htm
But for me the command:
yum install gdb
works.
You may need to install some development packages with header files needed to build gdb. The exact package list depends on error messages from ./configure and make. Here is installed package list on my system:
# rpm -qa "*devel"
kernel-devel-2.6.23.1-42.fc8
ncurses-devel-5.6-12.20070812.fc8
python-devel-2.5.1-15.fc8
expat-devel-2.0.1-2
libtirpc-devel-0.1.7-12.fc8
glibc-devel-2.7-2
libstdc++-devel-4.1.2-33
Try to install all of them with yum.
How do you install Boost on MacOS?
Right now I can't find bjam for the Mac.
You can get the latest version of Boost by using Homebrew.
brew install boost.
Download MacPorts, and run the following command:
sudo port install boost
Just get the source, and compile Boost yourself; it has become very easy. Here is an example for the current version of Boost on the current macOS as of this writing:
Download the the .tar.gz from https://www.boost.org/users/download/#live
Unpack and go into the directory:tar -xzf boost_1_50_0.tar.gz
cd boost_1_50_0
Configure (and build bjam):
./bootstrap.sh --prefix=/some/dir/you/would/like/to/prefix
Build:
./b2
Install:./b2 install
Depending on the prefix you choose in Step 3, you might need to sudo Step 5, if the script tries copy files to a protected location.
Unless your compiler is different than the one supplied with the Mac XCode Dev tools, just follow the instructions in section 5.1 of Getting Started Guide for Unix Variants. The configuration and building of the latest source couldn't be easier, and it took all about about 1 minute to configure and 10 minutes to compile.
Install both of them using homebrew separately.
brew install boost
brew install bjam
Fink appears to have a full set of Boost packages...
With fink installed and running just do
fink install boost1.35.nopython
at the terminal and accept the dependencies it insists on. Or use
fink list boost
to get a list of different packages that are availible.
Install Xcode from the mac app store.
Then use the command:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
the above will install homebrew and allow you to use brew in terminal
then just use command :
brew install boost
which would then install the boost libraries to <your macusername>/usr/local/Cellar/boost
In order to avoid troubles compiling third party libraries that need boost installed in your system, run this:
sudo port install boost +universal
Try +universal
One thing to note: in order for that to make a difference you need to have built python with +universal, if you haven't or you're not sure you can just rebuild python +universal. This applies to both brew as well as macports.
$ brew reinstall python
$ brew install boost
OR
$ sudo port -f uninstall python
$ sudo port install python +universal
$ sudo port install boost +universal
you can download bjam for OSX (or any other OS) here
If you are too lazy like me:
conda install -c conda-forge boost