GithubHelp home page GithubHelp logo

Unable to compile channel about hbc HOT 10 CLOSED

fail0verflow avatar fail0verflow commented on September 24, 2024
Unable to compile channel

from hbc.

Comments (10)

 avatar commented on September 24, 2024

I am have the same problem:

make[1]: Entering directory '/home/jasper/Desktop/hbc-master/channel/channelapp
banner_bin.o
bubble1_png.o
cursor_drag_png.o
button_small_focus_png.o
apps_list_hover_png.o
progress_png.o
cursor_shade_png.o
button_png.o
apps_list_png.o
bubble3_png.o
button_tiny_png.o
apps_next_png.o
cursor_drag_shade_png.o
content_arrow_down_png.o
background_wide_png.o
about_png.o
button_tiny_focus_png.o
apps_previous_png.o
bubble2_png.o
background_png.o
cursor_pic_png.o
apps_next_hover_png.o
icon_usbgecko_png.o
button_small_png.o
content_arrow_up_png.o
dlg_confirm_png.o
icon_usbgecko_active_png.o
icon_network_png.o
dlg_info_png.o
apps_grid_hover_png.o
button_focus_png.o
apps_previous_hover_png.o
icon_network_active_png.o
logo_png.o
apps_grid_png.o
throbber_png.o
dlg_error_png.o
dialog_background_png.o
dlg_warning_png.o
japanese.enc.po
japanese.mo
japanese_mo.o
italian.enc.po
italian.mo
italian_mo.o
german.enc.po
german.mo
german_mo.o
french.enc.po
french.mo
french_mo.o
spanish.enc.po
spanish.mo
spanish_mo.o
dutch.enc.po
dutch.mo
dutch_mo.o
droidbold_ttf.o
droid_ttf.o
rm build/japanese.enc.po build/dutch.enc.po build/italian.mo build/italian.enc.po build/spanish.mo build/german.enc.po build/spanish.enc.po build/german.mo build/dutch.mo build/french.mo build/japanese.mo build/french.enc.po
panic.o
xml.o
theme.o
dvd.o
sha1.o
controls.o
dialogs.o
playtime.o
tcp.o
loader.o
In file included from source/loader.c:23:0:
source/loader.h:28:15: error: 'MAXPATHLEN' undeclared here (not in a function)
  char dirname[MAXPATHLEN];
               ^~~~~~~~~~
source/loader.c: In function 'loader_load':
source/loader.c:707:7: warning: unused variable 'filename' [-Wunused-variable]
  char filename[MAXPATHLEN];
       ^~~~~~~~
source/loader.c:706:7: warning: unused variable 'caption' [-Wunused-variable]
  char caption[MAXPATHLEN + 32];
       ^~~~~~~
Makefile:179: recipe for target 'build/loader.o' failed
make[3]: *** [build/loader.o] Error 1
Makefile:81: recipe for target 'all' failed
make[2]: *** [all] Error 2
Makefile:86: recipe for target 'channel' failed
make[1]: *** [channel] Error 2
make[1]: Leaving directory '/home/jasper/Desktop/hbc-master/channel/channelapp'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2

from hbc.

blubberdiblub avatar blubberdiblub commented on September 24, 2024

The MAXPATHLEN problem is fixable by adding #include <sys/param.h> to the affected files.
The stricmp problem is fixable by replacing stricmp by strcasecmp.

However, now I'm stuck at linking against mxml (note that the one on sourceforce is quite old), which apparently references a non-existent symbol __ctype_ptr__:

make[1]: Entering directory '/srv/storage/src/hbc/channel/channelapp'
make[3]: Nothing to be done for 'data'.
channelapp_nopax.elf
/opt/devkitpro/portlibs/ppc/lib/libmxml.a(mxml-file.o): In function `mxml_get_entity':
/Users/davem/projects/portlibs/mxml-2.6/mxml-file.c:1369: undefined reference to `__ctype_ptr__'
/Users/davem/projects/portlibs/mxml-2.6/mxml-file.c:1369: undefined reference to `__ctype_ptr__'
collect2: error: ld returned 1 exit status
Makefile:110: recipe for target 'channelapp_nopax.elf' failed
make[3]: *** [channelapp_nopax.elf] Error 1

from hbc.

palxex avatar palxex commented on September 24, 2024

@blubberdiblub same problem here. Finally I found the problem: devkitpro upgraded their ABI in compiler but did not upgrade their portlibs. The current situation is we'd to recompile mxml manually. Tips: configure it with --enable-threads=no.
Then after that I stucked at CryptoDomo( I strongly suggest add a requirements.txt in top folder or pywii), it complains TypeError: Only byte strings can be passed to C code in the wad.adddata(data,ct.cid) call, seems version dismatch. Now have no idea.

from hbc.

marcan avatar marcan commented on September 24, 2024

For DevkitPPC issues, please report them to DevkitPPC. This isn't the first time they've broken everything.

Without a full stacktrace there's no way to figure out what that pywii error is. It works fine for me.

from hbc.

palxex avatar palxex commented on September 24, 2024
Warning: failed to load key korean-key
Traceback (most recent call last):
  File "/home/user/hbc/channel/title/../../pywii/pywii-tools/wadpack.py", line 28, in <module>
    wad.adddata(data,ct.cid)
  File "/home/user/hbc/pywii/pywii-tools/pywii/wii.py", line 1506, in adddata
    aes = AES.new(self.tik.title_key, AES.MODE_CBC, iv)
  File "/usr/local/lib/python2.7/dist-packages/Cryptodome/Cipher/AES.py", line 264, in new
    return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/Cryptodome/Cipher/__init__.py", line 130, in _create_cipher
    return modes[mode](factory, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/Cryptodome/Cipher/_mode_cbc.py", line 232, in _create_cbc_cipher
    cipher_state = factory._create_base_cipher(kwargs)
  File "/usr/local/lib/python2.7/dist-packages/Cryptodome/Cipher/AES.py", line 131, in _create_base_cipher
    expect_byte_string(key)
  File "/usr/local/lib/python2.7/dist-packages/Cryptodome/Util/_raw_api.py", line 175, in expect_byte_string
    raise TypeError("Only byte strings can be passed to C code")
TypeError: Only byte strings can be passed to C code
Makefile:14: recipe for target 'channel_retail.wad' failed
make[1]: *** [channel_retail.wad] Error 1
make[1]: Leaving directory '/home/user/hbc/channel/title'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2

Now both my ubuntu & macOS machine report this error. pycryptodomex 3.4.6.

from hbc.

marcan avatar marcan commented on September 24, 2024

Does it fail to load any other keys besides "korean-key"? If it does, you're missing your keys.

from hbc.

palxex avatar palxex commented on September 24, 2024

I'm afraid there're many missing key...below is a full log after channelapp built:

wiipax v0.2 (c) 2009 Team Twiizers

Using stub 'devkitfail'
.payload section found: #3
Mapped payload to program header [0] 0x002624
Stripping ELF from 0x2f5b to 0x26c0 bytes
  PHDR[0] 0x00000060 0x002660 -> [0] 0x000060
Reading channelapp_nopax.elf
Stripping ELF from 0x569698 to 0x1d2900 bytes
  PHDR[1] 0x00010000 0x0e0fe0 -> [0] 0x000080
  PHDR[2] 0x000f0fe0 0x0f18a0 -> [1] 0x0e1060
Compressing... 1911040 -> 987443 = 51.67%
Injecting payload in PHDR 0, size += 0xf1140 (0x0/0xf1140/0x0)
Payload blob @0x90012660 at runtime
Done.
channelapp-channel.elf
wiipax v0.2 (c) 2009 Team Twiizers

Using stub 'dkfailchannel'
.payload section found: #4
Mapped payload to program header [1] 0x002624
Stripping ELF from 0x3120 to 0x2820 bytes
  PHDR[0] 0x00000074 0x000140 -> [0] 0x000080
  PHDR[1] 0x000001c0 0x002660 -> [1] 0x0001c0
Reading channelapp_nopax.elf
Stripping ELF from 0x569698 to 0x1d2900 bytes
  PHDR[1] 0x00010000 0x0e0fe0 -> [0] 0x000080
  PHDR[2] 0x000f0fe0 0x0f18a0 -> [1] 0x0e1060
Compressing... 1911040 -> 987443 = 51.67%
Injecting payload in PHDR 1, size += 0xf1140 (0x0/0xf1140/0x0)
Payload blob @0x90012660 at runtime
Done.
channelapp-channel.dol
Warning: writable and executable segment 1
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C tools png2tpl
gcc -O3 -Wall -I/usr/local/include -L/usr/local/lib -o png2tpl png2tpl.c -lpng
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C tools lz77
gcc -O3 -Wall -I/usr/local/include -L/usr/local/lib -o lz77 lz77.c
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C icon -f ../Makefile.section
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl icon_fade.png ../build/icon/arc/timg/icon_fade.tpl `grep icon_fade.png textures.txt | cut -f 2-`
Texture: 8 x 128
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl icon_shape2.png ../build/icon/arc/timg/icon_shape2.tpl `grep icon_shape2.png textures.txt | cut -f 2-`
Texture: 159 x 7
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl icon_title.png ../build/icon/arc/timg/icon_title.tpl `grep icon_title.png textures.txt | cut -f 2-`
Texture: 110 x 49
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl icon_wave1a.png ../build/icon/arc/timg/icon_wave1a.tpl `grep icon_wave1a.png textures.txt | cut -f 2-`
Texture: 94 x 8
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl icon_wave1b.png ../build/icon/arc/timg/icon_wave1b.tpl `grep icon_wave1b.png textures.txt | cut -f 2-`
Texture: 130 x 9
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl icon_wavea.png ../build/icon/arc/timg/icon_wavea.tpl `grep icon_wavea.png textures.txt | cut -f 2-`
Texture: 256 x 16
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl icon_waveb.png ../build/icon/arc/timg/icon_waveb.tpl `grep icon_waveb.png textures.txt | cut -f 2-`
Texture: 256 x 16
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl white.png ../build/icon/arc/timg/white.tpl `grep white.png textures.txt | cut -f 2-`
Texture: 8 x 4
python2 mkicon.py ../build/icon/arc/blyt/icon.brlyt ../build/icon/arc/anim/icon.brlan
0 -130 2.0
240.0 130 2.0
480.0 -130 2.0
720.0 130 2.0
960.0 -130 2.0
python2 /Users/palxex/gst/hbc/channel/banner/../../pywii/pywii-tools/arcpack.py ../build/icon.arc ../build/icon
/Users/palxex/gst/hbc/channel/banner/tools/lz77 ../build/icon.arc ../build/icon.lz77
python2 /Users/palxex/gst/hbc/channel/banner/tools/addimd5.py ../build/icon.lz77 ../build/data/meta/icon.bin
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C banner -f ../Makefile.section
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl abubble1.png ../build/banner/arc/timg/abubble1.tpl `grep abubble1.png textures.txt | cut -f 2-`
Texture: 48 x 48
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl abubble2.png ../build/banner/arc/timg/abubble2.tpl `grep abubble2.png textures.txt | cut -f 2-`
Texture: 32 x 32
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl abubble3.png ../build/banner/arc/timg/abubble3.tpl `grep abubble3.png textures.txt | cut -f 2-`
Texture: 16 x 16
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl abubble4.png ../build/banner/arc/timg/abubble4.tpl `grep abubble4.png textures.txt | cut -f 2-`
Texture: 24 x 24
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl abubble5.png ../build/banner/arc/timg/abubble5.tpl `grep abubble5.png textures.txt | cut -f 2-`
Texture: 32 x 32
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl abubble6.png ../build/banner/arc/timg/abubble6.tpl `grep abubble6.png textures.txt | cut -f 2-`
Texture: 16 x 16
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl banner_fade.png ../build/banner/arc/timg/banner_fade.tpl `grep banner_fade.png textures.txt | cut -f 2-`
Texture: 8 x 256
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl banner_shape2.png ../build/banner/arc/timg/banner_shape2.tpl `grep banner_shape2.png textures.txt | cut -f 2-`
Texture: 644 x 28
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl banner_title.png ../build/banner/arc/timg/banner_title.tpl `grep banner_title.png textures.txt | cut -f 2-`
Texture: 400 x 180
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl banner_wave1a.png ../build/banner/arc/timg/banner_wave1a.tpl `grep banner_wave1a.png textures.txt | cut -f 2-`
Texture: 382 x 32
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl banner_wave1b.png ../build/banner/arc/timg/banner_wave1b.tpl `grep banner_wave1b.png textures.txt | cut -f 2-`
Texture: 527 x 37
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl banner_wavea.png ../build/banner/arc/timg/banner_wavea.tpl `grep banner_wavea.png textures.txt | cut -f 2-`
Texture: 1024 x 64
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl banner_waveb.png ../build/banner/arc/timg/banner_waveb.tpl `grep banner_waveb.png textures.txt | cut -f 2-`
Texture: 1024 x 64
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl bbubble1.png ../build/banner/arc/timg/bbubble1.tpl `grep bbubble1.png textures.txt | cut -f 2-`
Texture: 48 x 48
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl cbubble1.png ../build/banner/arc/timg/cbubble1.tpl `grep cbubble1.png textures.txt | cut -f 2-`
Texture: 64 x 64
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl cbubble2.png ../build/banner/arc/timg/cbubble2.tpl `grep cbubble2.png textures.txt | cut -f 2-`
Texture: 16 x 16
/Users/palxex/gst/hbc/channel/banner/tools/png2tpl white.png ../build/banner/arc/timg/white.tpl `grep white.png textures.txt | cut -f 2-`
Texture: 8 x 4
python2 mkbanner.py ../build/banner/arc/blyt/banner.brlyt ../build/banner/arc/anim/banner_Start.brlan ../build/banner/arc/anim/banner_Loop.brlan
Fake Start -600
Loop Start 360
Loop End 1320
python2 /Users/palxex/gst/hbc/channel/banner/../../pywii/pywii-tools/arcpack.py ../build/banner.arc ../build/banner
/Users/palxex/gst/hbc/channel/banner/tools/lz77 ../build/banner.arc ../build/banner.lz77
python2 /Users/palxex/gst/hbc/channel/banner/tools/addimd5.py ../build/banner.lz77 ../build/data/meta/banner.bin
sox sound/wiibrew-banner-intro-part.wav -r 32000 -c 2 -e signed-integer -b 16 -t raw build/wiibrew-banner-intro-part.raw
sox sound/wiibrew-banner-loop-part.wav -r 32000 -c 2 -e signed-integer -b 16 -t raw build/wiibrew-banner-loop-part.raw
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C tools mkbns
gcc -O3 -Wall -I/usr/local/include -L/usr/local/lib -o mkbns mkbns.c -lm
/Users/palxex/gst/hbc/channel/banner/tools/mkbns build/wiibrew-banner-intro-part.raw build/sound.bns 1 build/wiibrew-banner-loop-part.raw
Samples: 0x62ae7
Blocks: 0x70c8 Size ADPCM: 0x38640 Size PCM: 0x62af0
Loop point: 0x20e5b samples
python2 /Users/palxex/gst/hbc/channel/banner/tools/addimd5.py build/sound.bns build/data/meta/sound.bin
python2 /Users/palxex/gst/hbc/channel/banner/../../pywii/pywii-tools/arcpack.py build/data.arc build/data
python2 tools/join-imet.py channel.imet build/data.arc build/icon.arc build/banner.arc build/sound.bns names.txt
Warning: failed to load key common-key
Warning: failed to load key sd-key
Warning: failed to load key sd-iv
Warning: failed to load key md5-blanker
Warning: failed to load key root-key
Warning: failed to load key korean-key
fixing Tik file retail/cetk
Warning: failed to load key common-key
Warning: failed to load key sd-key
Warning: failed to load key sd-iv
Warning: failed to load key md5-blanker
Warning: failed to load key root-key
Warning: failed to load key korean-key
updating content records of TMD file retail/tmd
Warning: failed to load key common-key
Warning: failed to load key sd-key
Warning: failed to load key sd-iv
Warning: failed to load key md5-blanker
Warning: failed to load key root-key
Warning: failed to load key korean-key
setting version of TMD file retail/tmd to 0x0102
Warning: failed to load key common-key
Warning: failed to load key sd-key
Warning: failed to load key sd-iv
Warning: failed to load key md5-blanker
Warning: failed to load key root-key
Warning: failed to load key korean-key
Traceback (most recent call last):
  File "/Users/palxex/gst/hbc/channel/title/../../pywii/pywii-tools/wadpack.py", line 28, in <module>
    wad.adddata(data,ct.cid)
  File "/Users/palxex/gst/hbc/pywii/pywii-tools/pywii/wii.py", line 1507, in adddata
    aes = AES.new(self.tik.title_key, AES.MODE_CBC, iv)
  File "/usr/local/lib/python2.7/site-packages/Cryptodome/Cipher/AES.py", line 264, in new
    return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/Cryptodome/Cipher/__init__.py", line 130, in _create_cipher
    return modes[mode](factory, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/Cryptodome/Cipher/_mode_cbc.py", line 232, in _create_cbc_cipher
    cipher_state = factory._create_base_cipher(kwargs)
  File "/usr/local/lib/python2.7/site-packages/Cryptodome/Cipher/AES.py", line 131, in _create_base_cipher
    expect_byte_string(key)
  File "/usr/local/lib/python2.7/site-packages/Cryptodome/Util/_raw_api.py", line 175, in expect_byte_string
    raise TypeError("Only byte strings can be passed to C code")
TypeError: Only byte strings can be passed to C code
make[1]: *** [channel_retail.wad] Error 1
make: *** [all] Error 2

Could you analysis it and figure things goes wrong from which step?

from hbc.

marcan avatar marcan commented on September 24, 2024

You need to obtain the encryption keys (at least "common-key"). We don't provide those. That's your responsibility. The code is already telling you what the problem is. Keys go in ~/.wii/.

from hbc.

marcan avatar marcan commented on September 24, 2024

Either way, I've pushed some changes that should fix the MAXPATHLEN/stricmp issues. Issues with precompiled DevkitPPC libs should be reported to DevkitPPC. The pywii issue is unrelated and user error (I've pushed a change to make the exception more explicit about the problem). Please open one issue for each problem.

from hbc.

palxex avatar palxex commented on September 24, 2024

@marcan thanks very much for pointing me out.

from hbc.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.