Different versions of rpmbuild list different dependencies - netbeans

I am building a netbeans 8.1 platform application for CentOS6 and CentOS7. These OS's host rpmbuild 4.8.0 and 4.11.3 respectively.
On each OS, I can package the application into a ZIP file distribution in the netbeans 8.1 IDE, which is then referenced in my .spec file.
On both OS, the resulting rpm is built fine (by which I mean, an rpm is produced with no errors).
When I install the rpm on CentOS6, it installs fine and the application runs.
When I install the rpm on CentOS7, rpm returns the following error:
D: Requires: osgi(org.tmatesoft.sqljet) NO
(In fact I get a bunch of osgi references, but all the others have satisfied dependencies).
If I list the rpm dependencies with
rpm -qpR package.rpm
I get the same list of dependencies on both OS, except that on CentOS7 it finds a bunch of osgi() dependencies - these are not present on CentOS6.
Since the only difference between these two proceedures is the version of rpmbuild I am using, I suspect that this is the problem. However, I'm not sure how best to resolve the problem on CentOS7 - I've tried using --nodeps in the rpmbuild command and I've tried adding module dependencies to the project in netbeans, but to no avail. Any help much appreciated.

Related

C compiler cannot create executables after installing dependencies

So I've boned my system. I'm running LFS with xfce and it has been running perfectly. I needed to install a video editing package and some dependencies (AppStream, stemmer) but they failed during the install. At the time I didn't think much about it and decided to come back to it later. Now when I run the configure, it get a message:
error: C compiler cannot create executables
I decided to create a test file that just outputs "Yo Dude!" in the terminal. When I try to compile it I get the message:
error: no include path in which to search for stdc-predef.h
It seems as if it can't find the library files, even putting the absolute path to stdio.h doesn't work. I did notice that gcc now shows as 11.2.0 but when I installed the system, I installed 12.2.0. I downloaded 12.2.0 but it won't compile. I can't compile because gcc is broke and I can't install gcc because gcc is broke. I'm trying not to re-install the system. Any suggestions on how I can get around this?

How install Nuget Microsoft.ML.OnnxRuntime.Gpu for ONNX Runtime in Ubuntu 18?

I'm trying to use ONNX runtime for Ubuntu: https://onnxruntime.ai/
I selected Linux, C++, x64, then CUDA. It says "Install Nuget package Microsoft.ML.OnnxRuntime.Gpu
Refer to docs for requirements."
When I click on "Microsoft.ML.OnnxRuntime.Gpu", I'm taken to https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.Gpu
There, it just says "Install-Package Microsoft.ML.OnnxRuntime.Gpu -Version 1.8.1". Now what am I supposed to do?
They expect you to install nuget in linux with
sudo apt-get install -y nuget
And then run the following with the version you want installed.
nuget install Microsoft.ML.OnnxRuntime.Gpu -Version 1.12.0
That's the expected approach. Personally, for me that didn't work. I kept getting some error saying "'Microsoft.ML.OnnxRuntime.Managed' already has a dependency defined for 'System.Memory'." So I did it a different way. I just went to https://github.com/microsoft/onnxruntime/releases/tag/v1.12.0. And then at the bottom under assets it lists pre-built .tgz packages for the different setups. You can just download one and unpack it.

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.

How to bundle perl libraries with my cross platform script?

I developped a script in Perl that uses 2 extra libraries, Net::SSH::Perl and Spreadsheet::WriteExcel, which I installed easily using CPAN on my Debian laptop.
Ultimatly, my goal is to deploy this script on a solaris server. However, this server is not connected to internet and thus cannot auto install missing dependencies.
So far, I tried using PP, which allowed me to run this script on another Ubuntu computer without needing to install manually the extra libraries, but returned an error : Cannot find /lib64/ld-linux-x86-64.so.2 on Solaris.
As I suspected this was due to the differences between both architectures, I packed my script with a ./lib folder containing all dependencies (the ./lib was obtained by doing pp -B -p -o script.par myscript.pl and extracting the resulting ./lib folder).
Following the leads I found in this question, I tried with use lib "./lib and with BEGIN { unshift #INC, "lib"; } at the start of my script, but I got an error saying I didn't include my libraries when I ran it.
Is there a way to port those libraries ? Is there another approach ?
Net::SSH::Perl relies upon several XS modules, such as Math::GMP, Math::Pari and others. There's no way around actually compiling them (as in compiling them with C, not Perl) on the Solaris box.
You will also need the underlying C libraries (i.e. libgmp, libpari). The Math::Pari build script will download its library, but you've indicated that's not possible on your target Solaris box.
cpanm can help you download the Perl dependencies in preparation for moving them to your target machine and build them on it.
If you have proper dependency entries in your project's Makefile.PL or cpanfile, running
cpanm --installdeps -L deps --save-dists dists .
on your devel machine in your project directory (note the trailing dot) will download all of its dependencies into the dists directory.
You can then copy that directory to your target Solaris box (along with cpanm) and pass it to cpanm using its --mirror option.
For example, I just did this for Net::SSH::Perl's dependencies:
cpanm --installdeps -L deps --save-dists dists Net::SSH::Perl
It downloaded and installed 34 distributions into deps, saving the archives in dists.
I can build Net::SSH::Perl using the downloaded distributions via:
cpanm --mirror file://${PWD}/dists Net::SSH::Perl
Note that while cpanm is handy, you don't actually need it to install the required modules. You can manually install them (in the correct order) by unpacking them and then running
perl Makefile.PL
make
make install
or
perl Build.PL
./Build
./Build install
as appropriate for the specific module

problems installing Pango-1.30.1

I have encountered a problem installing Pango-1.30 on a Ubuntu 12.04 platform. During ./configure step I receive a message saying "Could not enable any of Freetype, X11, Cairo, or Win32 backends. Must have at least one backend to build Pango". However, I have build and installed Freetype and X11 and they are located in /usr/bin. How do I inform ./configure where to get them?
Thanks,
Mark Allyn
Ensure you have all the dependencies installed, you can find them in the README file.
They are:
fontconfig
FreeType
HarfBuzz