Well, you're more experienced than me in this stuff...
That said, someone really needs to clarify the terminology and make sure that configure scripts stick to it. Because even what you said doesn't match the document you linked to 100%, which says: Quote:
the machine you are building on (build), the machine that you are building for (host), and the machine that GCC will produce code for (target)
and Quote:
Specifying the host without specifying the build should be avoided, as configure may (and once did) assume that the host you specify is also the build, which may not be true.
I've seen conflicting examples too. SOme use --target, others --host, and some set all three including this one for SDL2.
Well, you're more experienced than me in this stuff...
That said, someone really needs to clarify the terminology and make sure that configure scripts stick to it. Because even what you said doesn't match the document you linked to 100%, which says:
Mick is wrong in this case, no disrespect intended, he tends to build libraries and apps where 'host' and 'target' are effectively the same thing. For a cross compiler they aren't, as that's actually the whole point.
Quote:
the machine you are building on (build), the machine that you are building for (host), and the machine that GCC will produce code for (target)
If you are building a cross compiler for amigaos the target will stay fixed as ppc-amigaos,
I'd say the build and host would usually be the same, unless you are attempting to cross compile the cross compiler!!!
Quote:
Specifying the host without specifying the build should be avoided, as configure may (and once did) assume that the host you specify is also the build, which may not be true.
It may not be true but would be a common case for build a cross compiler on the machine you intend to cross compile on.
NB I haven't read the thread as a whole and the title does suggest this may be one case where all three are different...
Quote:
I've seen conflicting examples too. SOme use --target, others --host, and some set all three including this one for SDL2.
There is no conflict there, SDL2 is library so it's host and target will always be the same and so the meaning of build, host and target in the above description are completely consistant with the example at the link you gave.
Eh, just going by what I've read (and my interpretation of it) and seen elsewhere. Thanks for clarifying things a bit. All I know is I have to use --host in order for the ppc-amigaos toolchain to be used.
Sorry folks. Been swamped, and will be some more, for remainder of the year.
I'll try to answer everyone's questions shortly.
And, yes, building a download repo for all the pre-built binaries was always my intention. These posts are just to explain everything I learned for my own (and all future developers' sakes).
If anyone can inform me what they're trying to compile/build, the sources for same (I just downloaded a couple of .lha's, one called SDL2_SDK_r177.lha and another SDL2_user_r177.lha. Not sure if that's even what I'm looking for.
I don't even know what a "hello, world" looks like with this library/toolkit. If someone can provide that, too, so I can confirm things are working that'd be hugely helpful.
Basically, I don't know anything about it, so I just need a starting point to see if I can get things to compile/build/Hello World. If I can, I'll report back on what I find.
Btw, as i said in a previous post, one installation of the UWin environment worked fine. I used this installation to configure the SDL R188 and the configure report was OK. As for the math, for example, the summary reported no assembly math, just as i had specified using the flag --disable-altivec. The compilation of the SDL2 started OK, until the compiler hitted the Amiga SDK requirements (i used the version 53.24).
For this reason i reinstalled everthing from scratch, trying to use the SDK 53.30.
But since then, i never been able again to put cross compiler environment to work.
Now, if i try to configure the SDL2, even specifying the --disable-altivec flag, i get in the summary that i have MMX, 3DNOW, SSE, SSE2 as math options. This is the first indication that the cross compiler is configured for x86 machine. The second indication that tell me that i have a wrong CC setup is that as soon as i start the make command for the SDL2, i get in reply -strict -align error.
Btw, as i said in a previous post, one installation of the UWin environment worked fine. I used this installation to configure the SDL R188 and the configure report was OK. As for the math, for example, the summary reported no assembly math, just as i had specified using the flag --disable-altivec. The compilation of the SDL2 started OK, until the compiler hitted the Amiga SDK requirements (i used the version 53.24).
I've been told that --host isn't guaranteed to do what you want (as in, has been known to choose the wrong compiler).
Regardless, trying out --target can't take more than a few minutes. So just try it, and see if it works. The same goes for the other instructions I linked to.
I don't know if it's been mentioned yet, but SDL2 can't be compiled with SDK 53.24 which is what is installed by the adtools Makefiles. You need 53.30.
"I don't know if it's been mentioned yet, but SDL2 can't be compiled with SDK 53.24 which is what is installed by the adtools Makefiles. You need 53.30."
Yes, that's the reason why i burned out my (sigh) unique functional UWin installation, cause SDL2 needed the 53.30 version of the SDK. The first installation of the UWin worked fine and configured SDL2 ok, targeting ppc machines. The SDL2 compile started ok, but halted showing errors related to the SDK version.
I think the problem is not related to SDL2 only. The problem is related to the UWin installation.
The problem could be related to symlink and paths.
I will post the EXPORT, PATH and SET outputs asap.
amidev@DESKTOP-C279FRF:~/Software/Development/sdl2-amigaos4-code-199-trunk$ sudo ./configure --prefix=/sdk/local/newlib --host=ppc-amigaos --disable-altivec
checking build system type... x86_64-pc-linux-gnu
checking host system type... powerpc-unknown-amigaos
checking how to print strings... printf
checking for ppc-amigaos-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for ppc-amigaos-dumpbin... no
checking for ppc-amigaos-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-pc-linux-gnu file names to powerpc-unknown-amigaos format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for ppc-amigaos-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... unknown
checking for ppc-amigaos-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ppc-amigaos-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for ppc-amigaos-strip... no
checking for strip... strip
checking for ppc-amigaos-ranlib... no
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse nm output from gcc object... ok
checking for sysroot... no
checking for ppc-amigaos-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... amigaos ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ppc-amigaos-gcc... gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for ppc-amigaos-g++... no
checking for ppc-amigaos-c++... no
checking for ppc-amigaos-gpp... no
checking for ppc-amigaos-aCC... no
checking for ppc-amigaos-CC... no
checking for ppc-amigaos-cxx... no
checking for ppc-amigaos-cc++... no
checking for ppc-amigaos-cl.exe... no
checking for ppc-amigaos-FCC... no
checking for ppc-amigaos-KCC... no
checking for ppc-amigaos-RCC... no
checking for ppc-amigaos-xlC_r... no
checking for ppc-amigaos-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... no
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... no
checking dynamic linker characteristics... amigaos ld.so
checking how to hardcode library paths into programs... immediate
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for ppc-amigaos-windres... no
checking for windres... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for GCC -MMD -MT option... yes
checking for linker option --no-undefined... yes
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for memory.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for size_t... yes
checking for M_PI in math.h... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for working memcmp... yes
checking for working strtod... yes
checking for mprotect... yes
checking for malloc... yes
checking for calloc... yes
checking for realloc... yes
checking for free... yes
checking for getenv... yes
checking for setenv... yes
checking for putenv... yes
checking for unsetenv... yes
checking for qsort... yes
checking for abs... yes
checking for bcopy... yes
checking for memset... yes
checking for memcpy... yes
checking for memmove... yes
checking for wcslen... yes
checking for wcscmp... yes
checking for strlen... yes
checking for strlcpy... no
checking for strlcat... no
checking for _strrev... no
checking for _strupr... no
checking for _strlwr... no
checking for strchr... yes
checking for strrchr... yes
checking for strstr... yes
checking for itoa... no
checking for _ltoa... no
checking for _uitoa... no
checking for _ultoa... no
checking for strtol... yes
checking for strtoul... yes
checking for _i64toa... no
checking for _ui64toa... no
checking for strtoll... yes
checking for strtoull... yes
checking for atoi... yes
checking for atof... yes
checking for strcmp... yes
checking for strncmp... yes
checking for _stricmp... no
checking for strcasecmp... yes
checking for _strnicmp... no
checking for strncasecmp... yes
checking for vsscanf... yes
checking for vsnprintf... yes
checking for fopen64... yes
checking for fseeko... yes
checking for fseeko64... yes
checking for sigaction... yes
checking for setjmp... yes
checking for nanosleep... yes
checking for sysconf... yes
checking for sysctlbyname... no
checking for getauxval... yes
checking for poll... yes
checking for pow in -lm... yes
checking for atan... yes
checking for atan2... yes
checking for acos... yes
checking for asin... yes
checking for ceil... yes
checking for copysign... yes
checking for cos... yes
checking for cosf... yes
checking for fabs... yes
checking for floor... yes
checking for log... yes
checking for pow... yes
checking for scalbn... yes
checking for sin... yes
checking for sinf... yes
checking for sqrt... yes
checking for sqrtf... yes
checking for tan... yes
checking for tanf... yes
checking for iconv_open in -liconv... no
checking for iconv... yes
checking for struct sigaction.sa_sigaction... yes
checking libunwind.h usability... no
checking libunwind.h presence... no
checking for libunwind.h... no
checking for GCC builtin atomic operations... yes
checking for GCC -mmmx option... yes
checking for GCC -m3dnow option... yes
checking for GCC -msse option... yes
checking for GCC -Wall option... yes
checking for necessary GCC -Wno-multichar option... no
checking for OpenGL ES v2 headers... yes
checking for pthreads... yes
checking for recursive mutexes... yes
checking for pthread semaphores... yes
checking for sem_timedwait... yes
checking for pthread_np.h... no
checking for pthread_setname_np... yes
checking for pthread_set_name_np... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sdl2-config
config.status: creating sdl2-config.cmake
config.status: creating SDL2.spec
config.status: creating sdl2.pc
config.status: creating include/SDL_config.h
config.status: include/SDL_config.h is unchanged
config.status: executing libtool commands
config.status: executing sdl2_config commands
config.status: executing summary commands
SDL2 Configure Summary:
Building Shared Libraries
Building Static Libraries
Enabled modules : atomic audio video render events joystick haptic power filesystem threads timers file loadso cpuinfo assembly
Assembly Math : mmx 3dnow sse
Audio drivers : dummy amigaos4
Video drivers : dummy amigaos4 opengl opengl_es2
Input drivers : amigainput
Using libsamplerate : NO
Using libudev : NO
Using dbus : NO
Using ime : NO
Using ibus : NO
Using fcitx : NO