All your homebrew software needs & discussion
-
yo1dog
- Posts: 13
- Joined: Sun Jul 03, 2022 8:31 pm
-
Contact:
Post
by yo1dog » Tue Jul 05, 2022 11:05 am
Been a while since my C days and I am have a hell of a time getting IPLBoot to compile as it requires an old version of devkitPPC (r26).
https://github.com/seewood/iplboot#buil ... nd-vipergc
Following the instructions, I found version r26 of devkitPPC
here, pulled the latest libOGC and compiled it with devkitPPC r26, and then attempt to compile iplboot with devkitPPC r26 and my compiled libogc.
It fails to link stating usleep is undefined:
Code: Select all
linking ... iplboot.elf
collect2 version 4.6.3 (PowerPC Embedded)
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/powerpc-eabi/bin/ld
--eh-frame-hdr
-dn
-Bstatic
-o /home/mike/projects/iplboot/iplboot.elf
-L/home/mike/projects/iplboot/deps/libogc/lib/cube
-L/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3
-L/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc
-L/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/powerpc-eabi/lib
--gc-sections
-v
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/crtend.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/ecrtn.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/ecrti.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/crtbegin.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/powerpc-eabi/lib/crtmain.o
ssaram.o
main.o
sidestep.o
ffshim.o
ffsystem.o
ff.o
ffunicode.o
-Map iplboot.elf.map
-logc
-lgcc
--start-group
-lsysbase
-lc
--end-group
-lgcc
-T /home/mike/projects/iplboot/ipl.ld
GNU ld (GNU Binutils) 2.22
main.o: In function `load_usb':
/home/mike/projects/iplboot/source/main.c:150: undefined reference to `usleep'
/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a(sdgecko_io.o): In function `__card_dataread':
/home/mike/projects/iplboot/deps/libogc/libogc/sdgecko_io.c:723: undefined reference to `usleep'
/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a(sdgecko_io.o): In function `__card_multidatawrite':
/home/mike/projects/iplboot/deps/libogc/libogc/sdgecko_io.c:780: undefined reference to `usleep'
collect2: ld returned 1 exit status
I assume I am just missing a library. usleep is declared in devkitppc-amd64_26/amd64/devkitPPC/include/sys/unistd.h, but what library should it be in?
FWIW, I can compile the
example projects with latest devkitpro without any issues.
-
yo1dog
- Posts: 13
- Joined: Sun Jul 03, 2022 8:31 pm
-
Contact:
Post
by yo1dog » Tue Jul 05, 2022 12:28 pm
Ah I realized I could use the --verbose flag in addition to -v. Some more information:
Code: Select all
linking ... iplboot.elf
powerpc-eabi-gcc
-Wl,--gc-sections,-v,--verbose
-nostartfiles
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/*/crtend.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/*/ecrtn.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/*/ecrti.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/*/crtbegin.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/powerpc-eabi/lib/crtmain.o
ssaram.o
main.o
sidestep.o
ffshim.o
ffsystem.o
ff.o
ffunicode.o
-g
-DGEKKO
-mcpu=750
-D__gamecube__
-DHW_DOL
-ffunction-sections
-fdata-sections
-Wl,-Map,iplboot.elf.map
-T/home/mike/projects/iplboot/ipl.ld
-L/home/mike/projects/iplboot/deps/libogc/lib/cube
-logc
-I/home/mike/projects/iplboot/deps/libogc/include
-o /home/mike/projects/iplboot/iplboot.elf
collect2 version 4.6.3 (PowerPC Embedded)
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/bin/ld
--eh-frame-hdr
-dn
-Bstatic
-o /home/mike/projects/iplboot/iplboot.elf
-L/home/mike/projects/iplboot/deps/libogc/lib/cube
-L/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3
-L/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc
-L/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib
--gc-sections
-v
--verbose
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/crtend.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/ecrtn.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/ecrti.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/crtbegin.o
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/powerpc-eabi/lib/crtmain.o
ssaram.o
main.o
sidestep.o
ffshim.o
ffsystem.o
ff.o
ffunicode.o
-Map iplboot.elf.map
-logc
-lgcc
--start-group
-lsysbase
-lc
--end-group
-lgcc
-T /home/mike/projects/iplboot/ipl.ld
GNU ld (GNU Binutils) 2.22
GNU ld (GNU Binutils) 2.22
Supported emulations:
elf32ppc
elf32ppclinux
elf32ppcsim
opened script file /home/mike/projects/iplboot/ipl.ld
using external linker script:
==================================================
/*
* Linkscript for GC
*
*/
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc");
OUTPUT_ARCH(powerpc:common);
EXTERN(_start);
ENTRY(_start);
PHDRS
{
stub PT_LOAD FLAGS(5);
text PT_LOAD FLAGS(5);
data PT_LOAD FLAGS(6);
bss PT_LOAD;
}
SECTIONS
{
/* default base address */
/* use -Wl,--section-start,.init=0xADDRESS to change */
. = 0x81300000;
/* Program */
.init :
{
KEEP (*crt0.o(*.init))
KEEP (*(.init))
} :text = 0
.plt : { *(.plt) }
.interp : { *(.interp) }
.hash : { *(.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.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) }
.rela.got1 : { *(.rela.got1) }
.rela.got2 : { *(.rela.got2) }
.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.* .rel.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) }
.text :
{
*(.text)
*(.text.*)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t.*)
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
} = 0
.fini :
{
KEEP (*(.fini))
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
} = 0
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
.rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } :data
.rodata1 : { *(.rodata1) }
.sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
.sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
/* Ensure the __preinit_array_start label is properly aligned. We
could instead move the label definition inside the section, but
the linker would then create the section even if it turns out to
be empty, which isn't pretty. */
. = ALIGN(32 / 8);
PROVIDE (__preinit_array_start = .);
.preinit_array : { *(.preinit_array) }
PROVIDE (__preinit_array_end = .);
PROVIDE (__init_array_start = .);
.init_array : { *(.init_array) }
PROVIDE (__init_array_end = .);
PROVIDE (__fini_array_start = .);
.fini_array : { *(.fini_array) }
PROVIDE (__fini_array_end = .);
.data :
{
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
}
.data1 : { *(.data1) }
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
.fixup : { *(.fixup) }
.got1 : { *(.got1) }
.got2 : { *(.got2) }
.dynamic : { *(.dynamic) }
.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))
/* We don't want to include the .ctor section from
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 ) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
}
.dtors :
{
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
}
.jcr : { KEEP (*(.jcr)) }
.got : { *(.got.plt) *(.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 :
{
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
}
_edata = .;
PROVIDE (edata = .);
.sbss :
{
__sbss_start = .;
PROVIDE (__sbss_start = .);
PROVIDE (___sbss_start = .);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
PROVIDE (__sbss_end = .);
PROVIDE (___sbss_end = .);
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
__sbss_end = .;
} :bss
.bss :
{
__bss_start = .;
PROVIDE (__bss_start = .);
*(.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. */
. = ALIGN(32);
PROVIDE (__bss_end = .);
__bss_end = .;
}
_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) }
.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) }
/* These must appear regardless of . */
}
__isIPL = 0;
__stack_addr = (__bss_start + SIZEOF(.bss) + 0x20000 + 7) & (-8);
__stack_end = (__bss_start + SIZEOF(.bss));
__intrstack_addr = (__stack_addr + 0x4000);
__intrstack_end = (__stack_addr);
__Arena1Lo = (0x80000000);
__Arena1Hi = (0x812FEFF0);
__gxregs = (__Arena1Hi + 31) & (-32);
==================================================
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/crtend.o succeeded
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/crtend.o
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/ecrtn.o succeeded
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/ecrtn.o
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/ecrti.o succeeded
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/ecrti.o
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/crtbegin.o succeeded
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/lib/gcc/powerpc-eabi/4.6.3/crtbegin.o
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/powerpc-eabi/lib/crtmain.o succeeded
/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/powerpc-eabi/lib/crtmain.o
attempt to open ssaram.o succeeded
ssaram.o
attempt to open main.o succeeded
main.o
attempt to open sidestep.o succeeded
sidestep.o
attempt to open ffshim.o succeeded
ffshim.o
attempt to open ffsystem.o succeeded
ffsystem.o
attempt to open ff.o succeeded
ff.o
attempt to open ffunicode.o succeeded
ffunicode.o
attempt to open /home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a succeeded
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)console.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_threads.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_handler.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_stack.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_watchdog.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_wkspace.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_objmgr.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_heap.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)sys_state.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)video.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)pad.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)exi.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)cache_asm.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)system.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)system_asm.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)cond.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)gx.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)decrementer.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)message.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)aram.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)si.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)ogc_crt0.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)console_font_8x16.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)timesupp.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lock_supp.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)newlibc.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)usbgecko.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)sbrk.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)malloc_lock.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)kprintf.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)gcsd.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)argv.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_priority.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_queue.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_threadq.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_messages.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_mutex.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)exception.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)irq.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)irq_handler.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)semaphore.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)video_asm.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)mutex.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)decrementer_handler.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)sdgecko_io.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)sdgecko_buf.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)lwp_sema.o
(/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a)exception_handler.o
attempt to open /home/mike/projects/iplboot/deps/libogc/lib/cube/libgcc.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/libgcc.a succeeded
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/libgcc.a)_udivdi3.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/libgcc.a)_umoddi3.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/libgcc.a)eabi.o
attempt to open /home/mike/projects/iplboot/deps/libogc/lib/cube/libsysbase.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/libsysbase.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/libsysbase.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a succeeded
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)abort.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)iosupport.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)_exit.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)build_argv.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)syscall_support.o
attempt to open /home/mike/projects/iplboot/deps/libogc/lib/cube/libc.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/libc.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/libc.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a succeeded
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-calloc.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-callocr.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-exit.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-impure.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-malign.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-malignr.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-malloc.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-mallocr.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-memcpy.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-memmove.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-memset.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-printf.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-reent.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-setvbuf.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strchr.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strcmp.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strlen.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strncmp.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strnlen.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-syswrite.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-vfprintf.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-wcrtomb.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-wcsrtombs.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-wctomb_r.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-wsetup.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-__call_atexit.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-dtoa.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-fflush.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-findfp.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-freer.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-fwalk.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-locale.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-makebuf.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-mbtowc_r.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-memchr.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-mprec.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-s_fpclassify.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-stdio.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strcasecmp.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strcat.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strcpy.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strlcpy.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strncasecmp.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strncpy.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-strtol.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-vfiprintf.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-wcsnrtombs.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-__atexit.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-ctype_.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-fclose.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-fputwc.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-fvwrite.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-getenv_r.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-reallocr.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-wbuf.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-environ.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libc.a)lib_a-envlock.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)close.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)fstat.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)isatty.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)lseek.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)read.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)sbrk.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)write.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)flock.o
(/home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/libsysbase.a)handle_manager.o
attempt to open /home/mike/projects/iplboot/deps/libogc/lib/cube/libgcc.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/libgcc.a succeededmain.o: In function `load_usb':
/home/mike/projects/iplboot/source/main.c:150: undefined reference to `usleep'
/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a(sdgecko_io.o): In function `__card_dataread':
/home/mike/projects/iplboot/deps/libogc/libogc/sdgecko_io.c:723: undefined reference to `usleep'
/home/mike/projects/iplboot/deps/libogc/lib/cube/libogc.a(sdgecko_io.o): In function `__card_multidatawrite':
/home/mike/projects/iplboot/deps/libogc/libogc/sdgecko_io.c:780: undefined reference to `usleep'
collect2: ld returned 1 exit status
Specifically I see these errors:
Code: Select all
attempt to open /home/mike/projects/iplboot/deps/libogc/lib/cube/libgcc.a failed
attempt to open /home/mike/projects/iplboot/deps/libogc/lib/cube/libsysbase.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/gcc/powerpc-eabi/4.6.3/libsysbase.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/gcc/libsysbase.a failed
attempt to open /home/mike/projects/iplboot/deps/libogc/lib/cube/libc.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/gcc/powerpc-eabi/4.6.3/libc.a failed
attempt to open /home/mike/projects/devkitppc-amd64_26/amd64/devkitPPC/bin/gcc/libc.a failed
attempt to open /home/mike/projects/iplboot/deps/libogc/lib/cube/libgcc.a failed
Hmm...
-
yo1dog
- Posts: 13
- Joined: Sun Jul 03, 2022 8:31 pm
-
Contact:
Post
by yo1dog » Tue Jul 05, 2022 12:48 pm
More digging. I searched through all the symbols in all the libraries in my normal/latest devkitpro installation looking for where usleep was defined. Found it:
Code: Select all
find /opt/devkitpro -name '*.a' -exec bash -c "echo {}; nm --defined-only {} 2>/dev/null | grep usleep" \;
...
/opt/devkitpro/devkitPPC/powerpc-eabi/lib/libsysbase.a
usleep.o:
00000000 T usleep
So usleep is defined in usleep.o in libsysbase.a in the latest devkitpro version.
Edit: In devkitpro r26, libsysbase.a also exists but does not contain usleep.o. In fact, usleep is not defined in any library in r26...
Code: Select all
find /home/mike/projects/devkitppc-amd64_26 -name '*.a' -exec bash -c "echo {}; nm --defined-only {} 2>/dev/null | grep usleep" \;
find /home/mike/projects/devkitppc-amd64_26 -name '*.o' -exec bash -c "echo {}; nm --defined-only {} 2>/dev/null | grep usleep" \;
find /home/mike/projects/devkitppc-amd64_26 -name '*.so' -exec bash -c "echo {}; nm --defined-only {} 2>/dev/null | grep usleep" \;
What gives!?
-
yo1dog
- Posts: 13
- Joined: Sun Jul 03, 2022 8:31 pm
-
Contact:
Post
by yo1dog » Tue Jul 05, 2022 2:45 pm
I tried stealing usleep.o and nanosleep.o from the latest version and using them to link. It worked... in that it linked and compiled successfully. But after flashing my pico I get only a black screen. Not sure if the problem is those libraries or something else. Would like to get my build environment figured out so I can start eliminating variables...
Any advice is welcome.
-
yo1dog
- Posts: 13
- Joined: Sun Jul 03, 2022 8:31 pm
-
Contact:
Post
by yo1dog » Tue Jul 05, 2022 3:56 pm
OH YEA! Got it!
I miss-read the docs. version r26 of devKitPro is only required if you are compiling for the old qoob or viper mode chips which had limited space. Doesn't mater for PicoBoot. So you can just use latest devKitPro.
Getting it compiling was pretty easy after that. I'll be submitting pull requests for some of the required tweaks and do a write up.
One early observation is that I could not get a working IPL when compiling iplboot with gcc. clang worked though.
Thanks for rubber-ducking everyone
-
yo1dog
- Posts: 13
- Joined: Sun Jul 03, 2022 8:31 pm
-
Contact:
Post
by yo1dog » Mon Jul 11, 2022 1:45 am