Many times when we develop an application we will need to use open source libraries that will help us on what we are doing, especially when we try to port an application or a game to AmigaOS 4. These libraries need to be compiled for the libc that is used. So, different versions of the libraries are required between newlib and clib4. That means that libraries that compiled for newlib cannot be used with clib4.
Trying to help developers move fast, a lot of libraries for clib4 are already ported and are ready to be used. The only thing that needs to be done is to install them in your system. Please, find below how to do it, depending on your dev environment.
Currently, there are a couple of places to find libraries for clib4.
Please, continue reading on how you can install and use those libraries.
If you are using an Ubuntu-based development environment, you can use apt to install clib4 and the libraries you prefer. This is described at the Clib4 apt packages repository section of this site.
If you are using the Docker and more specifically the AmigaGCConDocker, then most of the libraries are already installed and in place to be used.
Although that the .deb archives are meant for Ubuntu-based systems, they can easily be used under AmigaOS 4. Installing them will require a few more manual steps though. Also it will require having clib4 enabled adtools installed in your system.
Here is how you can install them on your system. Remember that the third-party libraries should always be installed under the SDK:local/clib4/
folder.
For extracting the .deb files you will need to have the following packages installed in your system.
Let's see an example. Let's say that we want to install libbz2 library:
Package: libbz2-clib4
Version: 1.0.8.1
Architecture: amd64
Maintainer: Andrea Palmatè <os4test@amigasoft.net>
Filename: pool/main/bzip-1.0.8_amd64.deb
Size: 113252
MD5sum: d857ba37440f76a0c4077c15794dff90
SHA1: 08ef6c159c75f634c87375b90299667da0c34324
SHA256: 821374a0707d291ea8dc3deb6e37211847abedf654d6030efee1411e706f073e
Section: libdevel
Description: libbz2 development library for clib4
Ram:
and open a shell in it.Deark -od Ram: ram:bzip-1.0.8_amd64.deb
output.002.data.tar.xz
. We can extract it with the following command
xadunfile Ram:output.002.data.tar.xz Ram:
output.002.data.tar
. Extract it again with the following command
xadunfile Ram:output.002.data.tar Ram:
Ram:./usr/ppc-amigaos/SDK
folder, from which we need to copy all the SDK files with the following command
copy ALL CLONE Ram:./usr/ppc-amigaos/SDK/ SDK:
The above steps can be followed for every .deb file from the Ubuntu repository.