Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
112 user(s) are online (103 user(s) are browsing Forums)

Members: 1
Guests: 111

skynet, more...

Support us!

Headlines

 
  Register To Post  

Amiga Package Management
Quite a regular
Quite a regular


See User information
Linux apt/debian has a package management system. It means that if I want to download a library then that library has requisites (dependencies) and they are implicitly retrieved and installed.

- Is there a package management system for the Amiga?
- If not, then for those developing using SDL does this mean that you are needing to manually install all the dependencies of - for example - libSDL2_image? i.e. the JPEG libraries/PNG etc
- When linking a program with a mere call to Load_BMP I see that the linker complains about undefined references (hence why I make this thread regarding package management / dependencies). I am surprised though, because I get undefined references to functions that I am not using in my program. I know that there are different implementations of linkers; those that require symbols to ALL functions in the library and those that only need the symbols to those functions used in your application. Is this the way the Amiga is? That all functions must be resolved even if you are not using them?

make
gcc 
--o main.o main.c
gcc 
-use-dynld -o main main.-lSDL2 -lSDL2_image
ld
warninglibpng16.so.16needed by /SDK/local/newlib/lib/libSDL2_image.sonot found (try using -rpath or -rpath-link)
ldwarninglibtiff.so.9needed by /SDK/local/newlib/lib/libSDL2_image.sonot found (try using -rpath or -rpath-link)
ldwarninglibjpeg.so.12needed by /SDK/local/newlib/lib/libSDL2_image.sonot found (try using -rpath or -rpath-link)
ldwarninglibz.so.1needed by /SDK/local/newlib/lib/libSDL2_image.sonot found (try using -rpath or -rpath-link)
ldwarninglibwebp.so.7needed by /SDK/local/newlib/lib/libSDL2_image.sonot found (try using -rpath or -rpath-link)
ldwarninglibpthread.soneeded by /SDK/local/newlib/lib/libSDL2_image.sonot found (try using -rpath or -rpath-link)
/
SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_set_rows@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`jpeg_set_defaults@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_write_fn@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_set_interlace_handling@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`png_write_png@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_get_valid@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `jpeg_read_header@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`jpeg_resync_to_restart@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_start_compress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `jpeg_destroy_compress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`png_get_PLTE@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `WebPDecodeRGBInto'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_read_image@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`jpeg_calc_output_dimensions@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_get_channels@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_set_IHDR@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`png_create_info_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_create_read_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_set_expand@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`jpeg_CreateCompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_create_write_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `WebPDecodeRGBAInto'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`jpeg_destroy_decompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `__NewlibCall@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_get_io_ptr@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`png_set_packing@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `TIFFClientOpen'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_read_info@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`png_set_strip_16@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `TIFFClose'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `memcpy@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`jpeg_set_quality@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_write_scanlines@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_get_IHDR@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`TIFFReadRGBAImageOriented'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_read_update_info@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_set_PLTE@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`png_set_gray_to_rgb@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_CreateDecompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `jpeg_finish_decompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`png_destroy_write_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_longjmp_fn@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `jpeg_read_scanlines@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`jpeg_start_decompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_destroy_read_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `jpeg_finish_compress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`WebPGetFeaturesInternal'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_std_error@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.soundefined reference to `png_get_tRNS@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to 
`png_set_read_fn@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `TIFFGetField'
make: *** [allError 1


This is SDK 53.30 / gcc 4.2.4 / Native on Amiga X1000 and only with the libSDL2 installed.

I know how to fix this, I am just wondering about answers to my questions above.


Edited by rjd324 on 2022/1/3 3:19:40
Edited by rjd324 on 2022/1/5 12:43:23
Edited by rjd324 on 2023/9/26 20:22:01
If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Amiga Package Management (SDL)
Home away from home
Home away from home


See User information
@rjd324
We don't have a package manager and you have undefs to functions you don't use because we have static dependencies: sdl_image build in with png/tiff/jpg (so you need all those libs) they also need libz as well for compression (libpng for sure). But there are not many and once you install ones one time all going to be ok and easy

We do have sobjs support but it's hacky and better to not use it, only when there is no other way.

ps. and the linking order are important. if one library wants functions from another they should come after. i.e : - -
-lSDL_image -lpng -lSDL_ttf -ltiff -lfreetype -ljpeg -lwebp -lSDL_mixer -lmodplug -lmikmod -lflac -lsmpeg -lvorbisfile -lvorbis -logg -lpthread -lz




Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Amiga Package Management (SDL)
Home away from home
Home away from home


See User information
@rjd324

Heck, yeah, another one to port stuff and tinker with the sdk...a late, but warm welcome from me

Go to top
Re: Amiga Package Management (SDL)
Quite a regular
Quite a regular


See User information
@kas1e
Excellent information, thanks.

@raziel
Thanks for the welcome, hopefully I can contribute to something at some point.

@all
Hmm. A package management system. I read a thread on EAB about this a while ago and people have tried to but ultimately not managed to write such a thing. There is no real field in packages from either Os4Depot / aminet named "dependencies". I guess the package management system in the case above is the linker itself.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Amiga Package Management (SDL)
Home away from home
Home away from home


See User information
@rjd324

If you are looking for an automated updater regarding your SDK addon installations (libSDL, libfreetype etc.) than you should add the SDK server to AmiUpdate.

AmiUpdate/Preferences/Server tab
ADD
amiupdate.codebench.co.uk/SdkServer (mind the uppercases, they're important)
be sure it's "enabled" and let it search.

Worked great the past years and if you need a certain library updated, you can pesker @MickJT (he's the wizard behind SDK dependancy updates)

/me waves frantically at MickJT ... hey mate, happy new year

...or take a look at OS4Depot
http://www.os4depot.net/index.php?fun ... e&cat=development/library

Go to top
Re: Amiga Package Management (SDL)
Quite a regular
Quite a regular


See User information
Grunch might be a good starting point : http://www.geit.de/eng_grunch.html

ah and welcome (back?) to/on Amiga Land !

Go to top
Re: Amiga Package Management (SDL)
Quite a regular
Quite a regular


See User information
@raziel
Quote:

We do have sobjs support but it's hacky and better to not use it, only when there is no other way.

Linking statically is probably a better choice anyway on our Amiga systems, right? Let's say that we create an SDL game and use shared objects, then in order for people to play that game they will need to have the shared objects available on the path somewhere. Since there is no package management system then people who are not as familiar with this sort of stuff would have a problem.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Amiga Package Management (SDL)
Home away from home
Home away from home


See User information
@rjd324
For that reason, if it is 100% necessary to use SOBJs by any of the reasons devs create in their release packages directory "SOBJS" and put sobjs in question to that directory (all of them).

On running OS-executable-loader do the same wth sobjs as with Libs : first checked directory Libs or/and Sobjs in the root of app and if nothing found only then trying to use ones from System:

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Amiga Package Management / Shared Objects (Use Case: SDL)
Quite a regular
Quite a regular


See User information
@kas1e

Makes sense. I mean, this is no different from Windows I guess, where DLLs are provided in the same directory as the executable. Clearly in the Amiga case, so are checked in the SOBJS of the executable directory.

Anyway, good to know.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Amiga Package Management / Shared Objects (Use Case: SDL)
Home away from home
Home away from home


See User information
@rjd324

.so files linked at run time, they are not shared like amiga libraries, so with .so files you can have many versions installed at once, on linux you have version in the file name, most current version is linked to file without version number, but compiled exe will always referee to the file with version number in filename., this assures that when compile you it finds the most up to date version of it.

So putting in .so file in the program directory should not be problem.

However a .library is shared, and only one version can be loaded in memory, so if program has loaded a older library from its program dir, then all program will use older version, even If newer version is in libs: folder. This can result in problems, for example if a newer program needs the newer version.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Amiga Package Management / Shared Objects (Use Case: SDL)
Quite a regular
Quite a regular


See User information
Afxgroup created his own CLIB2 repository that anyone can add to their apt.sources.

I wonder if a general apt repository is a good way to have an actual package management system for AmigaOS4. Consider a repository named "os4depot", where the latest things can be downloaded.

But, questions would have to be answered such as who would maintain it. Is it even a good idea!? Even if we have an apt repository, would it really make any difference? What about other package management systems / Windows users.

Perhaps the best thing is still just what we have now. Get a released version from GitHub or build the source code yourself. For the latter - not everyone is interested or experienced in that.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Amiga Package Management (SDL)
Just can't stay away
Just can't stay away


See User information
@Raziel

Quote:
@rjd324

If you are looking for an automated updater regarding your SDK addon installations (libSDL, libfreetype etc.) than you should add the SDK server to AmiUpdate.

AmiUpdate/Preferences/Server tab
ADD
amiupdate.codebench.co.uk/SdkServer (mind the uppercases, they're important)
be sure it's "enabled" and let it search.
Yes, in principle AmiUpdate is great both for keeping the system and the SDK up to date.

However, be aware that the codebench.co.uk site has been unaccessible for some time now, so in effect it is unusable.

Still hoping it will reemerge soon ...

Best regards,

Niels

Go to top
Re: Amiga Package Management (SDL)
Home away from home
Home away from home


See User information
@nbache

It did update some stuff from Hyperion site as well, but perhaps, its just some old stuff. Is possible to remove the sites that’s not working?

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Amiga Package Management (SDL)
Just can't stay away
Just can't stay away


See User information
@LiveForIt

The problem is that the databases for each type of updates is what controls everything, and the databases for the third party packages and the SDKServer stuff are (were?) on Rigo's server.

The stuff that is available from Hyperion has its own database, hosted there (update.amigaos.net) and still works (but is rarely supplemented with new downloads currently).

Best regards,

Niels

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project