hmmm i don't know where i got my shared libjpeg from then, but i guess i could upload it, as i have no problems with sdl_image and libjpeg. maybe i compiled it myself at some point, not sure though. i will have a look.
I tried but that doesn't work better. I compiled SDL_image but it complained about unresolved symbol in libtiff on libjpeg ... I tried to compile again libtiff but I have an error, a usual one about conftest that can't be deleted because it is a directory (a bug somewhere in the tool).
So maybe the problem is deeper. Developers, please can you check if I am alone or not in this situation (I become crazy !). You can check compiling : this file That would help.
At the top of the source, I added a comment to explain how I compile it.
Let me know if it works or not (ISI exception here).
Additional note : Be careful, I first compiled with -lpng but in my SDK I only had libpng with a file (a link) "libpng12.so" so it linked libpng using the static lib silently ! We have to know that if we ask for a shared object and it is not found, the compiler takes the static version. And here, as libpng is a dependency of SDL_image.so, that will lead to problems ...
i had to copy smpeg-config and sdl-config to usr:local/bin and change !#/bin/sh to !#bin:sh in both those files to make it continue.
i also had to chmod smpeg-config it was missing the s and e flag.
pygame failed gracefully to find any libs though. but now it is compiling. i guess i could manually change those config files and tell pygame that i have the libs and where they are.
the first game i tested seemed to crash when opening datetime.so.. after that i tried some of the pygame tests, most works, some don't... gonna try to find some really simple test game to try now.
if (TTF_Init ()) return PyInt_FromLong (0); font_initialized = 1;
} return PyInt_FromLong (font_initialized); }
that snake game ain't using any font, so it works, all other games i tried crashed in font.so. I don't have a clue on how to fix that though.
Edited by spotUP on 2010/8/18 1:35:37 Edited by spotUP on 2010/8/18 1:39:01 Edited by spotUP on 2010/8/18 2:17:13 Edited by spotUP on 2010/8/18 2:18:17 Edited by spotUP on 2010/8/18 2:19:18
Good job, glad to see this port finally proceeding after a long period of hiatus.
@djrikki Pygame is not only for playing games, but is also used to make them. I think it's the first complete "environment" for OS4 specifically designed for games.
right, so i built pygame without font support, and tada, no more crashes.
7.Bob:Coding/Projects> python "pong v1.0.py" pong v1.0.py:50: RuntimeWarning: use font: No module named font (ImportError: No module named font) font = pygame.font.SysFont("calibri",40) Traceback (most recent call last): File "pong v1.0.py", line 50, in <module> font = pygame.font.SysFont("calibri",40) File "PYTHON:Lib/site-packages/pygame/__init__.py", line 70, in __getattr__ raise NotImplementedError(MissingPygameModule) NotImplementedError: font module not available (ImportError: No module named font)
but on the other hand 99% of all apps won't run. so let's hope python gets that missing font module added soon!
this is the output when adding those link switches:
it suggest that it links with a static libSDL_ttf.
"attempt to open /SDK/local/newlib/lib/libSDL_ttf.a succeeded"
i will try to make it use a shared version.
sdk/local/common/include/SDL -ISDK:Local/newlib/include/python2.5 -c -fPIC -O3 src/font.c -o build/temp.ppc-amiga-2.5/src/font.o gcc -Wl,--verbose build/temp.ppc-amiga-2.5/src/font.o -lSDL -lSDL_ttf -shared -lpython25 -o build/lib.ppc-amiga-2.5/pygame/font.so 7.Bob:Coding/Projects/pygame-1.9.1release> GNU ld (GNU Binutils) 2.18 Supported emulations: amigaos elf32ppc using internal linker script: ================================================== /* Script for ld --shared: link shared library */ OUTPUT_FORMAT("elf32-amigaos", "elf32-amigaos", "elf32-amigaos") OUTPUT_ARCH(powerpc) ENTRY(_start) SEARCH_DIR("/gcc/ppc-amigaos/lib"); SEARCH_DIR("/gcc/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ . = 0x10000000 + SIZEOF_HEADERS; .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } .gnu.hash : { *(.gnu.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .gnu.version : { *(.gnu.version) } .gnu.version_d : { *(.gnu.version_d) } .gnu.version_r : { *(.gnu.version_r) } .rel.init : { *(.rel.init) } .rela.init : { *(.rela.init) } .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } .rel.fini : { *(.rel.fini) } .rela.fini : { *(.rela.fini) } .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } .rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) } .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) } .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } .rel.ctors : { *(.rel.ctors) } .rela.ctors : { *(.rela.ctors) } .rel.dtors : { *(.rel.dtors) } .rela.dtors : { *(.rela.dtors) } .rel.got : { *(.rel.got) } .rela.got : { *(.rela.got) } .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) } .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) } .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) } .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) } .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) } .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) } .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) } .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) } .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } .rel.plt : { *(.rel.plt) } .rela.plt : { *(.rela.plt) } .init : { KEEP (*(.init)) } =0 .text : { *(.text .stub .text.* .gnu.linkonce.t.*) KEEP (*(.text.*personality*)) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.glink) } =0 . = ALIGN(4096); .plt : { *(.plt) } . = ALIGN(4096); .fini : { KEEP (*(.fini)) } =0 PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } .rodata1 : { *(.rodata1) } .eh_frame_hdr : { *(.eh_frame_hdr) } .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = ALIGN(CONSTANT (MAXPAGESIZE)); /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } /* Thread Local Storage sections */ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } .preinit_array : { KEEP (*(.preinit_array)) } .init_array : { KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) } .fini_array : { KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) } .ctors : { /* gcc uses crtbegin.o to find the start of the constructors, so we make sure it is first. Because this is a wildcard, it doesn't matter if the user does not actually link against crtbegin.o; the linker won't look for a file to match a wildcard. The wildcard also means that it doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) KEEP (*crtbegin?.o(.ctors)) /* We don't want to include the .ctor section from the crtend.o file until after the sorted ctors. The .ctor section from the crtend file contains the end of ctors marker and it must be last */ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) } .dtors : { KEEP (*crtbegin.o(.dtors)) KEEP (*crtbegin?.o(.dtors)) KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } .jcr : { KEEP (*(.jcr)) } .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } .dynamic : { *(.dynamic) } .got : SPECIAL { *(.got) } .data : { _DATA_BASE_ = .; *(.data .data.* .gnu.linkonce.d.*) KEEP (*(.gnu.linkonce.d.*personality*)) SORT(CONSTRUCTORS) } .data1 : { *(.data1) } .got : SPECIAL { *(.got) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ .sdata : { _SDA_BASE_ = . + 0x8000; *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) *(.sdata .sdata.* .gnu.linkonce.s.*) } _edata = .; PROVIDE (edata = .); __bss_start = .; .sbss : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) *(.dynsbss) *(.sbss .sbss.* .gnu.linkonce.sb.*) *(.scommon) } .bss : { *(.dynbss) *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the .bss section disappears because there are no input sections. FIXME: Why do we need it? When there is no .bss section, we don't pad the .data section. */ . = ALIGN(. != 0 ? 16 : 1); } . = ALIGN(16); . = ALIGN(16); _end = .; PROVIDE (end = .); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } .stab.exclstr 0 : { *(.stab.exclstr) } .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ /* DWARF 1 */ .debug 0 : { *(.debug) } .line 0 : { *(.line) } /* GNU DWARF 1 extensions */ .debug_srcinfo 0 : { *(.debug_srcinfo) } .debug_sfnames 0 : { *(.debug_sfnames) } /* DWARF 1.1 and DWARF 2 */ .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } /* DWARF 2 */ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } .debug_str 0 : { *(.debug_str) } .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } /* SGI/MIPS DWARF 2 extensions */ .debug_weaknames 0 : { *(.debug_weaknames) } .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } /* DWARF 3 */ .debug_pubtypes 0 : { *(.debug_pubtypes) } .debug_ranges 0 : { *(.debug_ranges) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) } }
================================================== attempt to open /SDK/newlib/lib/shcrtbegin.o succeeded /SDK/newlib/lib/shcrtbegin.o attempt to open build/temp.ppc-amiga-2.5/src/font.o succeeded build/temp.ppc-amiga-2.5/src/font.o attempt to open /SDK/newlib/lib/libSDL.so failed attempt to open /SDK/newlib/lib/libSDL.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libSDL.so failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libSDL.a failed attempt to open /SDK/local/newlib/lib/libSDL.so succeeded -lSDL (/SDK/local/newlib/lib/libSDL.so) attempt to open /SDK/newlib/lib/libSDL_ttf.so failed attempt to open /SDK/newlib/lib/libSDL_ttf.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libSDL_ttf.so failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libSDL_ttf.a failed attempt to open /SDK/local/newlib/lib/libSDL_ttf.so failed attempt to open /SDK/local/newlib/lib/libSDL_ttf.a succeeded (/SDK/local/newlib/lib/libSDL_ttf.a)SDL_ttf.o attempt to open /SDK/newlib/lib/libpython25.so failed attempt to open /SDK/newlib/lib/libpython25.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libpython25.so failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libpython25.a failed attempt to open /SDK/local/newlib/lib/libpython25.so succeeded -lpython25 (/SDK/local/newlib/lib/libpython25.so) attempt to open /SDK/newlib/lib/libgcc.so failed attempt to open /SDK/newlib/lib/libgcc.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libgcc.so succeeded -lgcc (/GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libgcc.so) attempt to open /SDK/newlib/lib/libc.so succeeded -lc (/SDK/newlib/lib/libc.so) attempt to open /SDK/newlib/lib/libgcc.so failed attempt to open /SDK/newlib/lib/libgcc.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libgcc.so succeeded -lgcc (/GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libgcc.so) attempt to open /SDK/newlib/lib/shcrtend.o succeeded /SDK/newlib/lib/shcrtend.o 7.Bob:Coding/Projects/pygame-1.9.1release>
round two.. after copying some missing .so files from sobjs: to my sdk...
now it succeeds. let's see if it crashes, which i believe it will as i think the problem is also that python itself is missing it's font module. but atleast we will get a crash log.
attempt to open /SDK/newlib/lib/shcrtbegin.o succeeded /SDK/newlib/lib/shcrtbegin.o attempt to open build/temp.ppc-amiga-2.5/src/font.o succeeded build/temp.ppc-amiga-2.5/src/font.o attempt to open /SDK/newlib/lib/libSDL.so failed attempt to open /SDK/newlib/lib/libSDL.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libSDL.so failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libSDL.a failed attempt to open /SDK/local/newlib/lib/libSDL.so succeeded -lSDL (/SDK/local/newlib/lib/libSDL.so) attempt to open /SDK/newlib/lib/libSDL_ttf.so failed attempt to open /SDK/newlib/lib/libSDL_ttf.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libSDL_ttf.so failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libSDL_ttf.a failed attempt to open /SDK/local/newlib/lib/libSDL_ttf.so succeeded -lSDL_ttf (/SDK/local/newlib/lib/libSDL_ttf.so) attempt to open /SDK/newlib/lib/libfreetype.so failed attempt to open /SDK/newlib/lib/libfreetype.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libfreetype.so failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libfreetype.a failed attempt to open /SDK/local/newlib/lib/libfreetype.so succeeded -lfreetype (/SDK/local/newlib/lib/libfreetype.so) attempt to open /SDK/newlib/lib/libz.so failed attempt to open /SDK/newlib/lib/libz.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libz.so failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libz.a failed attempt to open /SDK/local/newlib/lib/libz.so succeeded -lz (/SDK/local/newlib/lib/libz.so) attempt to open /SDK/newlib/lib/libpython25.so failed attempt to open /SDK/newlib/lib/libpython25.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libpython25.so failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libpython25.a failed attempt to open /SDK/local/newlib/lib/libpython25.so succeeded -lpython25 (/SDK/local/newlib/lib/libpython25.so) attempt to open /SDK/newlib/lib/libgcc.so failed attempt to open /SDK/newlib/lib/libgcc.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libgcc.so succeeded -lgcc (/GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libgcc.so) attempt to open /SDK/newlib/lib/libc.so succeeded -lc (/SDK/newlib/lib/libc.so) attempt to open /SDK/newlib/lib/libgcc.so failed attempt to open /SDK/newlib/lib/libgcc.a failed attempt to open /GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libgcc.so succeeded -lgcc (/GCC/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libgcc.so) attempt to open /SDK/newlib/lib/shcrtend.o succeeded /SDK/newlib/lib/shcrtend.o