So I have a docker with CentOS 7 which has installed bazel.
I've installed devtoolset-8, llvm-toolset-7.0 and centos-release-scl.
I've also installed bazel 0.29.1 and made.
export CC=clang
export CXX=clang++
I have an shell script which run basel. Befor bazel build command in top of the script I have
source /opt/rh/llvm-toolset-7.0/enable
which enables LLVM-7.0/Clang-7.0. But build failes with:
/opt/rh/llvm-toolset-7.0/root/usr/bin/clang: error while loading
shared libraries: libLLVM-7.so: cannot open shared object file: No
such file or directory
But this lib exists! It's in /opt/rh/llvm-toolset-7.0/root/usr/lib64/
May someone pls help with this ?
Add below to .bash_profile or .bashrc:
source /opt/rh/llvm-toolset-7.0/enable
export CC=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang
export CXX=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang++
Run below as Root
echo /opt/rh/llvm-toolset-7.0/root/usr/lib64/ > /etc/ld.so.conf.d/llvm-toolset.conf
ldconfig
Related
We had initially installed tesseract 3.04 in centos 7, and know switching to tesseract 3.05. We have un-installed the older versions and have already installed leptonica-1.75.3 downloaded from leptonica home site.
But, when we go for installing tesseract 3.05, we get following error
checking for LEPTONICA... no
configure: error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package.
when running ./configure in console in tesseract-3.05.01 folder.
Need to know, where the issue is.
The configure script uses pkg-config to see if the leptonica libs are installed (and have the required version).
After you have compiled and installed leptonica from source code you have to manually tell pkg-config where to find the lept.pc config file which is installed with leptonica. Set the PKG_CONFIG_PATH environment variable so it points to the location of lept.pc. If you installed leptonica to its default location you should do:
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
before running configure for tesseract.
Mine would not work until I did the following copy commands. My Leptonica was installed in the leptonica-1.83.0 directory, yours may be different.
cp /usr/local/leptonica-1.83.0/lib/pkgconfig/lept.pc /usr/lib64/pkgconfig/
cp -a /usr/local/leptonica-1.83.0/lib/liblept /usr/lib64
Also set:
export PKG_CONFIG_PATH=/usr/local/leptonica-1.83.0/lib/pkgconfig
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/leptonica-1.83.0/lib
export LIBLEPT_HEADERSDIR=/usr/local/leptonica-1.83.0/include/leptonica
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/leptonica-1.83.0/lib/pkgconfig
export PKG_CONFIG_PATH=/usr/local/leptonica-1.83.0/lib/pkgconfig/
Then it worked.
I am using laravel/horizon with Osx MAMP pro
when I run the composer it requires laravel/horizon:~1.0
it shows a message -
laravel/horizon v1.0.8 requires ext-pcntl * -> the requested PHP
extension pcntl is missing from your system.
I checked the folder /Applications/MAMP/bin/php7.1.1/php/ext,it doesn't contain pcntl extension.
How can I install that?
download php from http://www.php.net/releases/
tar -xzvf php-7.2.1.tar.gz
cd php-7.2.1/ext/pcntl
/Applications/MAMP/bin/php/php7.2.1/bin/phpize
as # drewjoh metioned ./configure --with-php-config=/Applications/MAMP/bin/php/php7.2.1/bin/php-config --prefix=/Applications/MAMP/bin/php/php7.2.1/bin/php
make && make install
the terminal shows
Installing shared extensions: /Applications/MAMP/bin/php/php7.2.1/lib/php/extensions/no-debug-non-zts-20170718/
open MAMP PRO menu->File ->Edit Template->PHP->7.2.1 add extension=pcntl.so at the end of the php.ini file .
run the command php --ri pcntl and shows
pcntl pcntl support => enabled
Just an addition. Perhaps you followed the above step and still can't get it installed to /Applications/MAMP/bin/php/php7.2.1/lib/php/extensions/no-debug-non-zts-20170718/. Here is something I did that worked for me.
I added the --with-php-config before the --prefix flag and it worked. See step below.
download your MAMP php version from http://www.php.net/releases/ Mine is php7.2.22
Open your terminal and cd into your download folder. Then run this command to decompress the tar.gz file
tar -xzvf php-7.2.22.tar.gz
Cd into the pcntl directory after decompressing.
cd php-7.2.22/ext/pcntl
Run the next line from your terminal to Configure for PHP Api, Zend Module Api, and Zend Extension Api.
/Applications/MAMP/bin/php/php7.2.22/bin/phpize
Then run
./configure --with-php-config=/Applications/MAMP/bin/php/php7.2.22/bin/php-config --prefix=/Applications/MAMP/bin/php/php7.2.22/bin/php; make && make install;
You should see
Installing shared extensions: /Applications/MAMP/bin/php/php7.2.22/lib/php/extensions/no-debug-non-zts-20170718/
Then you can repeat the last two steps above.
You can download the precompiled extensions from here https://github.com/khanakiaphp/mamp_extensions
I have built a project using cmake (LLVM project) and tried to install it by issuing the following command:
$ cmake3 --build . --target install
If I run it using root then there is no problem and the files will be installed under the directory /usr/local/.
My problem is when I want to install the project using normal user.
I get the following error:
CMake Error at cmake_install.cmake:36 (file):
file INSTALL cannot set permissions on "/usr/local/include/llvm"
I have changed the permission of directory /usr/local/ to 777 recursively, and their ownership to root:wheel and I added my normal user to group wheel. But I still cannot install the files into the /usr/local/ directory.
The main issue is about building project in Eclipse which fails at "Build Install" command.
chmod 777 -R / is a very scary command. I've destroyed a system once by doing that.
The philosophy I use for this is:
If I need to deploy something through my IDE to debug or test before packaging, I deploy it locally within my home directory.
I only install stuff to my system (outside of home) if it has been packaged first (*.deb, *.rpm, *.tar.gz) so that I can remove it without problems.
For me, I do this with:
cmake $src
cmake --build . --target install -- DESTDIR=stage
This will configure my project, make it, then install it locally in a folder called ./stage which resides in my build directory. I can then run my executable from ./stage/usr/bin. Note that this only works if make is your generator.
Once I've tested it and I'm happy, I package it and deploy to my system or upload to a repository:
cpack
sudo dpkg -i <package>.deb
We should use USE_SOURCE_PERMISSIONS in our install function.
Example:
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Release/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" USE_SOURCE_PERMISSIONS)
I'm new to ionic framework and getting error when im trying to install ionic.
I have installed apache-ant, nodejs, cordova but when i was trying to install ionic then it throws error as follows.
OS windows 8.1 64 bit.
Please guide me to install this ionic.
\node-sass\build\binding.sln" (default target) (1) ->
(_src_\libsass target) ->
..\..\src\libsass\include\sass/base.h(18): fatal error C1083: Cannot open inc
lude file: 'stdbool.h': No such file or directory [C:\Users\guru.ramachandran\A
ppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln]
..\..\src\libsass\include\sass/base.h(18): fatal error C1083: Cannot open inc
lude file: 'stdbool.h': No such file or directory [C:\Users\guru.ramachandran\A
ppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln]
c:\users\guru.ramachandran\appdata\roaming\npm\node_modules\ionic\node_module
s\node-sass\src\libsass\src\units.hpp(10): error C2668: 'acos' : ambiguous call
to overloaded function [C:\Users\guru.ramachandran\AppData\Roaming\npm\node_mo
dules\ionic\node_modules\node-sass\build\binding.sln]
c:\users\guru.ramachandran\appdata\roaming\npm\node_modules\ionic\node_module
s\node-sass\src\libsass\src\ast.hpp(12): fatal error C1083: Cannot open include
file: 'unordered_map': No such file or directory [C:\Users\guru.ramachandran\A
ppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln]
c:\users\guru.ramachandran\appdata\roaming\npm\node_modules\ionic\node_module
s\node-sass\src\libsass\src\ast.hpp(12): fatal error C1083: Cannot open include
file: 'unordered_map': No such file or directory [C:\Users\guru.ramachandran\A
ppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln]
..\..\src\libsass\include\sass/values.h(5): fatal error C1083: Cannot open in
clude file: 'stdbool.h': No such file or directory [C:\Users\guru.ramachandran\
AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln
The issue is about node-gyp module, which requires VS2013-VS2015 to build components at this time, in their README file, they say
Option 1
Install all the required tools and configurations using Microsoft's
windows-build-tools using
npm install --global --production windows-build-tools
from an elevated PowerShell or CMD.exe (run as
Administrator).
Option 2
Install tools and configuration manually:
Visual C++ Build Environment:
Option 1: Install Visual C++ Build Tools using the Default Install
option.
Option 2: Install Visual Studio 2015 (or modify an existing
installation) and select Common Tools for Visual C++ during setup.
This also works with the free Community and Express for Desktop
editions.
[Windows Vista / 7 only] requires .NET Framework 4.5.1 Install
Python 2.7 (v3.x.x is not supported), and run npm config set python
python2.7 (or see below for further instructions on specifying the
proper Python version and path.)
Launch cmd, npm config set msvs_version 2015
Source: https://github.com/nodejs/node-gyp
Can anyone suggest me a better documentation about spark-jobserver. I have gone through the url spark-jobserver but unable to follow the same. It will be great if some one explain step by step instruction on how to use spark-jobserver.
Tools used in building the project.
sbt launcher version 0.13.5
Scala code runner version 2.11.6
With the above mentioned tools I am getting errors while building the spark-jobserver.
The documentation provided in the jobserver repo is indeed confusing.
Here's the steps I followed to manually build and run Spark Job Server on a local machine.
1. git clone https://github.com/spark-jobserver/spark-jobserver
2. sudo mkdir -p /var/log/job-server
3. sudo chown user1:user1 /var/log/job-server
4. cd spark-jobserver
5. sbt job-server/assembly
6. cd config
7. cp local.sh.template abc.sh # Note that the same name 'abc' is used in steps 8 and 10 as well
8. cp ec2.conf.template abc.conf
9. cd .. # The jobserver root dir
10. ./bin/server_package.sh abc # This script copies the files and packages necessary to run job server into a single dir [ default - /tmp/job-server]
11. cd /tmp/job-server [This is where the files and packages necessary to run job server are published by default]
12. ./server_start.sh
13. Run ./server_stop.sh to stop the server
Hope this helps
Here are the steps that I used to install:
Clone the jobserver repo.
Get sbt using wget https://dl.bintray.com/sbt/native-packages/sbt/0.13.8/sbt-0.13.8.tgz
Move "sbt-launch.jar" in sbt/bin to /bin
Create a script /bin/sbt, contents found here, making sure to change the pointer to java if necessary
Make the above script executable
Now cd into the spark jobserver directory, and run sbt publish-local
Assuming the above was successful, run sbt in the same directory
Finally, use the command re-start, and if it succeeds the server is now running!