How to add built recipe to package config in Yocto - yocto

I had installed .so and .h files into the build by extracting from a tar file, when compiling my application with installed package I got an error as PKG_SEARCH_MODULE cannot find installed package. So, how do I add my installed recipe to package config?

Related

Pyodide with numba compiled .so library

I have a python library which has a numba AOT compile function into a .so file. I am trying to bundle this into a pyodide wheel. When I examine the wheel file, the .so file (or webasm version) is missing.
First installed:
mamba install pyodide-build
Then installed emscripten
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 3.1.27
./emsdk activate 3.1.27
Then build the wheel
pyodide build

vscode assistance with building cpptools needed

Ubuntu 18.04 ARM64
I have download and built vscode and this appears to be working.
I can see the extension market place and install extensions. The C/C++ IntelliSense, debugging, and code browsing install but gets a dependency install failure sometimes:
Updating C/C++ dependencies...
Downloading package 'Mono Framework Assemblies' (5368 KB) Done!
Installing package 'Mono Framework Assemblies'
Failed at stage: installPackages
Error: end of central directory record signature not found
It seems to succeed on the second attempt but I'm not convinced.
So I have cloned vscode-cpptools and would like to built it myself but I'm not sure what dependencies it has or how to build it correctly.
Any tips appreciated!
So following the build and debug guide at:
$ git clone -b release https://github.com/Microsoft/vscode-cpptools
$ cd vscode-cpptools/Extension
$ npm install ! should install all dependencies but it forgets gulp
$ npm install gulp ! Manually install. I wonder what else it forgets
$ vsce package ! Should trigger the build and make the vsix package.
So the package is created and when I try and install it via the vscode extensions I get
Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Missing binary at ~/.vscode-oss-dev/extensions/ms-vscode.cpptools-0.22.1/bin/Microsoft.VSCode.CPP.Extension.linux.
Me thinks there are a lot of other dependencies that are missing!!!
Looking in the Extension bin folder and two important binaries are missing:
Microsoft.VSCode.CPP.Extension.linux
Microsoft.VSCode.CPP.IntelliSense.Msvc.linux
I also tried this on Intel Ubuntu 18.04 and while the Intel build appeared to do a whole lot more it also fails to build the binaries.
Found the answer in here : github.com/Microsoft/vscode-cpptools/issues/429 which indicates there is no support for Aaarch64 Arm64 at this point in time.

How to deploy a package in another operating system

I have a project written in C++ 14 (compiled in my machine with GCC 6.2) and my machine run on Fedora 26. Now I need to deploy into customer's server that run RedHat 6, and GCC 4.8. I can not change or install new things in this server (except my package). But this server doesn't contain 2 package that required to my project is numactl and hwloc.
If I build these library as static library and import into my project (in Fedora 26), then package these library with my project into a RPM package, will it run on the server.
Is it the best way? I never do this work before.
I'm sorry for my English.
You need to build your package for RedHat 6. Create source rpm (src.rpm) and run:
mock -r epel-6-x86_64 your-package.src.rpm
This way you will get package which can be installed on RHEL6.

Nuget Package Manager for single project fails to load after adding RingCentralSDK

I'm on VS 2015, targeting .net 4.5.2, my "Nuget Package Manager for Visual Studio" in Extensions and Updates shows 3.4.4.1321.
I added all dependencies of RingCentralSDK package separately:
Microsoft.Bcl
Microsoft.Bcl.Async
Microsoft.Bcl.Build
Microsoft.Net.Http
Newtonsoft.Json
Portable.BouncyCastle-Signed
PubnubPCL
Then I right click on my project, pick "Manage Nuget Packages...", the tab opens, in the "Installed" subtab I can see the 7 packages.
Now, I install the RingCentralSDK package. My output is fine:
Attempting to gather dependency information for package 'RingCentralSDK.1.0.0' with respect to project 'MyProj', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'RingCentralSDK.1.0.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'RingCentralSDK.1.0.0'
Resolved actions to install package 'RingCentralSDK.1.0.0'
Adding package 'RingCentralSDK.1.0.0' to folder 'C:\code\packages'
Added package 'RingCentralSDK.1.0.0' to folder 'C:\code\packages'
Added package 'RingCentralSDK.1.0.0' to 'packages.config'
Successfully installed 'RingCentralSDK 1.0.0' to MyProj
========== Finished ==========
Now, I check again the Manage Nuget Packages for this specific project, and instead of seeing the list of packages, I get a yellow band:
Error occured Show erros in output Dismiss
And in the "Package Manager" output, the error is:
ZIP archive contains unsupported data structures.
In my packages folder, the folder "RingCentralSDK.1.0.0" seems ok, but then I don't anything about nuget packages format.
I cannot uninstall RingCentral via the package manager as it's not showing, not any other one, which is really annoying. I had an error when trying to do it via the command line. I reverted my changes (or remove the line in packages.config for my project), and the Nuget Package Manager tab works fine again. This is also affecting the "Managet Nuget Packages for Solution".
What can I do to fix this?
Fixed in RingCentralSDK 1.0.1-alpha1
It turns out that the NuGet package created on Mac is not compatible with Visual Studio NuGet GUI tool.
You can install the latest version by
Install-Package RingCentralSDK -Pre
Or if you prefer GUI:
Update:
For projects which already have 1.0.0 version installed, how to upgrade?
Today I did some testing and I came to the following conclusion:
New project will have no problem with 1.0.1 version or later
For old project which have 1.0.0 installed. You need to follow the following steps:
UnInstall RingCentralSDK 1.0.0
Close VS
Delete packages folder in your project
Delete packages folder in ~/.nuget/
Launch VS
Install RingCentralSDK 1.0.1
I need to do the above because nuget has cache. If I don't do it the problem just persists. I don't know the exactly reason but the above steps did work for me.

Yum broken while updating libcurl

On my Centos 6 server I updated curl using city-fan.repo but after installing I have issue with yum... I found ( after searching hours) that it was due to libssh2 older version so I removed it and downloaded again to recompile it, But to compile it GCC is not installed, When I try to ./configure libssh2-1.6.1-20150617 I have this error:
configure: error: no acceptable C compiler found in $PATH
, So I downloaded these packages from Centos repo as I am unable to use yum to install gcc:
cloog-ppl-0.15.7-1.2.el6.x86_64.rpm glibc-common-2.12-1.149.el6.x86_64.rpm kernel-headers-2.6.32-504.el6.x86_64.rpm
compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm gcc-4.4.7-11.el6.x86_64.rpm glibc-devel-2.12-1.149.el6.x86_64.rpm mpfr-2.4.1-6.el6.x86_64.rpm
cpp-4.4.7-11.el6.x86_64.rpm glibc-2.12-1.149.el6.x86_64.rpm glibc-headers-2.12-1.149.el6.x86_64.rpm ppl-0.10.2-11.el6.x86_64.rpm
When I try to install those I get this:
rpm -ivh *.rpm
Preparing... ########################################### [100%]
package glibc-common-2.12-1.149.el6_6.5.x86_64 (which is newer than glibc-common-2.12-1.149.el6.x86_64) is already installed
package glibc-2.12-1.149.el6_6.5.x86_64 (which is newer than glibc-2.12-1.149.el6.x86_64) is already installed
file /usr/sbin/build-locale-archive from install of glibc-common-2.12-1.149.el6.x86_64 conflicts with file from package glibc-common-2.12-1.149.el6_6.5.x86_64
file /usr/sbin/tzdata-update from install of glibc-common-2.12-1.149.el6.x86_64 conflicts with file from package glibc-common-2.12-1.149.el6_6.5.x86_64
file /lib64/ld-2.12.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /lib64/libc-2.12.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /lib64/libresolv-2.12.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /sbin/ldconfig from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /sbin/sln from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1364.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1371.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1388.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1390.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1399.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM933.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM935.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM937.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM939.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/sbin/glibc_post_upgrade.x86_64 from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/sbin/iconvconfig from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/sbin/iconvconfig.x86_64 from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
and if I run any yum command it is displaying me this error:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
libssh2.so.1: cannot open shared object file: No such file or directory
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
I am very novice to this...Any help? Thanks
You have majorly hosed your system.
You downloaded rpm packages that are older than the ones you already have installed (that's what that error message is telling you).
Get the rpm packages for the libssh2 and curl packages you removed and fix yum.
Then find a better way to do whatever you were trying to do in the first place. Anything that requires you to upgrade a core component of the operating system (like libcurl) in a way that the official packages can't handle is broken by design.
have you tried doing the following:
yum provides libssh2.so.1
then installing one of the providing packages
e.g. yum install libssh2 ?