I am installing libpng on linux system, I am using the following steps as mentioned in the INSTALL file.
cp scripts/makefile.std makefile
cp scripts/pnglibconf.h.prebuilt pnglibconf.h
The above two commands work fine, then I run make , it shows the following message: No rule to make target 'png.h' , needed by 'png.o' . Stop.
I don't know how to fix it, Please explain how to install it.
Looks like the same problem like yours. Proposed solution:
In the libpng source directory, look for png.h "e.g. find . -type f -name png.h -print".
Manually copy this file to /usr/include
Related
I'm not really experienced with graphics programming, but I got curious. I installed both libgtk-3-dev and gtk-3-examples on my Debian 10.7 machine. From there I listed the example package files using dpkg-query -L gtk-3-examples to find some example programs.
In the examples directory I found the following README file:
== Building the examples ==
The examples in this directory are built alongside the rest of GTK+.
The examples under the `application[1-10]` directories are also included in
the GTK+ API reference documentation, and can be built independently, using
the system libraries, by doing:
$ cd application1
$ make -f Makefile.example
Looks straight forward. However, following the directions exactly yields the following result:
make: Makefile.example: No such file or directory
make: *** No rule to make target 'Makefile.example'. Stop.
There are no "Makefile.example" files in the application folders. Running find -name "Makefile*" in the examples directory yields:
./application7/Makefile.in.gz
./application7/Makefile.am
./Makefile.in.gz
./application5/Makefile.in.gz
./application5/Makefile.am
./bp/Makefile.in.gz
./bp/Makefile.am
./application9/Makefile.in.gz
./application9/Makefile.am
./application6/Makefile.in.gz
./application6/Makefile.am
./application2/Makefile.in.gz
./application2/Makefile.am
./application10/Makefile.in.gz
./application10/Makefile.am
./application3/Makefile.in.gz
./application3/Makefile.am
./application1/Makefile.in.gz
./application1/Makefile.am
./application8/Makefile.in.gz
./application8/Makefile.am
./application4/Makefile.in.gz
./application4/Makefile.am
./Makefile.am
I've not had any luck building an example program using the above files. I'm guessing it is because of my unfamiliarity with auto tools? Is there an easy way to build an example GTK program using the above files or do I need know a lot more about make/autotools/configure to get a working example running?
Update:
The cant-run-makefile-am-what-should-i-do post is informative but does not provide a course of action when no configure, bootstrap, or autogen programs can be found within the package. The following command yields no results when executed in my examples directory: find -type f | grep -i -E "*conf*|*auto*|*boot*". I need one of those files to be provided in order to have a successful build (as far as I understand it anyway).
Sorry for the fuss! I'm used to installing regular packages and missed that I needed to download the full source code to get the examples working. So, originally I mentioned that I installed both libgtk-3-dev and gtk-3-examples. I did so using apt-get install libgtk-3-dev && apt-get install gtk-3-examples.
However, to build GTK along with its examples locally it looks like what you want to do is get the source package archive with apt-get source gtk-3-examples (or similar.. I think it actually picked a different meta-package for me when I ran that command).
Then, in my new gtk+3.0-3.24.5 directory there's a nice configure binary that I can run (with subsequent make and make install commands) which produce many files including example program binaries.
So with ./gtk+3.0-3.24.5/examples/application1/exampleapp I get a running example. Voila!
I am trying to install the openCV library for Python however I am new to CMake and have run into some trouble after having cloned the repository in ~/opencv.
I've made a build directory in it with the mkdir command however once inside it when trying to set CMake options in it.
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local
I get prompted with the following error:
CMake Error: The source directory "/Users/eDen/opencv/build/CMAKE_INSTALL_PREFIX=/usr/local" does not exist.
It seems you aren't making the right directory, some Mac OS X installations doesn't include /usr/local/. You can make the directory using, if it's not already created, with:
sudo mkdir /usr/local/
But you say you want to use OpenCV with Python. I recommend you to obtain an already compiled copy unless you need some advanced features not available in the compiled version, like Qt integration or CUDA programming. But these features are included in the arguments of the cmake command.
Instructions on how to obtain OpenCV from Homebrew repository, this page explains the process. Basically, you install Homebrew, then Python, configure it and install some dependencies.
As Tsyvarev mentioned in the comments, you need to specify the path to source directory (i.e. where the main CMakeLists.txt file exists) at the end of your command. So, supposing you are now in the build directory, the final cmake command would be as follows:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
I have the last argument as .. but still get the error.
In my case, there is a bad whitespace in the above arguments. So the last .. is ignored.
I am building OpenSSL on OS X. I would like to direct the built libraries (libcrypto.a, libssl.a etc) to a directory of my choice. Currently they are put in the current working directory.
How do I do achieve that?
This is what I'm doing. I thought specifying the directory for the openssldiroption might do it but it doesn't.
./Configure darwin64-x86_64-cc --openssldir=my-dir
make
I would like to direct the built libraries (libcrypto.a, libssl.a etc) to a directory of my choice. Currently they are put in the current working directory.
OpenSSL 1.1.0 can build in-tree or out-of-tree. OpenSSL 1.0.2 builds in-tree. In both cases all the artifacts are in the OpenSSL root directory. Its effectively hard coded into the scripts (there's two or three of them that interact).
You put them in the directory of your choice by following the build with a make install. If you only care about the libraries (libcrypto.a, libssl.a) then manually cp them.
If needed you can locate the artifacts with:
find . -name 'libssl*'
find . -name 'libcrypto*'
find . -name '*\.o'
There's also some rules about when to use --prefix=XXX and when to use --openssldir=XXX. It depends on both the OpenSSL version number, and the make recipe like make install or make install_sw. For the details, see Compilation and Installation on the OpenSSL wiki.
If you need to re-direct OpenSSL output to your specific directory, then you need to execute configure script like this:
$ ./configure darwin64-x86_64-cc --prefix=/Users/username/mydir --openssldir=/Users/username/mydir/ssl
where "username" is your user name. In this example the output will be performed into "~/mydir" directory. Here:
--prefix option sets the output directory
--openssldir option sets the ssl settings directory
ive been trying to edit a Debian installation CD,
followed tutorial on debian website
https://wiki.debian.org/DebianInstaller/Modify/CD,
successfully extract cd, use genisoimage to recreate iso, try to install debian, no problem.
and then the problem, when i tried to edit one of the package, say i want to change a picture in a package .deb, i used this command:
extract .deb:
mkdir directoryname
cd directoryname
dpkg-deb -x pathtopackage/package_name.deb .
dpkg-deb -e pathtopackage/package_name.deb
building .deb :
dpkg-deb -b . pathtopackage/new_package_name.deb
and replaced the very same package on /pool/main debian cd directory
however after built the iso, it failed to install my edited package,
i've tried to fix md5 sum inside cd, rebuild dist/Release, still no luck.
any advice?
thanks in advance
finally did it.
first mistake
building .deb :
dpkg-deb -b . pathtopackage/new_package_name.deb
correct command:
dpkg-deb -b -Zgzip . pathtopackage/new_package_name.deb
to recreate exact package as original one
and then following the rest tutorial on https://wiki.debian.org/DebianInstaller/Modify/CD,
except for debootstrap error, it can be done by following tutorial from this page
https://bugs.launchpad.net/ubuntu/+source/debootstrap/+bug/1001131
edit my debootstrap.deb, repackage, and voila, done all the works.
apparently my error was because debootstrap error from official debian page doesnt work for me.
hope this information useful for anyone
I unpacked and compiled Ruby 2.1 and installed several support tools.
But OpenSSL won't install while I have libssl-dev installed.
I get this error when making the openssl support:
make: *** No rule to make target `/thread_native.h', needed by `ossl.o'. Stop.
What to do?
I ran into the same problem. Turns out, the last line of the extconf.rb-generated Makefile reads
ossl.o: $(top_srcdir)/thread_native.h $(top_srcdir)/thread_$(THREAD_MODEL).h
However, top_srcdir isn't defined anywhere in the Makefile.
I figured out where the missing header files were by running
sudo find / -name thread_native.h
which returned (approximately)
~/.rbenv/versions/2.1.0/thread_native.h
There's a line at the top that says something like
topdir = ~/.rbenv/versions/2.1.0/include/ruby-2.1.0
so I just added a line below it pointing to the directory from the find:
top_srcdir = $(topdir)/../..
After all that, I did a make clean in the ext/openssl directory and then make ran without the error.
Why don't you use rvm? It compiles, configures, installs and manages the chosen version of the most popular ruby interpreters for you.
Anyway, try using --with-openssl-dir.