[PD] "make" pix_opencv

IOhannes m zmoelnig zmoelnig at iem.at
Tue Apr 13 09:48:41 CEST 2010

On 2010-04-12 19:45, Gintaras Lau. wrote:
> Dear list,
> There are many step by step sites to add repositories, externals,
> libraries and do other configuration. But what usually drops me down
> is that magic word "make".
> Where could be the important points to understand and finish every
> "make" process my self?

i guess the most important part is to not be afraid to read what the
computer tells you.

> Why lot's of "make" files are bad for my computer but, perhaps works
> fine for others?

because computers are very different.
the simplest solution i can think of is, that "make" would download an
ISO-image from the web, wipe your harddisk and install a mirror of the
developers system.
in most cases, you (as a user) probably don't want that.

> Do I necessarily need to learn C++ to prepare pd work properly and
> have all libraries for my needs and "make, make, make" ?


> What is wrong this time?   (see terminal output)  Thanks for help and
> time you take for it.
> :~/Downloads/pix_opencv$ ./configure
> checking build system type... i686-pc-linux-gnu
> checking if malloc debugging is wanted... no
> looking for pd sources (required) ... pd source tree not found...
> install it and use the --with-pd=<path> configuration option.

not it say very clearly, that it was looking for "pd sources (required)"
and that it was not able to find them.
and that you should install them yourself and then tell the configure
script where to find them with the "--with-pd" flag to configure.

"required" indicates, that it will not be able to successfully build
without them.

> :~/Downloads/pix_opencv$ make clean
> rm -f pix_opencv*.o
> rm -f pix_opencv*.pd_linux
> :~/Downloads/pix_opencv$ make

however, even though you are missing an essential part (the pd-sources),
you happily continue to compile.

not very surprisingly, it fails (your are missing the essential pd-sources)

> g++ -fPIC -DPD -O2 -funroll-loops -fomit-frame-pointer  -ffast-math
> -Wall -W -Wno-unused -Wno-parentheses -Wno-switch
> -DGEM_OPENCV_VERSION=\"0.2\" -g -DLINUX -I/usr/local/pd/src -I.
> -I/usr/local/pd/gem/src -I/usr/local/pd/src `pkg-config --cflags
> opencv` -o pix_opencv_edge.o -c pix_opencv_edge.cc
> In file included from pix_opencv_edge.cc:18:
> pix_opencv_edge.h:27:28: error: Base/GemPixObj.h: No such file or directory

as a matter of fact, it doesn't fail because of missing Pd-sources, but
because of missing Gem-sources.

configure would have told you, that those are required as well, but it
stopped first to tell you that the (equally important) Pd-sources are
> :~/Downloads/pix_opencv$ sudo make
> [sudo] password for hipis:
> g++ -fPIC -DPD -O2 -funroll-loops -fomit-frame-pointer  -ffast-math
> -Wall -W -Wno-unused -Wno-parentheses -Wno-switch
> -DGEM_OPENCV_VERSION=\"0.2\" -g -DLINUX -I/usr/local/pd/src -I.
> -I/usr/local/pd/gem/src -I/usr/local/pd/src `pkg-config --cflags
> opencv` -o pix_opencv_edge.o -c pix_opencv_edge.cc
> In file included from pix_opencv_edge.cc:18:
> pix_opencv_edge.h:27:28: error: Base/GemPixObj.h: No such file or directory
> In file included from pix_opencv_edge.cc:18:

even super-cow powers did not manage to find the Gem-sources.

now seriously:
when you try to compile things, and things fail, then you should try to
find out why they fail. usually you are given hints!
a good idea is to look at the last couple of lines, try to understand
what they say and whether they say that some problem occured.
if a problem occured and those lines give you a hint how to fix the
problem, think whether you can possibly fullfill these hints. most often
you might be able to just fix the problem; e.g. in the example above,
you could easily install the Pd-sources and point configure to it.
sometimes it is impossible. e.g. the configure script for a
spaceship-launcher could fail because it detected that you don't have
any spaceships left.

if you are clueless about the last lines in the output (e.g. the output
of "make" in your example) try to scroll upwards until you find the
first occurence of the keyword "error" or similar (there are often a lot
of lines between the actual error and the last line of the output -
mainly because the compilation process has to cleanup whatever it was
doing in order to give you a useable (and expectable) system) and try to
understand what it says.
in your case it said
"error: Base/GemPixObj.h: No such file or directory"
telling you that there is an error, about a missing file, and this file
is named "Base/GemPixObj.h"
this mainly tells you that you have forgotten to install a certain file
or that make was just not able to find the very file on your 2TB
harddisk; with a bit of intuition, luck and magic you could even guess
what is missing. e.g. "GemPixObj" sounds like it is related to "Gem"
(indeed it is part of Gem), to "Pix" (pixel processing) and to "Obj"
(whatever that means).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3636 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100413/0d67aa43/attachment.bin>

More information about the Pd-list mailing list