I want to add some packages like "yasm", "glib2", "build-essential",... to my yocto distribution but don't know how to handle it.
I already enabled the "tools-sdk" in the local.conf but I need a bit more packages for my use.
Is there a way to declare other packages/images in the local.conf before running bitbake or do I have to install them later on the board?
Maybe one more question concerning the manual installation on the board:
I tried to compile and install yasm manually on the board by downloading the package and configure it. But it does give me an error cause of missing build type. I have to specify it. How do I deal with that?
I hope you understand my questions.
Thanks for your help
Best regards
To add the packages to your image, specify in local.conf
IMAGE_INSTALL_append = " yasm glib2 build-essential"
I tried to compile and install yasm manually
missing build type error
I'm not sure which error have you gotten, probably something yasm-specific. But I believe you are trying to compile yasm without specifying target architecture. Even if you don't know how to include yasm into the image, you still can compile it via bitbake yasm, and bitbake will handle all the parameters you need. Then you can find the artefacts in "build/tmp/work/.../yasm/.../packages-split/yasm/".
Related
I already have CMake2.8 installed, but I would like to install CMake3.3. Can I run into problems when installing both versions alongside each other? Also, how could I specify which CMake version I would like to use when installing packages? To be more specific, how would I run CMake3.3 rather than CMake2.8 and vice versa?
In my experience, having multiple versions of CMake is no different than having multiple versions of any other program. Just make sure the one you are executing is the one you want, which means you either always reference it using an absolute path, or you manipulate your PATH environment variable so the one you want is before the one you do not want. To avoid problems and conflicts with the installers/package managers, I simply install CMake directly by either building it from source of unpacking a pre-built from an archive. This way, I control its installed location.
As a good practice inside a CMakeLists.txt, you should always use the CMAKE_COMMAND variable when invoking CMake subprocesses. Documentation for CMAKE_COMMAND says, it is "the full path to the CMake executable."
Sorry if this is a really dump question. I was able to build opencv for nacl using naclports. I checked-out with pepper 42 and the built it using NACL_ARCH=pnacl make opencv command and it built successfully.
But in src/out/build/opencv folder there are no much files and it is not the file structure that i have seen with regular opencv build. In include/opencv2 folder there is only one file called "opencv.hpp".
I guess i have to do something like make install but i have no idea how to do it. I tried simply running make install but no result. Please if someone can guide me how to get done the rest of the process from here and build it to use with nacl it would be a great help.
The output directory for naclports has structure that captures both the build and install results for packages (per arch) so it has a few more layers.
The installation (result of doing make install) of opencv for pnacl is in:
src/out/build/opencv/install_pnacl/payload/
That installation is also injected into the nacl sdk you're currently pointed at. So ideally, if you're building against something requiring opencv, you'll be able to do so without explicitly referencing the copy in out/.
I'm making a script on c++ that requires the resolution of linear systems. I've looked around and found that the LAPACK++ gives me functions to achieve that end. However I've been having a lot of trouble just getting them installed.
I have the following files:
lapack.lib
blas.lib
libf2c.lib
clapack.h
f2c.h
Those files were given to me to use with microsoft visual studio 2010 some time ago. From what I've read I need at least the lapack.lib and blas.lib libraries, however I have no idea where to put them, or what to install.
I've searched on the web, but all the information I've gathered only got me more confused. If someone could point me in the right direction I'd highly appreciate.
Thanks.
PS1: Take into consideration that I'm very new with Linux.
PS2: Do I have to install LAPACK++ or will LAPACK do? Because there seems to be more information about the later than the first.
First, you may install liblapack-dev and libblas-dev (dev means the libraries and the include files).
Check that it is not installed yet. It is likely if you have files such as /usr/lib/liblapack.a and /usr/lib/libblas.a
To install liblapack-dev and libblas-dev, you may use the package manager called synaptic. According to http://ubuntuforums.org/showthread.php?t=1505249,
"Go to: System -> Synaptic -> Administration -> Package Manager ->
search on lapack (and/or blas), and mark for installation:
libblas3gf
libblas-doc
libblas-dev
liblapack3gf
liblapack-doc
liblapack-dev
-> Apply "
(it is the usual way to install software on Debian or Ubuntu if you are root.)
The package manager will ask for your administrator's password "root".
Then, you may install lapack++. According to http://lapackpp.sourceforge.net/ , open a Terminal and write (press enter at end of line) :
./configure --prefix=/your/install/path
make
make install
if you face something like permission denied after typing make install, it may be because you do not have the right to modify a folder. You may use sudo make install to do it as administrator, but you really need to trust the origin of the software to do so...security...Best advice may be to change /your/install/path for something like /home/mylogin/softs/lapackpp and then add -L /home/mylogin/softs/lapackpp/lib -I /home/mylogin/softs/lapackpp/include to build and link the code. -I means add to include search path and -L means add to library search path...you still need to trust the software, but it's less risky for the operating system that sudo.
To build your code, go to the right folder and type something like
gcc main.c -o main -L /home/mylogin/softs/lapackpp/lib -I /home/mylogin/softs/lapackpp/include -llapackpp -llapack -lblas -lm
If you are not "root", download blas/lapack and build it ! It is exactly the same procedure as lapackpp. But, as you install lapackpp, you may need to add options to -configure...to signal where these libraries are.
Tell us what happened !
Bye,
Francis
The .lib files are operating system specific. They are useless on Linux. You need a Linux build.
I assume we are talking about lapack++ hosted on sourceforge, yes?
In that case:
Whoever gave you the binaries (.lib files) is obliged to give you the sources if you ask them.
You can get the latest sources on the above site.
I have access to computer in a public library and I want to try out some C++ and maybe other code. Problem is that there is no g++ installed and I can't install it using packages because I have no root access. Is there a "smart" way to make a full environment for programming in a home folder?
I have gcc installed (I can compile C code). Also, I have a home folder that is consistent. I don't know where to find precompiled g++, I found only source but I don't know what to do with it. I tried to ask them to install this but it didn't work :)
If you want to install it as a local user
GNU GSRC provides an easy way to do so
Link: http://www.gnu.org/software/gsrc/
After configuration, simply specify the following commands:
cd gsrc
make -C pkg/gnu/gcc
make -C pkg/gnu/gcc install
The second step could also be changed to speed up for an N-core system:
make -C pkg/gnu/gcc MAKE_ARGS_PARALLEL="-jN"
You can run the configure script with the --prefix parameter: ../gcc-4.5.0/configure --prefix=/home/foo/bar. Since it is very likely that the c++ standard library is different then the one on your system, you have to set export LD_LIBRARY_PATH=/home/foo/bar/lib before you can start a program compiled by this compiler.
Once, a long time ago (1992 or so), I went through something similar to this when I bought a SCO system with no development environment. Bootstrapping it up to having a full development environment was a gigantic pain, and not at all easy. Having library header files or gcc on a system would make your job a whole lot easier.
It depends a lot on just how obnoxious the library has been about what kinds of things are installed. If there is no gcc there, your job becomes a bit harder. If there are no header files for glibc there, your job is a LOT harder.
Also, do you get an account on the system so you have a home folder that's consistent from login to login?
If you have no gcc there, you need to find a pre-compiled binary of gcc/g++ and install it somewhere. If you have no header files there, you need to find copies of those and put them on the system.
There is no 'standard' way of installing gcc in your home folder though. All of the solutions are going to have some manner of hand-rolling involved.
Have you asked the librarians if they can change what's installed because you want to learn a bit of programming and only have access to their computers to do it with? That might well be the easiest solution.
From your comment it seems that you do have gcc and if you can compile C code, you have the library header files. So now it's a matter of actually compiling your own version of g++. You could probably find a way to entice the package manager on the system into installing a binary package somewhere other than in a system folder. I think this solution is less fun than compiling your own, and I think there may also be possible subtle problems as that installed package may be expecting to find things in particular places and not finding them there.
First thing to do is to make sure you've downloaded the right source for the gcc package. The place to find that is the GNU United States mirror page. You want to find the gcc-4.5.0.tar.bz2 or gcc-4.5.0.tar.gz file on the mirror site you choose. It will likely be in a gcc directory, and a gcc-4.5.0 sub-folder.
After you have that downloaded, you should untar it. In general you shouldn't build gcc in the folder you untar it into. So create another sibling folder that you actually want to build it in labeled gcc-build. Then the command you want is ../gcc-4.5.0/configure --prefix=$HOME/.local --enable-languages='c c++'.
gcc does require some other packages be installed in order to be able to compile itself. You can use the same --prefix line for these packages to install them in the same place. The gcc website has a list of pre-requisite packages.
$HOME/.local is sort of the standard accepted place for per-user installs of things.
If you have fakeroot, you can use that to set ~/some-path as root to install the packages from. Alternatively, you can setup a chroot environment to do the same.
Given this, you can then use dpkg -i package.deb to install the gcc package(s) on your system. You will need to download and install each package individually (e.g. from the debian website) -- at least binutils, glibc, linux-headers and gcc.
If you are on another system, you will need to get the right packages for that system and install them using the corresponding package manager.
When trying new software and compiling with the classic ./configure, make, make install process, I frequently see something like:
error: ____.h: No such file or directory
Sometimes, I get really lucky and apt-get install ____ installs the missing piece and all is well. However, that doesn't always happen and I end up googling to find the package that contains what I need. And sometimes the package is the wrong version or flavor and is already used by another package that I downloaded.
How do people know which packages contain which .h files or whatever resource the compiler needs? Is there a dependency resolver website or something that people use to decode failed builds to missing packages? Is there a more modern method of automatically downloading and installing transitive dependencies for a build (somewhat like Java's Maven)?
You can also use "auto-apt ./configure" (on Ubuntu, and probably also on Debian?) and it will attempt to download dependencies automatically.
If it's a package in Debian, you can use apt-get build-dep to get all deps.
Otherwise, read the README that comes with the program -- hopefully, it lists all the deps for that program.
The required packages will hopefully be listed in the documentation for building the package. If it says you require foo, you'll probably want to look for foo and foo-devel, and perhaps libfoo-devel. If that doesn't help, in Fedora I'd do something like
yum install install /usr/include/_____.h
(yum will look for the package containing said file). If none of the above works, look for the file name in Google, that should tell you the package where it comes from. But then the going will get rough...