I have a docker image built as follows:
FROM ubuntu:latest
MAINTAINER xyz
COPY apt.conf /etc/apt/
RUN apt-get -y update
RUN apt-get -y install cmake
RUN apt-get -y install libc++-dev
RUN apt-get -y install build-essential
RUN apt-get -y install beignet opencl-headers
RUN apt-get -y install mlocate
RUN updatedb
RUN mkdir /usr/local/code
COPY code /usr/local/code
RUN mkdir /usr/local/build
RUN cmake /usr/local/code/
CMD make
The Makefile autogenerated by CMake has an all target as below:
all:
$(MAKE) -f CMakeFiles/Makefile2 //all
Why is CMake adding this extra "//" before all?
running make fails because it cannot find rule associated with target //all
make[1]: *** No rule to make target '//all'. Stop.
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
The same Makefile autogenerated on a different machine with Ubuntu (without the "//")works fine. Please advise.
Related
I am programming something and one of the things I need to do is to merge 2 directories. How do I do that? Rsync does not work. I tried compiling but after a few seconds it gave me errors.
These are the commands I ran (I ran these because the INSTALL.md said so):
sudo apt install -y gcc g++ gawk autoconf automake python3-cmarkgfm
sudo apt install -y acl libacl1-dev
sudo apt install -y attr libattr1-dev
sudo apt install -y libxxhash-dev
sudo apt install -y libzstd-dev
sudo apt install -y liblz4-dev
sudo apt install -y libssl-dev
./configure
make
sudo make install
a simple and efficient way is with cp
cp --force --archive --update --link ./img1/. ./img2
copy all files of ./img1 directory to ./img2 directory and replaces older items.
the --link option is for merging directories without moving any data.
When hue install on Raspberry pi ,get error .
/usr/local/hue-4.1.0/Makefile.sdk:120: recipe for target '/usr/local/hue-
4.1.0/desktop/core/build/cryptography-1.3.1/egg.stamp' failed
make[2]: *** [/usr/local/hue-4.1.0/desktop/core/build/cryptography-
1.3.1/egg.stamp] Error 1
make[2]: Leaving directory '/usr/local/hue-4.1.0/desktop/core'
Makefile:70: recipe for target '.recursive-env-install/core' failed
make[1]: *** [.recursive-env-install/core] Error 2
make[1]: Leaving directory '/usr/local/hue-4.1.0/desktop'
Makefile:73: recipe for target 'desktop' failed
make: *** [desktop] Error 2
I use Jessie as the new openssl libs in Stretch cause compile problems with Hadoop, so specifically this release:
http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-07-05/
You'll need to install the build dependencies, I use these (but they do include all the ones need for hadoop compilation too, so you could slim it down quite a bit)
apt-get install oracle-java8-jdk maven build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev libfuse-dev libsnappy-dev libsnappy-java libbz2-dev python-dev libsasl2-dev libxml2-dev libxslt-dev libkrb5-dev libffi-dev libldap2-dev libmysqlclient-dev libsqlite3-dev libgmp3-dev libssl-dev
Then download, unpack and build hue 3.11.0
wget http://gethue.com/downloads/releases/3.11.0/hue-3.11.0.tgz
tar -zxvf hue-3.11.0.tgz
cd hue-3.11.0
make apps
I've tested this with 3.11, 3.12, 4.1 and 4.2 using the same build environment on the Pi-3.
If you are looking to build a full hadoop environment on the pi you might want to look at hadoopi:
https://github.com/andyburgin/hadoopi
The README has all the instructions on building and configuring a bunch of hadoop components in addition to Hue.
Andy
I am getting error as shown below while running make all command.
fatal error: google/protobuf/arena.h: No such file or directory
compilation terminated.
cd ~/caffe
sudo make clean
sudo apt-get install libboost-all-dev
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
pip install protobuf
sudo make all
sudo make test
sudo make runtest
Either you don't have protobuf installed or it is outdated. To install, run the following command
sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler
In case it is outdated, you need to compile protobuf from the source.
I am trying to install mesos using the following commands
$ wget http://www.apache.org/dist/mesos/0.28.2/mesos-0.28.2.tar.gz
$ tar -zxf mesos-0.28.2.tar.gz
instructions for stock Ubuntu 14.04
# Update the packages.
$ sudo apt-get update
# Install a few utility tools.
$ sudo apt-get install -y tar wget git
# Install the latest OpenJDK.
$ sudo apt-get install -y openjdk-7-jdk
# Install autotools (Only necessary if building from git repository).
$ sudo apt-get install -y autoconf libtool
# Install other Mesos dependencies.
$ sudo apt-get -y install build-essential python-dev libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev
Then the build commands
# Change working directory.
$ cd mesos
# Configure and build.
$ mkdir build
$ cd build
$ ../configure
$ make
# Run test suite.
$ make check
The last command make check produces this error
internal compiler error: killed (program cc1plus) please submit a full bug report,
with preprocessed source if appropriate.
see <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
make[3]: *** [test/mesos_tests-master_tests.o] Error 4
make[3]: Leaving directory '/home/manar/mesos-0.28.2/build/src'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/home/manar/mesos-0.28.2/build/src'
make[1]: *** [check] Error 2
make[1]: Leaving directory '/home/manar/mesos-0.28.2/build/src'
make: *** [check-recursive] Error 1
Ubuntu version: 14.04
The reported error message comes from GCC. The reason GCC produced an error message is probably because the box ran out of RAM (compiling Mesos needs ~2GB of RAM). What are the hardware specs on the box?
I am trying to build postgreSQL from source on my Debian 6.0 server using a bash shell script but I am running into problems. This is the code I have made so far:
# Initial
apt-get update
apt-get -y install aptitude bzip2 libbz2-dev git-core
aptitude -y install sudo python-all-dev python-setuptools libxml2-dev libgeoip-dev libxslt1-dev uuid-dev gcc automake autoconf libpcre3-dev libssl-dev unzip zip python-psycopg2 libpq-dev wget make libreadline-dev
aptitude -y full-upgrade
# POSTGRESQL
###############################
# Postgresql Download & Install
wget http://ftp.postgresql.org/pub/source/v8.4.6/postgresql-8.4.6.tar.gz -P /tmp
mkdir /tmp/postgresql
tar xzf /tmp/postgresql-8.4.6.tar.gz -C "/tmp/postgresql"
cd /tmp/postgresql/
mkdir /usr/local/pgsql
./configure --prefix=/usr/local/pgsql
cd /usr/local/pgsql
make
make install
# Add User
useradd -s /bin/false "postgresql_user"
chown "postgresql_user" usr/local/pgsql
# Clean Up
rm /tmp/postgresql-8.4.6.tar.gz
rm /tmp/postgresql
# Create Database
echo "CREATE ROLE PSQL LOGIN ENCRYPTED PASSWORD 'PASS';" | sudo -u postgresql_user usr/local/pgsql
sudo -u postgresql_user /opt/bin/createdb --owner PSQL DATADB
The error I get is as follows:
/root/StackScript: line 22: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
chown: cannot access `usr/local/pgsql': No such file or directory
sudo: usr/local/pgsql: command not found
sudo: /opt/bin/createdb: command not found
Can anyone tell me where I am going wrong please? If there is anything else obvious I have done incorrectly I am always open to hear about it!
The first thing you're doing wrong is compiling an old point release of an old major version. Why on earth would you be using 8.4.6 when there's 8.4.15, with quite a few significant bug fixes? See the versioning policy. You shouldn't be using 8.4 for new deployments anyway, use the latest version for new deployments.
Even better, use the debian packages at pgapt.debian.org rather than compiling yourself.
The immediate cause of the error is that unpacking the source tarball produces a directory like postgresql-8.4.6 so you have /tmp/postgresql/postgresql-8.4.6. You're trying to execute the configure script in /tmp/postgresql not /tmp/postgresql/postgresql-8.4.6. cd into the created directory before running configure.