Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
53 user(s) are online (32 user(s) are browsing Forums)

Members: 0
Guests: 53

more...

Headlines

 
  Register To Post

Amiga Package Management / Shared Objects (Use Case: SDL)
Just popping in
Just popping in


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
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




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

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: Amiga Package Management (SDL)
Just popping in
Just popping in


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

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: Amiga Package Management (SDL)
Not too shy to talk
Not too shy to talk


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)
Just popping in
Just popping in


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:

Go to top
Re: Amiga Package Management / Shared Objects (Use Case: SDL)
Just popping in
Just popping in


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

  Register To Post

 




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




Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project