Just for my own education. Why does it matter to use the clib2 versions if openal and sdl2 were statically made?
Linkining statically only deal with "no use shared objects"
Quote:
Would this not work otherwise? Of course, a mess to be using two different c impls. Guess you could get conflicting definitions for the same c symbols if pulling in newlib too!
It may works (and sometime is) but offten will create incompatible mess. For example some of us use clib2 version of libdebug.a and/or libauto.a coming with clib2, but with newlib projects, and it works. But when thing is more complicated (usage of varargs stuff for example , or something else like name calling or ABI or passing of stuff to/from functions to/from assembler, etc ,etc) things can go bad.
At least for my lame understanding it's enough to know that you should not mix clib2 and newlib in one project to avoid random/strange issues.
@all How can I solve this ? Anyone experienced it before ?
In file included from tiberiandawn/conquer.cpp:86:
/usr/local/amiga/ppc-amigaos/SDK/local/clib2/include/pthread.h:38:8: error: redefinition of ‘struct timespec’
38 | struct timespec
| ^~~~~~~~
In file included from /usr/local/amiga/ppc-amigaos/SDK/clib2/include/wchar.h:16,
from /usr/local/amiga/ppc-amigaos/SDK/clib2/include/stdlib.h:11,
from /usr/local/amiga/ppc-amigaos/include/c++/11.1.0/cstdlib:75,
from /usr/local/amiga/ppc-amigaos/include/c++/11.1.0/stdlib.h:36,
from ./common/rawfile.h:45,
from tiberiandawn/function.h:118,
from tiberiandawn/conquer.cpp:61:
/usr/local/amiga/ppc-amigaos/SDK/clib2/include/time.h:71:8: note: previous definition of ‘struct timespec’
71 | struct timespec
It's strange I can compile LE original port without problems via cross-compiler.
But I get lots of errors while compiling Amiga Big Endian fork...
Of course you will have errors, because it is not only Endian fixes, but also specific amigaos3.x and vampire (probabaly) code, which need to be deal with.
If you do not want to boredom with, i can port arczi's version to os4.
@Sinan Btw, if arczi add all the endian changes via BIG_ENDIAN in his fork, then you will be easy to just grab the original one (which already compiles for you), and just search in arczi's code on BIG_ENDIAN words in all .cpp and .h files, and add the same changes to original.
So by this way you will not have low-level os3/vampire code, and can build sdl2 version with no issues.
Through it will works only if all the endian changes which arczi did in his fork are ifdefs with BIG_ENDIAN.
EDIT: I was able to build arczi code, it was matter of build it for SDL1, and undef AMIGA parts in some places (like audio, video, etc, so to use default SDL stuff). But sadly it crashes on running when should load up title pic, need to check wtf.
Edited by kas1e on 2022/7/8 10:46:23 Edited by kas1e on 2022/7/8 10:56:34
@Sinan Seems fail on openal initialisation. Are you sure you use clib2 version of openal if you build for clib2, and if it newlib build, then openal of newlib version ?
Also, be sure that you uncomment amiga parts related to music/sounds, as original ones are fine enough (by adding #undef AMIGA on top of those files).
Yes I am using clib2 version of OpenAL, that I compiled thanks to your instructions.
Now I have disabled OpenAL from makefile and compiled again.. Now it seems to crash with ccfile.ccp cdfile.cpp buffer.cpp which must be related to file i/o.
I truly hope you will be able to find time and figure out how to compile and release binaries for Conquer! I would love to help, but I do not know anything about coding, compiling and such, so I can only hope you will not get bored or annoyed with this project and abandont it. Thank you for doing this and if you finish this eventually, I promise I'll buy you pizza and beer, that is something I can do, at least.
Like Kas1e, I am able to compile an executable from Arczi (Big Endian OS3/Apollo) sources (with sound disable and using SDL2 with clib2 versions+includes), however it crashes after opening a window.
This is the crashlog
ymbol info:
Instruction pointer 0x7F7127A4 belongs to module "vanillatd" (PowerPC)
Symbol: _Z8Prog_EndPKcb + 0x38 in section 1 offset 0x001767A0
Please note that I am beginner for this kind of a large project (I was able to compile smaller projects), since the port is working on MorphOS / Apollo, I think we can make work it on OS4 too..
Probably I am lacking the required knowledge and doing something wrong
crashes pretty early in Audio_Init can be that you need to open ahi, maybe or openal was initialized correct.
2en crash
crashed in some sub function of Init_Game, again its pritty early it crashes, some library is most likely not opened as it should, maybe...
I don't normaly just look at the stack trace, i also look at disasm, and ISI or DSI error.
look at PowerPC register tells me if its a NULL pointer bug. ISI is some issue with API call, (typicaly not opened library) DSI is some issue with memory or allocation, most often.
You can also try running snoopy, can also give useful info.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.