Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
36 user(s) are online (27 user(s) are browsing Forums)

Members: 1
Guests: 35

orgin, more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 73 74 75 (76)
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@Kirirur

__cxa_finalize is in shcrtbegin.o. For some reason this is not linked in your scenario, or your shcrtbegin.o doesn't have it (check with nm).

Maybe you can remove pkg-configs and add SDL libs explicitly. Add --use-dynld if you want to use shared objects.

Remove -lstdc++ if it's not needed. Your makefile has only C files.

Go to top
Re: SDL2
Just popping in
Just popping in


See User information
@Capehill

I've made several tests:
- tried to downgrade from SDL2 2.32.10 to 2.0.20 with no success (the working SDL2 version that I had was 2.0.14)
- tried to recompile SDL2 2.32.10 on my native environment but I'm currently stuck to find GLES2 SDK
- tried either GCC 8.4, 11.2 and 11.5 with any success
- tried to remove stdc++ as you suggested but its required by SDL2_mixer:
7.Work:ETTU1/srcmake -f Makefile.aos4 
gcc 
-o Escape_d chunkyblitting.o enigmi.o escape.o findpath.o frasi.o freq.o game.o gels.o generic_video.o gfx.o gui.o header.o oggetti.o os_gui.o os_init.o os_locale.o os_video.o persone.o preferenze.o sound.o stanze.o astar.o astar_heap.`pkg-config --libs SDL2_mixer` `pkg-config --libs sdl2` -lmodplug -lvorbis -lvorbisfile -logg -lauto -athread=native -lpthread
ld
warninglibstdc++.soneeded by /SDK/local/newlib/lib/libSDL2_mixer.sonot found (try using -rpath or -rpath-link)
/
SDK/local/newlib/lib/libmodplug.soundefined reference to `operator new(unsigned int)'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to 
`__cxa_finalize'
/SDK/local/newlib/lib/libmodplug.so: undefined reference to `operator delete[](void*)'
/SDK/local/newlib/lib/libmodplug.soundefined reference to `operator new[](unsigned int)'
/SDK/local/newlib/lib/libmodplug.so: undefined reference to 
`operator delete(void*, unsigned int)'
make: *** [Escape_d] Error 1
7.Work:ETTU1/src>

- tried to remove pkg_config with always undefined reference to cxi_finalize.

But, while I had the complete linker line, I tried to remove "-use-dynld" and it worked.

Unfortunately the executable obviously increased its size from 700 kB to 10 MB! This is not acceptable to me. I believe there is something different from the native environment that I use and the cross compile environment that everyone is using (If I have intended correctly). So I will try that way too even if I believe AmigaOS application should be compilable also on itself.

I will let you know if I was able to cross compile with dynamic link

EDIT: I've found the original version of the SDL2 that I used


Edited by Kirirur on 2026/6/8 17:22:10
Reason: Found old SDL revision
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@Kirirur

Regarding __cxa_finalize, you need the SDK updates from 4.1 FE Update 3. If the OS4 SDK is already installed when updating to 4.1 FE Update 3, then it gets automatically updated, otherwise you need to do it manually.

Extract AmigaOS4.1FinalEditionUpdate3-53.34.lha
Copy contents of Content/SDK/ to SDK: (you might want to be selective about which files get overwritten)

If you use libopenssl, you'll probably want to rename SDK:include/include_h/openssl since those are for AmiSSL.

You might need to set up these symlinks

In SDK:newlib/lib:

libamiga.a -> SDK:clib2/lib/libamiga.a
libdebug.a -> SDK:clib2/lib/libdebug.a

baserel/crtend.o -> SDK:newlib/lib/crtend.o
baserel/libamiga.a -> SDK:clib2/lib/baserel/libamiga.a
baserel/libauto.a -> SDK:newlib/lib/libauto.a
baserel/libc.a -> SDK:newlib/lib/libc.a
baserel/libdebug.a -> SDK:clib2/lib/baserel/libdebug.a
baserel/libm.a -> SDK:newlib/lib/libm.a
baserel/libraauto.a -> SDK:newlib/lib/libraauto.a
baserel/libsocket.a -> SDK:newlib/lib/libsocket.a
baserel/libunix.a -> SDK:newlib/lib/libunix.a

small-data/crtbegin.o -> SDK:newlib/lib/crtbegin.o
small-data/crtend.o -> SDK:newlib/lib/crtend.o
small-data/libamiga.a -> SDK:clib2/lib/small-data/libamiga.a
small-data/libauto.a -> SDK:newlib/lib/libauto.a
small-data/libdebug.a -> SDK:clib2/lib/small-data/libdebug.a
small-data/libm.a -> SDK:newlib/lib/libm.a
small-data/libraauto.a -> SDK:newlib/lib/libraauto.a
small-data/libsocket.a -> SDK:newlib/lib/libsocket.a
small-data/libunix.a -> SDK:newlib/lib/libunix.a

soft-float/crtend.o -> SDK:newlib/lib/crtend.o
soft-float/libauto.a -> SDK:newlib/lib/libauto.a
soft-float/libc.a -> SDK:newlib/lib/libc.a
soft-float/libm.a -> SDK:newlib/lib/libm.a
soft-float/libraauto.a -> SDK:newlib/lib/libraauto.a
soft-float/libsocket.a -> SDK:newlib/lib/libsocket.a
soft-float/libunix.a -> SDK:newlib/lib/libunix.a

The other undefined references in your last post, you need to add -lstdc++

Go to top
Re: SDL2
Just popping in
Just popping in


See User information
@MickJT

Thank you! It was the right hint!

When I originally setup my AOS4 environment I used version 53.30 of the SDK (it was the one available at the moment) and when later I found the AOS 4 Update 3 I was not aware of the SDK 54.16, so when I upgraded my environment the update didn't touch my SDK files.

I have just tried to "re-execute" the "AmigaOS Final Edition Update 3" and now it detected the SDK 54.16 and proposed its upgrade.

I was able to correctly build my application at last!

I have noticed another issue however: the recent packages (at least SDL2_mixer and its stuff) does not copy updated .so in SOBJS: folder so I had to do that manually.


EDIT: I've just forgot to write a part: I indeed managed to recompile also the application using cross compiler (I have used walkero/amigagccondocker) but I noticed that the final size of the application was 9.5 MB more or less like the native version obtained removing the --use-dynld contrary to what @Capehill wrote.

Go to top

  Register To Post
« 1 ... 73 74 75 (76)

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project