Building program for other machines - pascal

I created a simple program using Lazarus Ide Qt5. I'm using Kubuntu 20 right now. When I build and run it on another Linux distribuiton I get error:
Quote
./shortcutcreator: error while loading shared libraries: libQt5Pas.so.1: cannot open shared object file: No such file or direcctory.
How can I build it for other machines?

(lib)qt5pas is a C++->C flattening library for QT5. It is afaik available in the package repositories, simply install it on the receiving PC.

Related

How to compile the new version of glibc under Raspberry Pi 4 and cross compile a simple project

I am using a raspberry pi 4 to test the cross-compilation and run the code I compiled on a windows machine under eclipse using a cross-compiler.
When I downloaded the latest version of the cross toolchain from the ARM developer, I faced a non-compatibility between the glibc I had in my toolchain and the glibc I have in my Rasberry pi 4 board.
I tired solve this issue I tried to download the glibc 2.34 and compile it into my Rasberry pi 4 board.
I have followed this tutorial (How to build and use glibc for):
http://www.yl.is.s.u-tokyo.ac.jp/~tosh/kml/how_to_build_and_use_glibc.html
After the installation process, I have the following files in my local folder in the Rasberry pi board:
/usr/local/lib/glib-testing/lib/ld-linux-aarch64.so.1
/usr/local/lib/glib-testing/lib/libc.so.6
/usr/local/lib/glib-testing/lib/libc.so
/usr/local/lib/glib-testing/lib/libc.a
In my host machine under Windows 10 I am using eclipse.
I looked at the same example and question in the StackOverflow forum and I tried to inspire by them.
for example this question: Multiple glibc libraries on a single host have a lot of similitude but still have some issues running my application on the PI since I am compiling on Windows.
I added the following lines to my eclipse linker to pointe to the library I installed in my local folder:
-Wl,--rpath="C:\Program Files (x86)\Arm_GNU_Toolchain_aarch64-none-linux-gnu\12.2 rel1\lib" -Wl,--dynamic-linker="/usr/local/lib/glibc-testing/lib/ld-linux-aarch64.so.1"
When I run the code I have this message:
/home/pi/Bookshelf/Software/raspberyPi4TestCrossCompilation: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
I don't want to copy the files in the system because I have seen people saying taht it's dangerous and it can destroy my system. That's why I want to understand before doing bullshit.
Thank you in advance for help

building RStudio 1.1.414 64-bit still looking for libxslt.so.1

I am trying to build RStudio on Centos7. Specifically, the 64-bit version. When I finish the build and try to load it, I am getting:
rstudio: error while loading shared libraries: libxslt.so.1: cannot open shared object file: No such file or directory
I had thought this was specific to building the 32-bit version on a 64-bit machine. Anyone else seeing this? Other suggestions?
This is the version I am downloading:
https://download1.rstudio.org/rstudio-1.1.414-x86_64-fedora.tar.gz
Thanks,
Bob

Go - Cross compiling with CGO using xgo library

I'm trying to compile a GO application, which uses the gokiri library.
I installed docker and compiled locally the xgo cross compiler for go.
When trying to execute the following command:
./xgo mydomain.com/test/test-app
I get the following error:
In file included from /usr/include/libxml2/libxml/parser.h:810:0,
from /usr/include/libxml2/libxml/globals.h:18,
from /usr/include/libxml2/libxml/threads.h:35,
from /usr/include/libxml2/libxml/xmlmemory.h:218,
from /usr/include/libxml2/libxml/tree.h:1307,
from ../../github.com/moovweb/gokogiri/help/help.go:6:
/usr/include/libxml2/libxml/encoding.h:28:19: fatal error: iconv.h: No such file or directory
I've installed xcode-tools which helped me compile it for my machine (mac ox El Capitan). BUT, I cannot get it compiled to other environment.
Any help will be appreciated. Thanks.
Update 1:
I've tried to add the dependency, but got the same result:
./xgo --deps /usr/local/Cellar/libiconv/1.14/ mydomain.com/test/test-app
It was even mentioned in the logs of the xgo that this library was already cached:
Dependency already cached: /Users/macuser/.xgo-cache/1.14.
from the documentation:
It is assumed that the dependent C/C++ library is configure/make
based, was properly prepared for cross compilation and is available as
a tarball download (.tar, .tar.gz or .tar.bz2). Further plans include
extending this to cmake based projects, if need arises (please open an
issue if it's important to you).
Such dependencies can be added via the --deps argument. They will be
retrieved prior to starting the cross compilation and the packages
cached to save bandwidth on subsequent calls.
So in this example, it would be:
./xgo --deps https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz mydomain.com/test/test-app

Embendding Python 3.4 into MacOS app

I'm trying to get a Python 3.4 interpreter into my app without to distribute python framework.
I'm linking with the libpython3.4.a (which appear to have dependency on Python.framework/versions/3.4/Python), but as guessed, it need python framework.
Does someone experienced this issue ?
Logically,i should be able to link statically (real static) and just distribute the python34.zip modules, right ?
Thanks for you help.
EDIT:
Finally i downloaded the Python 3.4 sources and build a static version.
Now i don't have dependency issue.
So i include the python3.4.zip near my executable.
But now, when starting the application i have this error:
"Fatal Python error: Py_Initialize: unable to load the file system codec"
So, i set Py_SetProgramName() to my binary and Py_SetPath(zippath) before the Py_Initialize().
But i still have the "ImportError: No module named 'encodings'" issue.
I also have tested with a simple folder instead of a zip.

Xcode can run my program, but I can't run it manually

I have a project with a dynamic library and an executable that links against it. I can successfully start it with Xcode, but when I try to run it from the command line, dyld complains about the library not being in the install path:
$ /Users/USER/Library/Developer/Xcode/DerivedData/PROJECT/Build/Products/Debug/EXECUTABLE
dyld: Library not loaded: /usr/local/lib/libMyLib.dylib
Referenced from: /Users/USER/Library/Developer/Xcode/DerivedData/PROJECT/Build/Products/Debug/EXECUTABLE
Reason: image not found
Trace/BPT trap: 5
The problem is quite clear: the library isn't in its advertised install path. However, I don't really want to deploy it there, and besides, Xcode still manages to start my program.
How can I run my program without installing the library in /usr/local/lib?
If you're relying on a dylib, then it needs to be installed in the appropriate location.
Using a framework might help, as you can package it in your application, using #executable_path...
But then, of course, you won't be able to share it across different applications.
So basically, you need to tell Xcode to install your dynamic library.
This can be done in your build settings, in the Deployment section.
Mainly, Deployment location, Installation directory, Skip install, etc...
Note that you can also do this for frameworks, installing them into /Library/Frameworks/

Resources