makefile not running .PHONY target - makefile

when i am trying to run the following makefile its not running the .PHONY target, does anyone knows why?
node_modules: package.json
npm install
.PHONY: puppeteer-deps
puppeteer-deps:
sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 lib gtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca -certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget```

Make only tries to build targets that it needs to, to satisfy the goal. Targets that aren't needed to create the goal are not run. Making the target .PHONY does not change this fact: it only says that if a target needs to be built and it's marked .PHONY, then it will always be built.
In make, the goal is either the targets given to make on its command line or, if no targets were given on the command line, the first target in the makefile.
Here if you run make your goal is node_modules and since neither that target nor any of that target's prerequisites list puppeteer-deps as a prerequisite, it won't be built.
Consider if you had a clean target, marked .PHONY... you sure wouldn't want that target to always be run!

Related

build sqlsmith autoreconf: 'configure.ac' or 'configure.in' is required

I followed the instructions to install sqlsmith
One of the libraries installation instructions are
brew install libpqxx automake libtool autoconf autoconf-archive pkg-config
cd sqlsmith
autoreconf -i # Avoid when building from a release tarball
./configure
make
I have a problem at
autoreconf -i
the error is
autoreconf: 'configure.ac' or 'configure.in' is required
But when I install autoreconf, I have the newest version.
autoconf is already the newest version (2.69-9).
0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
What could be wrong?

How to install hadoop user environment (HUE) in Raspberry Pi-3?

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

CMake autogenerated Makefile on ubuntu 16.04 docker image prepending "//" to targets

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.

ZeroMQ doesn't spot libsodium

I'm hoping to get the CurveCP functionality working within ZeroMQ ØMQ. I'm using CentOS as the underlying OS.
After downloading and running ZeroMQ, I've done the usual ./configure, make and sudo make install. Then running make check returned many test passes, but stated:
libsodium not installed, skipping CURVE test
So sudo yum install libsodium and sudo ldconfig, then make clean, and the commands above. But next time I ran the make check, the CURVE test is skipped, again reporting no libsodium.
Looking at the tests, I see test_security_curve.cpp has #ifndef HAVE_LIBSODIUM and that preprocessor definition appears to be driving the 'no libsodium' skip.
./configure --with-libsodium as per this page reports libsodium is not installed
./configure --with-libsodium=/home/eng/work/libsodium-master --with-libsodium-include-dir=/home/eng/work/libsodium-master/src/libsodium/include --with-libsodium-lib-dir=/usr/lib64 reports libsodium is not installed.
Solution
In order to get this working, installing libsodium via YUM did not give a version of libsodium viable for a zeromq build. It needed a real build of libsodium, which in turn required a recent copy of autoconf.
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
tar xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local
make
sudo make install
sudo ldconfig
cd ../libsodium-master
./autogen.sh
./configure
make
sudo make install
cd ../libzmq-master
sudo ./configure --with-libsodium=/home/eng/work/libsodium-master --with-libsodium-include-dir=/home/eng/work/libsodium-master/src/libsodium/include --with-libsodium-lib-dir=/usr/lib64
sudo make
make check
sudo make install

g++ is missing when I use codeblocks

I'm using codeblocks with fedora-16. When I try to build it starts the build but then says `"/bin/sh: g++ command not found".
If I select compile, it compiles OK.
So looking at this site they say that gcc uses g++ so I tried "gcc -c this.c" and that worked.
Does anyone have a clue as to what is going on?
In order to compile .c and .cpp files in Fedora you need to install a compiler.
To install the gcc and g++ compilers, you will need the build-essential package. This will also install GNU make.
build-essential contains a list of packages which are essential for building Ubuntu packages including gcc compiler, make and other required tools.
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential
$ gcc -v
$ make -v
Now, you should able to compile software using C / C++ compilers.
To install the manpages for c and c++ development, install the manpages-dev package.
If
$ sudo apt-get install build-essential
doesn't work, try this:
su -
yum install make automake gcc gcc-c++ kernel-devel
Codeblock invokes g++ to link the libraries.

Resources