I am working on a Project, which uses classes from the C++11 standard, on a Fedora 18 machine and want to deploy it on a Centos 6.4 server.
I was able to resolve all loader errors except for the libc and libc++ versions, which are GLIBC_2.11, GLIBCXX_3.4.15 and on my Fedora machine GLIBC_2.14 and at least GLIBCXX_3.4.17 respectively.
Is it possible to tell the compiler to compile/link for the server versions or older compatible versions of the libraries?
When i run ldd executable i get
./executable: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./executable)
./executable: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./executable)
Thanks in advance!
Instead of manually copying libraries to a separate directory you could set up a chroot contaiing the CentOS build env, using mock and the epel-6-x86_64 config.
Use yum in the mock chroot to install the packages you want (e.g. Qt) and build in there, that will ensure the code only uses the CentOS 6 libs that are installed in the chroot, not the rest of the packages on your Fedora OS.
Update:
When I'm using a mock chroot for building GCC I do this:
# only need these steps once to setup the chroot
mock -r fedora-19-x86_64 --init
mock -r fedora-19-x86_64 --install yum
mock -r fedora-19-x86_64 --shell 'mkdir -p /builddir/gcc/src /builddir/gcc/build'
su -c 'mount --bind $PATH_TO_GCC_SOURCES /var/lib/mock/fedora-19-x86_64/root/builddir/gcc/src'
# enter root password
mock -r fedora-19-x86_64 --shell
# now in chroot
yum install gmp-devel mpfr-devel libmpc-devel flex autogen
su - mockbuild
cd gcc/build
../src/configure --prefix=/builddir/gcc/install ... etc. ...
For your purpose you'd replace fedora-19 with epel-6
The bind mount means I don't need to have the GCC sources in the chroot, I can use the existing copy in my normal filesystem. See http://gcc.gnu.org/wiki/InstallingGCC for info on building GCC
Once you install GCC in the chroot you can use it to build your own programs then package them up for CentOS.
To go back into the chroot again later:
mock -r fedora-19-x86_64 --shell
su - mockbuild
Related
I am setting up an environment to run AOSP code on Ubuntu 18.04.1 LTS and got the error "error: VNDK library: libandroid_net's ABI has EXTENDING CHANGES". Please help me to resolve this. I have searched for hours but didn't get the solution.
I have done following things:
Installed required packages: sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip
Installed community-maintained default set of udev rules for all Android devices: apt-get install adb
Install repo: https://source.android.com/setup/build/downloading.html
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Initializing a Repo client
mkdir WORK
cd WORK
git config --global user.name "Your Name"
git config --global user.email "you#example.com"
repo init -u https://android.googlesource.com/platform/manifest
Installed pixel 3 XL binaries which include google-devices and qcom blueline. Used Extractor and ./*.sh command to extract them.
Copied qcom extracted vendor folder into Source Code and then copied pixel 3 xl vendor folder. Meged and replaced in all dialogs.
Run make clobber to clean the build directory.
Run . build/envsetup.sh to initialize the environment.
Run lunch aosp_arm-eng to select your run target as asop_arm BUILD with eng BUILDTYPE.
Run make -j16 to build the code.
Got build error:
error: VNDK library: libandroid_net's ABI has EXTENDING CHANGES
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000e7400000, 83886080, 0) failed; error='Not enough space' (errno=12)
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000cac00000, 73400320, 0) failed; error='Not enough space' (errno=12)
For 'Not enough space' error: I am setting cache and configuring jack
export USE_CCACHE=1 to enable compiler cache
Failed to do prebuilts/misc/linux-x86/ccache/ccache -M 15G because there is no ccache folder exists.
export ANDROID_JACK_VM_ARGS="-Xmx4g -Dfile.encoding=UTF-8 -XX:+TieredCompilation" to configure Jack.
For resolving the VNDK issue I am not sure by may be binaries I have included are not correct so I have deleted the vendor folder that contains Pixel 3 XL binaries.
I am a newbie for this task and just started a week ago to look into this.
Please suggest.
Thank you in advance.
I need to install php-imap on amazon ec2 linux 2 instance.
All the php stuff is inside amzn2extra-lamp-mariadb10.2-php7.2 but php-imap package is missing.
Any advice ?
Thanks
I installed it like this.
I downloaded the php source code of the currently installed version in my Amazon Linux 2
wget http://php.net/get/php-7.2.8.tar.bz2/from/a/mirror
Unpacked it and went into php-7.2.8/ext/imap/
Compiled extension:
phpize
./configure
I got some errors.
Some U8T_CANONICAL stuff so
sudo yum install libc-client-devel
Then libc-client.a not found so created a symlink for it:
cd /usr/lib
sudo ln -s /usr/lib64/libc-client.a
some other imap library error so:
sudo yum install uw-imap-static
I got some other errors so the working configure line was:
./configure --with-kerberos --with-imap-ssl
make
SUCCESS!
cd php-7.2.8/ext/imap/modules
sudo cp imap.so /usr/lib64/php/modules/
Created an ini file to load it:
sudo vi /etc/php.d/30-imap.ini
added to the file this content:
extension=imap
restarted php service (you might need to restart httpd depending on your php installation):
sudo systemctl restart php-fpm
PHPinfo now contains:
imap
IMAP c-Client Version 2007f
SSL Support enabled
Kerberos Support enabled
For those who are facing the U8T_CANONICAL error and can't being able to install the libc-client-devel on Amazon Linux 2 AMI need to do something extra to resolve the U8T_CANONICAL error.
The main problem is that libc-client-devel isn't available so we need to do it in another way.
I found this link while searching for my problem. The solution that is posted here is solid. The following link that i gave is for those who are not being able to install the libc-client-devel will be benifited from the link.
Or you could just copy paste the commands i'm giving below.
1 - sudo yum groupinstall "Development Tools"
2 - sudo amazon-linux-extras install epel
3 - yum install epel-release
4 - sudo yum install libc-client-devel uw-imap-static openssl-devel
5 - sudo ln -s /usr/lib64/libc-client.a /usr/lib
The rest can be followed from respondent.
Again thanks to the person who answered.
Same problem here.
I came from debian/ubuntu and i miss a lot of php packages on aws linux2.
I know it's still a candidate and not a final LTS release. Only worked for a month with this distro and saw a lot of changes and updates. Some php dependencies can be solved with pear or pecl, but I couldn't get nothing working on php-imap.
php-imap depends on libc-client (maybe that's a problem?)
Here is my solution.
Search for the libc-client rpm that correspond to your version and
install manually.
Search for the rpm that corresponds to your php installed version. In my case it was 7.2.5**-2** about 2 weeks ago. (today is
7.2.5**-3** ) and isntall manually
CODE
wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64//php72u-imap-7.2.5-2.ius.centos7.x86_64.rpm -P /tmp
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libc-client-2007f-16.el7.x86_64.rpm -P /tmp
rpm -i /tmp/libc-client-2007f-16.el7.x86_64.rpm
rpm -i /tmp/php72u-imap-7.2.5-2.ius.centos7.x86_64.rpm
If it fails because Failed dependencies:
rpm -ivh /tmp/php72u-imap-7.2.5-2.ius.centos7.x86_64.rpm --nodeps
I dont like this solution, but can't find for now any other solution more stable and easy. It will be a pain with updates....
Installing ruby version with rbenv rbenv install -lreturns the proper list. However
$ rbenv install 2.3.4 -v
fails on the download, even though it can be downloaded via a browser. My hunch about an improper version of openssl (due to some distant memory of having such issues - tls version? - in the past) is supported in verbose mode:
ruby-build: use openssl from homebrew
/var/folders/kV/kVDOSPkcEuqSVnTjenAVRE+++TI/-Tmp-/ruby-build.20170601122915.1010 ~ Downloading ruby-2.3.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.4.tar.bz2
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
error: failed to download ruby-2.3.4.tar.bz2
how to overcome? can I point rbenv to use the downloaded tarball?
The reason is because rbenv use old system curl and old system openssl with it, which knows nothing about protocols TLS v 1.1-1.3. For me, installing new version of curl and openssl with brew did the work:
brew install openssl#1.1
brew install curl
Then add installed curl to your PATH (before default path, which is /usr/bin), and ensure that openssl of actual brew's version is also there (add this to your ./bash_profile or ./zshrc or etc):
export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
export PATH="/usr/local/opt/curl/bin:$PATH"
You can make sure after relaunch of terminal that latest versions of this programs will be used by trying
which -a openssl
which -a curl
openssl version -a
curl -V
First two commands should output all paths with the programs, but top ones should be brew versions. Last two commands should show latest versions of programs (1.1.0f and 7.55 for me now).
Now try
rbenv install [version]
Works on MacOS Sierra with enabled SIP.
HI everybody i am using CentOs7 and havae some troubles with the installation of the contextBroker. I followed the installation on the added the Fiware Repo in my yum repo.
Here is a list of my yum repo:
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,007
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 10,368
extras/7/x86_64 CentOS-7 - Extras 356
fiware Fiware Repository 176
mongodb MongoDB repo 279
updates/7/x86_64 CentOS-7 - Updates 2,070
repolist: 22,256
I am always getting an error message that there are some failed dependencies
libboost_filesystem-mt.so.5()(64bit) is needed by contextBroker-0.15.0-1.x86_64
libboost_system-mt.so.5()(64bit) is needed by contextBroker-0.15.0-1.x86_64
libboost_thread-mt.so.5()(64bit) is needed by contextBroker-0.15.0-1.x86_64
Here is the output of my config file for the fiware.repo
[fiware]
name=Fiware Repository
#baseurl=http://repositories.lab.fiware.org/repo/rpm/$releasever
baseurl=http://repositories.lab.fiware.org/repo/rpm/x86_64/
gpgcheck=0
enabled=1
I found a possible solution under this link, but unfortunately this is not working. In the comment section there is an entry which says that there is a problem with CentOs7 but that doesn`t solve my problem
Btw: this is also not working Boost-Libboost is needed in Centos7 (ContexBroker)
So my question is, did someone installed the contextBroker on CentOs7 via yum and if he/she did how can i solve this problem ?
As you mention, there isn't official support for CentOS 7 at the present moment. However, you could do the following to get a running binary with contextBroker in your CentOS 7 system (actually, this a "quick and dirty" receipt based on the build from sources procedure documented in the Orion manual):
sudo yum install git wget
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -i epel-release-latest-7.noarch.rpm
sudo yum install make cmake gcc-c++ scons
sudo yum install boost-devel libcurl-devel gnutls-devel libgcrypt-devel libuuid-devel
# Install mongoDB driver as described in the documentation
# Install rapidjson as described in the documentation
# Install libmicrohttpd as described in the documentation
mkdir ~/src
cd ~/src
git clone https://github.com/telefonicaid/fiware-orion.git
cd fiware-orion
# optionally, you can set an specific version with a checkout command
# e.g. 'git checkout 1.2.1'. Otherwise, you will build the latest
# code from develop branch
make
BUILD_RELEASE/src/app/contextBroker/contextBroker --version
Moreover, you can use the following to generate a RPM file:
sudo yum install rpm-build
make rpm
# The RPM is generated in rpm/RPMS/x86_64/contextBroker-1.2.0_next-dev.x86_64.rpm
# (version number may vary)
That RPM file is supposed to work in other CentOS 7 systems and you can install just using sudo yum install /path/to/contextBroker-1.2.0_next-dev.x86_64.rpm.
I'm trying to run meteorjs on FreeBSD 9.
I already have nodejs installed from ports.
I also tried:
git clone https://github.com/meteor/meteor.git and then node meteor --help but it does not work.
And I found this "if" into meteor file:
if [ "$UNAME" != "Linux" -a "$UNAME" != "Darwin" ] ; then
echo "Sorry, this OS is not supported."
exit 1
fi
Is there some info on how to install or build meteorjs on FreeBSD?
Thanks!
I've created a custom dev bundle for FreeBSD: https://github.com/yonas/meteor-freebsd
Here are the installation instructions:
Install required packages
sudo pkg install bash ca_root_nss curl expat gettext-runtime git-lite gmake indexinfo libevent2 libffi mongodb node npm pcre perl5 python2 python27 snappy v8
Install Meteor
git clone git://github.com/yonas/meteor-freebsd.git
sudo mv meteor-freebsd /usr/local/share/meteor
sudo ln -s /usr/local/share/meteor/meteor /usr/local/bin/meteor
Create and launch an app
meteor create myapp
cd myapp
meteor
Meteor does not officially support FreeBSD, but it might work. You'll need to generate your own 'dev bundle' (per https://github.com/meteor/meteor#slow-start-for-developers).
First, you'll need to disable the OS specific safety belts in meteor and admin/generate-dev-bundle.sh. You'll also need to get MongoDB binaries from somewhere, as 10gen does not provide pre-built binaries for FreeBSD.
In theory, you should then be able to build a dev bundle with the script. The dev bundle should be the only OS specific portion of meteor, once you have a working dev bundle the rest of the code should run normally.