How do I fix DWM "make clean install" command error? - x-dwm

I was setting up DWM window manager on debian, but when conpiling it, it came up with an error.
I installed it, then tried to run it with make clean install, but it did not have the make command. I installed it with sudo apt-get install -y make. I tried to run make clean install, but it came up with the error:
make: cc: No such file or directory
make: *** [Makefile:18: drw.o] Error 127
Help?

Doing just make install (sudo if required) the first time should fix the error.
As to why it happens — you probably have a custom Makefile or your rm binary does not understand the -f flag. The upstream Makefile has the following under the clean target:
clean:
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
Ensure that your Makefile also passes the -f flag to rm (which means "ignore nonexistent files").

Related

How to build and install wal2json without also installing the package postgresql-server-dev on Debian 9?

I'm trying to stream data automatically from PostgreSQL 10 to Kafka using debezium together with the logical decoding plugin, wal2json.
I followed all the instructions on how to build and install the plugin from this link by running these command lines:
$ git clone https://github.com/eulerto/wal2json.git
$ cd wal2json
$ PATH=/usr/lib/postgresql/10/bin:$PATH
$ USE_PGXS=1 make
$ USE_PGXS=1 sudo make install
Yet, the steps for installation include this command line: USE_PGXS=1 make and it requires the installation of this package
sudo apt-get install postgresql-server-dev-10
else, I get the following error
Makefile:10: /usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target '/usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk'. Stop.
In fact, I am not allowed to install the package postgresql-server-dev-10 for personal reasons.
Thus, is there any way to install wal2json without installing that package or without using the command make?
Thank you.

How to uninstall opencv in Ubuntu?

I have the following system:
Linux 64 bit LTS 12.04
I have multiple installations of opencv library on the system.
I want to know the procedure to remove all opencv libraries from the system.
I am having trouble while executing my program through Eclipse IDE.
Though I can build the project when I try to execute it, it gives the following error:
OpenCV Error: Assertion failed (k == STD_VECTOR_MAT) in release, file /build/buildd /opencv-2.3.1/modules/core/src/matrix.cpp, line 1364
terminate called after throwing an instance of 'cv::Exception'
what(): /build/buildd/opencv-2.3.1/modules/core/src/matrix.cpp:1364: error: (-215) k == STD_VECTOR_MAT in function release
Confusing thing is I am not able to find the path specified in the error i.e.
/build/buildd/opencv-2.3.1/modules/core/src/matrix.cpp
I am able to compile the same source code using command line tool gcc and using pkg-config.
However I am unable to do the same through eclipse IDE.
You can also uninstall by going to the "build" folder directory of opencv from terminal, and execute the following
make uninstall
cd ..
sudo rm -r build
sudo rm -r /usr/local/include/opencv2 /usr/local/include/opencv /usr/include/opencv /usr/include/opencv2 /usr/local/share/opencv /usr/local/share/OpenCV /usr/share/opencv /usr/share/OpenCV /usr/local/bin/opencv* /usr/local/lib/libopencv*
I remember I used this command a while ago to remove all opencv related things. It is interactive which promote you to remove the file. choose y or n depending.Take your time and be-careful
$> sudo find / -name "*opencv*" -exec rm -i {} \;
The correct way is cd /path/to/cv/build then sudo make uninstall. Of course you will have to have the source code with you
I tried the exec rm thing but nothing changed. Also FYI, sudo apt-get remove libopencv-* did not remove openCV for me

GLib compile error (ffi.h), but libffi is installed

After a succesful configure, make exits with snipped
gclosure.c:29:17: fatal error: ffi.h: No such file or directory
compilation terminated.
I have libffi installed, and locate ffi.h gives:
/home/luca/gcc4.6/gcc-4.6.0/libffi/include/ffi.h.in
/usr/include/x86_64-linux-gnu/ffi.h
/usr/share/doc/ghc-doc/html/users_guide/ffi.html
/usr/share/doc/libffi5/html/Using-libffi.html
If you have a Debian-based Linux OS with apt-get:
sudo apt-get install libffi-dev
With a Redhat-base OS:
yum install libffi-devel
With Alpine Linux:
apk add libffi-dev
When compling libffi 3.0.9 from source code, the include/Makefile.in installs the includes in the ${PREFIX}/lib/libffi-3.0.9/include directory. I'm sure there's a WONDERFUL reason for that, but I'm annoyed by it.
This line fixes it, when compiling libffi:
/bin/perl -pe 's#^includesdir = .*#includesdir = \#includedir\##' -i include/Makefile.in
The includes will now be installed in ${PREFIX}/include, which is /usr/local/include for me.
My full recipe is:
cd /var/tmp
rm -rf libffi-3.0.9
untgz /usr/local/src/utils/libffi-3.0.9.tar.gz
cd libffi-3.0.9
/bin/perl -pe 's#^AM_CFLAGS = .*#AM_CFLAGS = -g#' -i Makefile.in
/bin/perl -pe 's#^includesdir = .*#includesdir = \#includedir\##' -i include/Makefile.in
./configure --prefix=/usr/local \
--includedir=/usr/local/include
gmake
gmake install
Resolved by manually setting LIBFFI_CFLAGS for location of ffi.h in configure
Check your GCC version and note this entry in the Debian Bug Archive: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523869
It was the final solution to my particular issue (it looked exactly like what you report, but couldn't be solved with the solution above)... my problem had nothing to do with LIBFFI at all.
An old thread, but anyway...
After putting the required files in a location where they could be found, I got it working:
cp /usr/include/x86_64-linux-gnu/ffi* /usr/local/include/
cp /usr/lib/libffi.so /usr/local/lib/

Building emacs 24.1.50

I've just updated to Kubuntu 12.04. Everything works fine except for the latest custom-build emacs. It says now:
emacs: symbol lookup error: emacs: undefined symbol: gtk_window_set_has_resize_grip
So I've decided to re-build emacs. For that I've git pull the latest snapshot, and have done everything as I usually do, but now I get an error during compilation:
In file included from /home/boris/its/blds/emacs/lib-src/emacsclient.c:76:0:
../lib/getopt.h:196:8: error: redefinition of ‘struct option’
/usr/include/getopt.h:106:8: note: originally defined here
../lib/getopt.h:245:12: error: conflicting types for ‘getopt_long’
/usr/include/getopt.h:175:12: note: previous declaration of ‘getopt_long’ was here
../lib/getopt.h:249:12: error: conflicting types for ‘getopt_long_only’
/usr/include/getopt.h:179:12: note: previous declaration of ‘getopt_long_only’ was here
make[1]: *** [emacsclient] Error 1
make[1]: Leaving directory `/home/boris/its/blds/emacs/lib-src'
make: *** [lib-src] Error 2
Google search reveals almost nothing on these errors.
Edit:
The following solves it (thanks to JSON):
git pull
./autogen.sh
./configure --prefix=/home/boris/its/soft/Emacs_24.1.50
make bootstrap
make install
The simplest way is to use PPA: emacs-snapshot.
sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs-snapshot
I had these problems updating to Ubuntu 12.04, and got past it by going back to the instructions from INSTALL.BZR for first time checkout - it seems the configure file needs to be regenerated due to changes in libc in the new version of Ubuntu.
This is what I do to build emacs after a git pull (my script to do it nightly)
make distclean && autoreconf -i -I m4 && ./configure && make && sudo make install
i had the same problem than the op, and i just removed emacs from the system, and compiled from scratch.
and no, i didn't have to add a ppa, and every time i see an answer like that getting all the votes, it makes me wonder about stackexchange in general , it just misinforms and misleads others who may have the same problem.
and no, i said it once and i'll say it again, Just download the latest emacs from fsf.
let me add that getopt.h is part of libc6-dev (as json said). and libc6-dev is part of the required group like libjpeg libncurses libpng libtiff xlibs etc. remove it once and reinstall. the problem is with the configuration options path which need to be specified this time around in the prefix of emacs24 at the time of configuration. but neither autogen nor bootstrap are necessary, but just make and make install.
make maintainer-clean
./autogen.sh
./configure
make
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10108#8
I had the same issue as you but for the 24.5 tag. The problem was I didn't rerun autogen.sh to create a new configure script. I assumed that any untracked file would be listed by git status, though all the configuration output from autogen.sh is ignored in .gitignore.

How to install XML::Parser without expat-devel?

XML::Parser fails to build on a quite fresh 64-bit Debian box. After issuing cpan XML::Parser, cpan fails with lots of errors about Expat.c and Expat.xs:
[...]
Expat.xs:2182: error: ‘CallbackVector’ has no member named ‘skip_until’
Expat.c: In function ‘XS_XML__Parser__Expat_Do_External_Parse’:
Expat.c:2904: error: ‘XML_Parser’ undeclared (first use in this function)
Expat.c:2904: error: expected ‘;’ before ‘parser’
Expat.xs:2194: error: ‘parser’ undeclared (first use in this function)
make[1]: *** [Expat.o] Error 1
make[1]: Leaving directory `/root/.cpan/build/XML-Parser-2.41-rpV6ok/Expat'
make: *** [subdirs] Error 2
TODDR/XML-Parser-2.41.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Message at the start of the output explains that expat-devel is needed for building.
Expat must be installed prior to building XML::Parser and I can't find
it in the standard library directories. Install 'expat-devel' package with your
OS package manager. See 'README'.
But expat-devel is not in Debian repository.
Is it possible to get over this without need to build/install expat from source?
The package you want to install is named libexpat1-dev. You could also just install libxml-parser-perl via apt-get. Or if you really want to install via CPAN try installing the Debian packages dependencies first via apt-get build-dep libxml-parser-perl.
libexpat1-dev contains both libexpat and expat.h, which are both mentioned in the message as well:
If expat is installed, but in a non-standard directory, then use the
following options to Makefile.PL:
EXPATLIBPATH=... To set the directory in which to find libexpat
EXPATINCPATH=... To set the directory in which to find expat.h
Installing libexpat1-dev seems to solve the problem:
$ aptitude install libexpat1-dev
There is always the manual method - to build/install expat from source.
(This example shows installing to an alternative location for XAMPP | LAMPP)
Download from:
http://sourceforge.net/projects/expat/files/expat/
tar zxf /[where-ever]/expat-2.1.0.tar.gz -C /tmp
cd /tmp/expat-2.1.0
/opt/lampp/bin/perl ./configure --prefix=/opt/lampp LDFLAGS=-L/opt/lampp/lib
make
make install
http://search.cpan.org - search for and download - XML::Parser
tar zxf /[where-ever]/XML-Parser-2.41.tar.gz -C /tmp
cd /tmp/XML-Parser-2.41
/opt/lampp/bin/perl ./Makefile.PL EXPATLIBPATH=/opt/lampp/lib EXPATINCPATH=/opt/lampp/include
make
make test
make install
Work like a charm in Ubuntu 15.04. The only thing that I need is install Perl XML Parser with:
sudo apt-get install libxml-parser-perl
And following the instructions here, I was able to import successfully all my ratings into Rhythmbox. Now, the only work that I need to do is create again the smart play lists, that is nothing compared with my entire libray ratings.
Today I had the same issue wanting to complile the new GIMP 2.9.4 beta on OSX 10.8 and the aid of homebrew.
First install perl
brew install perl
Then the XML::Parser module by going into the perl shell with
perl -MCPAN -e shell
And inside the shell install XML::Parser by typing
install XML::Parser
Exit shell
exit
Now, verify it has been installed successfully. If everything is ok, you will not see an error.
perl -e "require XML::Parser"
If the ./configure still fails missing XML::Parser, then intltools is not using the perl you have installed. Looking at the script tells me it does the test with $INTLTOOL_PERL -e "require XML::Parser". Trying a echo $INTLTOOL_PERL gave out nothing, so the magic is to set it with
export $INTLTOOL_PERL=perl
Now run ./configure again.
None of the above methods worked for me. I had the right environment variables setup but they were somehow not picked up by cpanm that I use to install perl modules. Expat was also installed.
Here is what I did to overcome the same problem that OP is reporting.
This is very close to what #LadyBuzz suggested.
Download the XML::Parser from cpan.org
Extract the tarball into directory and descend to it.
Open the Makefile.pl and edit the first lines to actually have the absolute paths to both: EXPATLIBPATH and EXPATINCPATH
Save the Makefile.pl, go up one level and create a new tarball with the Makefile.pl that you just edited.
Execute cpanm on the newly created tarball.
This resulted in successful installation of the module.