"apt-get: command not found" issue raspberrry pi os built using Buildroot - raspberry-pi3

I have built a sdcard.img for raspberry pi using Buildroot. When I run apt-get command it throws error "apt-get: command not found". I did not find apt-get/dpkg package to enable in 'make menuconfig' options. Now I'm trying to run cross-compiled opencv program on my Rpi but some shared libraries are missing and I want to install these libraries using apt repository (as I already did it on standard Raspbian Stretch os & program run successfully).
I googled it, there's no solution for Buildroot rasbpbian os. Also I tried downloading and installing .deb packages for apt/apt-get/dpkg, didn't work.
apt-get: command not found
I want to cross-compile a kernel which will have all the necessary packages such as apt/dpkg, bin and lib files. Or for the time being to get the work done need guidance to install apt/dpkg packages on Rpi buildroot os.

Buildroot will never have apt or any package manager. With buildroot you have to decide ahead-of-time what packages you'll want included in your rootfs. Use Raspbian if you want to use apt-get.

robert-orr has already answered your question but I think you are confused about the naming. You cannot rebuild raspbian using buildroot.
Rebuilding raspbian (a debian derivative) is a fairly involved process. You have to implement bootstrapping of a distro (compile a compiler, compile your packages with your compiled compiler, etc.) See Debian Bootstrap for everything needed to create your own distro from source. This is usually done by debian and debian-derivative distributions only.
You can build a simpler image using Buildroot, if that satisfies your needs. Also look at Yocto/OE to see if that satisfies your requirement for building an image from source.

With a Buildroot-generated system, it is not possible to use a package manager, because there is no way to make sure the package binaries will actually work on your system. There are two reasons for this:
Binaries depend on the toolchain (C library, kernel header version, subarchitecture choices, ABI choices). There are hundreds of combinations of these choices possible in Buildroot, it's not possible to build package binaries for all of them. Traditional distros limit the choices to just one per architecture.
How one package is configured affects how other packages can be built. Again, Buildroot offers choices there, while traditional distros choose one (usually enable all features).
In Buildroot, instead of using apt-get, you'd go back to make menuconfig, select the additional packages you want to install, and rebuild the system.

Related

Installing GCC after flashing SD-Card / Buildroot Distro

I am brand-new to Buildroot and didn’t use embedded systems or distros a lot.
I successfully flashed my STM32 and have buildroot as distro on it but after flashing it I figured out that I needed to install gcc package.
I didn’t find the gcc package after make menuconfig -->target packages. In fact not all packages listed in the buildroot/package/ Directory are listed in the menuconfig target packages interface.
I am really a noob and it would be great if you orient me step by step in order to get this done.
Best Regards
I think you need native compiler on the target in Buildroot. But Buildroot do not provide native toolchain after Buildroot-2012.11.
For more details refer : https://buildroot.org/downloads/manual/manual.html#faq-no-compiler-on-target
If you really need native toolchain try a real distribution like
openembedded
yocto
Fedora
I think this helped you !

Installing Aubit4GL via a source package

please tell me how to install Aubit4gl using a source package in windows i.e. I'm looking for windows commands equivalent for ./configure and make install. I can install binary but I particularly want to install from a source package for certain purposes.
Compiling from source on windows is a particularly complicated process involving mingw and collecting all the dependencies etc.
You're much better off grabbing one of the pre-compiled binaries.
I'd be interested to know what the "certain purposes" are that make compiling from source (for windows) a requirement.

Is there any package management system for MinGW+MSYS?

I am trying to compile some open source libraries in MinGW+MSYS. During the configure phase, I kept seeing some 3rd party libraries are missing.
For now, my solution is to download the source of the missing libraries and follow the GNU build process to compile and install them into my MinGW environment.
Is there any package management system for MinGW+MSYS to install packages easily? Just like apt-get.
I tried the mingw-get for the missing package. But it reports the error below.
mingw-get is the (closest equivalent to apt-get) package manager for MinGW and MSYS. However, it can only manage packages which are actually available for MinGW and/or MSYS, (either because a MinGW developer has built and packaged them, or a member of the MinGW user community has contributed them).
Arbitrarily guessing what packages may be available, and even what their correct package names may be, is unlikely to be productive. Run mingw-get in its GUI mode, (if it's properly installed, just running mingw-get without arguments should start it in this mode), to see a list of packages which are actually available; if you don't see any likely candidates for what you are looking for, then it doesn't (yet) exist. In that case, you will need to either find a non-MinGW alternative build, or build it yourself, from source. (If you choose the latter option, and your build is successful, then you may wish to consider contributing it to MinGW.org).
This works for me as a "package manager".
Install MSYS2. It comes with a package manager called pacman.

Compile C file on openwrt

I have built the openwrt firmware and installed it to a device.
Now I want to compile my source code in C in the device (I can ssh into it).
However, openwrt firmware is quite basic and does not include make.
How can I install make/ equivalent to compile my C source code inside the device running openwrt firmware?
OpenWrt is not intended to work as a build server, so you won't find compiler, linker etc. in its root file system. As you mentioned before, you've successfully compiled the firmware. That means you have cross compiler at hand, so you can cross compile your software and then copy it to your system via scp.
Another approach would be to create your own feed, add your software to this feed, so that at the end you'll get an ordinary ipkg package, that you can download and install via web interface. See OpenWrt documentation for more details.
Lots of Cross Compiler are available for host system i.e PC running any Linux OS.
Just install compiler corresponding to Architecture in which Openwrt is running,
e.g If OpenWRT running on ARM architecture,
sudo apt-get install gcc-arm-linux-gnueabi
then compile source code as:
arm-linux-gcc -o yourprogram yourprogram.c

What would be the best way to install (distribute) dynamic libraries in Mac OSX using CMake/Cpack?

I have a project whose artifacts are two dynamic libraries, let's say libX.dylib and libY.dylib (or .so for linux distributions). There are no executables.
Now I would like to distribute these libraries. Since I already use CMake to compile it, I looked at CPack and successfully generated .tgz and .deb packages for Linux. However, for Mac OSX I have no idea and the CPack Wiki about its generators did not help me much. I managed to generate a PackageMaker package, but as clearly stated at this packagemaker howto, there is no uninstall option when using this util. I then read a bit about Bundles, but I feel lost specially since I have no executable.
Question: What is the correct way to generate a package for Mac OSX using CPack?
My ideal scenario would be either something that installs as easily as a bundle or as a deb file in debian/ubuntu.
Thanks for your help
Edit
One more detail: the code to one of these libraries is not open, so I can't expect the users to do a cmake; make; make install
That's why I want a .deb, .tar.gz, bundle or whatsoever.
It depends on whether you want to install it the UNIX-y way (which is totally an ok thing to do, and actually my own preference as a Mac user) or if you want to install it as a Mac OS X Framework.
To install the libraries the UNIX-y way, you can use:
INSTALL(TARGETS target1 target2 DESTINATION lib)
In the above, replace target1 and target2 with the names of the targets that resulted in libX.dylib and libY.dylib being generated (i.e. whatever you used in ADD_LIBRARY). You can use the variable CMAKE_INSTALL_PREFIX in order to determine where the library ultimately ends up... with the above, if you set CMAKE_INSTALL_PREFIX to /usr/local, then it will install the libraries in /usr/local/lib
Edit
Based on your update, you may find Component Install with CPack and CPack Mac OS X PackageMaker Generator to be of interest. Since you will be installing libraries into the system, the PackageMaker generator is the one you should use. If you were merely distributing an application, then creating a ".app" bundle and distributing it in a ".dmg" would be the proper thing to do. PackageMaker is installed on Mac OS X when you install the Xcode Developer Tools. To package a ".app" bundle in a ".dmg", you can use the Mac OS X disk utility application or its associated commandline tools.

Resources