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
I did a little bit investigation on this ScummVM with plugins -related problem and it seems that:
With plugins disabled, symbol mini_CurrentContext is "B" type and with plugins enabled, symbol mini_CurrentContext is "U" type.
You can check this with "nm scummvm | grep mini". If you enable verbose build in config.mk, you can see the difference between build flags.
It seems that for some reason, ScummVM core code is also built with -fPIC and this seems to affect the symbol type. For example I was able to crash one of my SDL test programs by building it with -fPIC and linking dynamically. I would expect that -fPIC was only enabled for library code.
Unfortunately, if you disable -fPIC in config.mk and rebuild graphics/opengl/context.cpp, the next issue will be dynamic_cast DSI.
Hmm, that might have historical reasons, but i don't know.
Maybe i'll go and ask on the ScummVM forums. I'll see if i can find something in configure too.
EDIT:
configure explicietly only addds it to the flags if plugins (shared builds) are used...strange
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
I did a test today and tried to compile ScummVM with -Os instead of -O3 and while the static version builds fine and produce a working exe, the shared version error in linking state with thousands (probably one for every source file) undefined references, like so
audio/softsynth/mt32/libmt32.a(SampleRateConverter.o): In function `MT32Emu::SampleRateConverter::getBestAnalogOutputMode(double)':
SampleRateConverter.cpp:(.text+0x90): undefined reference to `_restfpr_30_x'
audio/softsynth/mt32/libmt32.a(SampleRateConverter.o): In function `MT32Emu::SampleRateConverter::SampleRateConverter(MT32Emu::Synth&, double, MT32Emu::SamplerateConversionQuality)':
SampleRateConverter.cpp:(.text+0x160): undefined reference to `_restfpr_31_x'
audio/softsynth/mt32/libmt32.a(SampleRateConverter.o): In function `MT32Emu::SampleRateConverter::getOutputSamples(short*, unsigned int)':
SampleRateConverter.cpp:(.text+0x2f8): undefined reference to `_restgpr_24_x'
gmake: *** [scummvm] Error 1
I dug a little on the net and found something mentioned from the gcc devs (but it was fixed in 2009 and the rest of the discussion went flying over my head),
Any hints?
Not that it really matters, i probably won't use -Os anyway since the save on binary size is a few tenthousand bytes on a 18 MB binary.
Just want to make sure there isn't something broken in our gcc.
@capehill
One more thing...you mentioned that using MAXPATHLEN might be suboptimal due to the path growing too big for the buffer. Do you have a more robust solution?
btw: Thank you for still caring for my noob problems
Edited by Raziel on 2021/4/19 16:46:58
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
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
Thanks. It seems that my proposal was to make sure that buffer overflow doesn't happen during path concatenation. Snprintf is safer than sprintf because programmer can define the maximum buffer size.
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
No, not really, the longest I can come up with yet are around 70 chars.
I just though because you mentioned that it may cause a path buffer overflow if patches become too long...tgen again that whole thing was aimed at the printf?
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
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
which basically means (what the comment/error message says) that it will error out once there is an access to a non-available directory.
The other day it hit me with that error message, when a game tried to auto-save to a non-existing "saves/" directory.
Though, that code was written way back when AmigaOS4 was still young and many things have changed since.
1) Is creating a directory through a node still unsupported? 1.1) If not, could someone give me an example, please?
2) How would/could i be able to resolve it otherwise, if possible? 2.1) Again, example please as i don't know horse remains about coding for AmigaOS4.
Thank you
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
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
Our OpenGL is kind of v1.3 based, correct? What features does it lack? e.g. does it support shaders too (like ogles2?)
Thank you all
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
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
1) I get this warning, which is not true. How can i work around that to get shared builds? Quote:
CMake Warning (dev) at CMakeLists.txt:2297 (add_library): ADD_LIBRARY called with SHARED option but the target platform does not support dynamic linking. Building a STATIC library instead. This may lead to problems.
2) How to enable altivec? It's always turned off, due to a message telling altivec is not available (on the cross platform not, true, but how can i force-enable that, because i do have altivec on my native paltform)?
3) I immediately get these errors, how to resolve?
In file included from /amiga/porting/SDL2_GL4ES/include/SDL_log.h:40,
from /amiga/porting/SDL2_GL4ES/src/./SDL_internal.h:120,
from /amiga/porting/SDL2_GL4ES/src/SDL.c:21:
/amiga/porting/SDL2_GL4ES/include/SDL_stdinc.h:466:49: error: unknown type name âwchar_tâ
466 | extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
| ^~~~~~~
4) I thought our gcc11 was c++11 aware? Quote:
-- Checking if compiler supports C++ unique_ptr - no CMake Error at CMakeLists.txt:112 (message): The C++ compiler does not support C++11 (e.g. std::unique_ptr).
5) Any way to workaround the below? Quote:
*** Warning: inter-library dependencies are not known to be supported. *** All declared inter-library dependencies are being dropped. *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it.
*** Since this library must not contain undefined symbols, *** because either the platform does not support them or *** it was explicitly requested with -no-undefined, *** libtool will only create a static version of it.
Thanks a lot
Edited by Raziel on 2021/11/5 14:45:05
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