how to add wirinigPi library on buildroot? - makefile

How to add wiringpi in Buildroot image ?
I followed the same steps as described here: How to add an out-of-tree package to buildroot? The download of the git archive functions correctly but the compilation of the library doesn't work. I tried to change the "sh build" command in the .mk file using an absolute path to where the archive was extracted (in output/build).
I also tried to change the build.sh included in WiringPi archive with absolute paths everytime cd was used beacause the make command used with buildroot wasn't executed in the same directory Can you help me write a correct .mk file that will compile wiringpi for my buildroot image using this git: https://github.com/WiringPi/WiringPi ?

WiringPi is/was already in buildroot packages, however, the whole library was deprecated by the author at some point. Due to this and apparently also because the WiringPi's author deleted all sources (according to this), it was moved to buildroot's legacy packages. However, that deprecation post is now removed by the WiringPi author (which is why the first link points to internet archives), so it could be that the sources are also restored and the WiringPi package from the legacy config works or could be made working with small modifications.
TLDR; Even if you could get it working, you should use something else.

Related

Create command when cloning github repository

Today, I went and looked at the Jelly github page. I found this.
I noticed that after they cloned the repo(and moving to the jellylanguage directory), they were able to use the "jelly" command. How is this possible? And how can I do it myself?
It is an executable binary. You can compile code to create a natively executable binary that can be run as ./a - then you can put that in /usr/local/bin to be able to use it from anywhere OR add the directory where that binary is to your path environment variable

Installation of VCPKG followed by any call to "vcpkg install" results in "Changing the working dir failed"

When I follow the steps in the VCPKG documentation page to install on Windows, the noted steps fail on the line .\bootstrap-vcpkg.bat.
Specifically, these are the steps I follow, exactly according to the instructions at the above link.
Run Powershell (not as administrator)
cd <parent_directory>
git clone https://github.com/Microsoft/vcpkg.git
cd .\vcpkg\
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
All above steps (seem to) succeed, until the last (in red, below).
I see the following output:
(Note: the screenshot also shows an additional line at the end - in which I attempted to install a desired package for use in a project - which failed with the same error.)
I looked through the source code of vcpkg and found that the offending line of code looks like this (vcpkg.cpp):
Modifying the vcpkg.cpp source to display the missing path, rebuilding, and testing shows that the missing directory is:
<vcpkg>/installed/...
...But the installed directory does not exist in the vcpkg root directory.
Because I am following the basic installation instructions from the vcpkg documentation, I'm stumped as to what I am doing wrong, what is wrong in my setup, or what to do about it.
Can someone please explain why installation of VCPKG followed by any call to "vcpkg install" results in the error Changing the working dir failed?
I had mistakenly defined the VCPKG_ROOT environment variable to a directory that is a subdirectory of the root directory of the vcpkg project.
This is an easy mistake to make, as I describe below.
The vcpkg executable itself checks for the existence of the VCPKG_ROOT environment variable, and if present, uses its value to override the path to the root folder for the vcpkg project that is used internally by the running vcpkg binary.
I created an environment variable with the same name (VCPKG_ROOT) for a different purpose - so that my own downstream application could be provided the path to the include files for a library installed by vcpkg. It makes sense that I would choose the name VCPKG_ROOT, because in fact vcpkg, by default, installs libraries into a subdirectory of its own root directory.
Specifically:
If the root directory of the 'vcpkg' project is <vcpkg>...
...then by default the vcpkg executable installs libraries such that the include paths for the libraries that are installed are placed in <vcpkg>\installed\...\include\
(And other library files, such as binaries, are also placed in directories nested within <vcpkg>.)
The problem was that I defined VCPKG_ROOT to be the second bullet, not the first. So it's an easy mistake to make, given that the choice of name "VCPKG_ROOT" kind of makes sense in both scenarios!
I just suggested an improved error message via a pull request to the vcpkg project - if accepted, this might save some other poor soul the stress and lost time of tracking down this glitch.

GO API installation fails "evq/chromaticity"

I am trying to install chromaticity on my own machine for testing, and no matter what i do i will always hit the error seen in this picture installation error
I dont know why it happened i tried searching but i found nothing online. my question is does anyone know why it happens? or can point me to the right direction? i have checked the folders and yes there are no GO files in there but i dont see why that is a problem
The api could be found here: https://github.com/evq/chromaticity
This is not an issue (as in bug) on the project, rather an issue due to lack of documentation on how to build the project itself.
If you look at the Makefile file on the root directory, you'll notice that static/static.go is a generated file as part of the build process. Such file is usually not committed to the repo so you'll need to build it yourself. To do so, you'll need to have go-bindata installed.
Here's what you need to do in order to build the project successfully:
Get the go-bindata package
go get -u github.com/jteeuwen/go-bindata/...
Get the project
go get github.com/evq/chromaticity
Go the project root directory
cd [...the chromaticity project root..]
Run make to generate the static/static.go file
make
Build/ install the project
go install
Update:
Noticed from your screenshot that you're using Windows, in that case you may need to workaround the issue of running Makefile in Windows. See here for possible solution: How to run a makefile in Windows?
I've run into the same issue when trying to "get" and then install this project. I looked into the code and there is no trace of Asset() function in github.com/evq/chromaticity/static. Moreover git history does not show any .go files in static/ directory. Personally, I would create issue in the project and/or look for different repo containing desired functionality.

How to build Courguette in Debian

Right now I am trying to compile Courguette in order to generate a diff patch. The source and some documentation can be found in the following link:
Courguette
I downloaded it but I don't find the way of compiling it.
I have Googled and found some references even to this forum, such as:
StackOverflow link
And other references:
Chromium Linux build instructions
After reading things about ninja and gpy I decided to install them, but there are not references to a .ninja file. I find a courguette.gyp file but using gpy I neither get it compiled...
I am following the guide they provide:
Installed the depot_tools and added to the path.
gclient runhooks
gclient sync
And when I execute gn gen out/Default it fails with the following message:
gn.py: Could not find gn executable at: ~/binary_diff_tools/courgette-master/courgette/buildtools/linux64/gn
Then I used git to pull from the repository the buildtools, but I get the same result.
Any help will be appreciated.
Best regards,
Iván
Ok... It seems that is needed to install all Chromium dependencies before being able to compile courgette so... it must be done as follows:
Install depot_tools git clone and you will have them installed.
After including the depot_tools in your patch (.profile or .bashsrc for example as indicate the depot_tools installation tutorial) execute fetch chromium ouside the depot_tools folder ( it always failed me when I executed it inside the same folder).
I want to build it in Debian so I have to do "gclient runhooks" instead of the .sh script for Ubuntu.
ninja -C out/Default courgette
You will find the executable in the folder out/Default, so ./courgette and it will indicate you the right parameters in order to generate your patch properly.
Best regards,
Iván.

How to build a package from source?

I'm working on a Windows 7 computer at work and want to use the libpostal package. Unfortunately, it's apparently not available for Windows, so I'm trying to configure it through Cygwin and I'm SO close. The last step is to install snappy from Google. Again, not available on Windows...
My assumption (based on nothing) is that I can just download the tarball and build it from source, right? I tried that, and I think it worked? But a) I don't know how to tell, and b) if it did, I don't know how to tell ./configure in libpostal to find it.
In order to build it from source, I downloaded the tarball and saved it in the folder that Cygwin reads as my home, which is C:\cygwin64\home\brittenb\. From there, I ran bash autogen.sh, which created the ./configure that I needed. So I ran that and while some responses to the checks were no, it seemed to run fine. I then ran make and make install. Nothing seemed out of place, so my assumption is that it did what it was supposed to do. I just have no idea where to go from here.
Here is the output from ls after I run everything:
aclocal.m4 snappy.cc
AUTHORS snappy.h
autogen.sh snappy.lo
autom4te.cache snappy.o
ChangeLog snappy.pc
compile snappy.pc.in
config.guess snappy_unittest.cc
config.h snappy_unittest.exe
config.h.in snappy_unittest-snappy_unittest.o
config.log snappy_unittest-snappy-test.o
config.status snappy-c.cc
config.sub snappy-c.h
configure snappy-c.lo
configure.ac snappy-c.o
COPYING snappy-internal.h
depcomp snappy-sinksource.cc
format_description.txt snappy-sinksource.h
framing_format.txt snappy-sinksource.lo
INSTALL snappy-sinksource.o
install-sh snappy-stubs-internal.cc
libsnappy.la snappy-stubs-internal.h
libtool snappy-stubs-internal.lo
ltmain.sh snappy-stubs-internal.o
m4 snappy-stubs-public.h
Makefile snappy-stubs-public.h.in
Makefile.am snappy-test.cc
Makefile.in snappy-test.h
missing stamp-h1
NEWS testdata
README test-driver
ls /usr/local/bin shows nothing, but ls /usr/local/include shows:
snappy.h snappy-c.h snappy-sinksource.h snappy-stubs-public.h
So... my question: did it work? Why does ./configure in libpostal say it can't find snappy? Thanks in advance.
The snappy dependency has been removed as of release 1.0.0. I made changes to the source and make and config so that it will build on MinGW.
Get it in my repository:
https://github.com/BenK10/libpostal_windows
Note that this is not the complete source since not everything had to be changed. I would suggest merging my changes with the official libpostal distribution to make sure you've got everything. Also, there are some extra DLLEXPORTs in some source files that I haven't removed yet, and the part in the Makefile that builds the executables like address_parser.exe was removed because some porting is necessary to build those programs on Windows. You can write your own using the DLL you'll get in the Windows build and the original source as a reference.
Check the return code from make install ($?). If it is zero, make install succeeded.
snappy looks like a library, so maybe it doesn't install anything in /usr/local/bin. The library is probably installed into /usr/local/lib.

Resources