Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mode4flip.gba fails to build #17

Closed
jakehemmerle opened this issue Apr 22, 2023 · 2 comments
Closed

mode4flip.gba fails to build #17

jakehemmerle opened this issue Apr 22, 2023 · 2 comments

Comments

@jakehemmerle
Copy link

jakehemmerle commented Apr 22, 2023

I'm a bit new to zig so apologies for what might appear as a poor bug report.

I've installed the latest master from the website and I'm getting a compiler error when trying to build ZigGBA. I did a clean install, cache, and followed the instructions.

I see another bug report from 2021 looks like a very similar issue. I will post here if I find a solution. Something appears to be building for the wrong architecture and then attempting to link to it.

Also, the README references a version of Zig master that doesn't seem to exist yet ("0.11.0-dev.6533+d3c9bfada"). Can you explain where this can be found?

~/codebases/zig/ZigGBA master ❯ ls
GBA       LICENSE   README.md build.zig docs      examples
~/codebases/zig/ZigGBA master ❯ zig env
{
 "zig_exe": "/Users/jake/.zig/zig",
 "lib_dir": "/Users/jake/.zig/lib",
 "std_dir": "/Users/jake/.zig/lib/std",
 "global_cache_dir": "/Users/jake/.cache/zig",
 "version": "0.11.0-dev.2696+867441845",
 "target": "aarch64-macos.13.3.1...13.3.1-none"
}
~/codebases/zig/ZigGBA master ❯ zig build
zig build-exe mode4flip ReleaseFast thumb-freestanding: error: the following command failed with 1 compilation errors:
/Users/jake/.zig/zig build-exe /Users/jake/codebases/zig/ZigGBA/examples/mode4flip/mode4flip.zig /Users/jake/codebases/zig/ZigGBA/zig-cache/o/18c05f3621746cbf7017f8bb7372aa30/libZigGBA.a -OReleaseFast --cache-dir /Users/jake/codebases/zig/ZigGBA/zig-cache --global-cache-dir /Users/jake/.cache/zig --name mode4flip -target thumb-freestanding -mcpu arm7tdmi+thumb_mode --script /Users/jake/codebases/zig/ZigGBA/GBA/gba.ld --mod gba::/Users/jake/codebases/zig/ZigGBA/GBA/gba.zig --deps gba --listen=-
zig build-exe objDemo ReleaseFast thumb-freestanding: error: warning(link): unexpected LLD stderr:
ld.lld: warning: Linking two modules of different target triples: '/Users/jake/codebases/zig/ZigGBA/zig-cache/o/51b9986514e9985a278ea6d0648fd095/objDemo.o' is 'thumb-unknown-unknown-eabi' whereas 'ld-temp.o' is 'thumbv4t-unknown-unknown-eabi'



zig build-exe tileDemo ReleaseFast thumb-freestanding: error: warning(link): unexpected LLD stderr:
ld.lld: warning: Linking two modules of different target triples: '/Users/jake/codebases/zig/ZigGBA/zig-cache/o/ac3d1648f56ae69b2fb933a6582ab0e7/tileDemo.o' is 'thumb-unknown-unknown-eabi' whereas 'ld-temp.o' is 'thumbv4t-unknown-unknown-eabi'



zig build-exe objAffine ReleaseFast thumb-freestanding: error: warning(link): unexpected LLD stderr:
ld.lld: warning: Linking two modules of different target triples: '/Users/jake/codebases/zig/ZigGBA/zig-cache/o/0747ae98159be1e3e317b363882f7179/objAffine.o' is 'thumb-unknown-unknown-eabi' whereas 'ld-temp.o' is 'thumbv4t-unknown-unknown-eabi'



zig build-exe keydemo ReleaseFast thumb-freestanding: error: warning(link): unexpected LLD stderr:
ld.lld: warning: Linking two modules of different target triples: '/Users/jake/codebases/zig/ZigGBA/zig-cache/o/0eedb761dfeccaa44a8dd324411402d7/keydemo.o' is 'thumb-unknown-unknown-eabi' whereas 'ld-temp.o' is 'thumbv4t-unknown-unknown-eabi'



zig build-exe charBlock ReleaseFast thumb-freestanding: error: warning(link): unexpected LLD stderr:
ld.lld: warning: Linking two modules of different target triples: '/Users/jake/codebases/zig/ZigGBA/zig-cache/o/0c09c9ddf64b2af00f0f93d3bfd7ed6b/charBlock.o' is 'thumb-unknown-unknown-eabi' whereas 'ld-temp.o' is 'thumbv4t-unknown-unknown-eabi'



Build Summary: 38/42 steps succeeded; 1 failed (disable with -fno-summary)
install transitive failure
├─ install generated to first.gba success
│  ├─ objcopy generated success 9ms MaxRSS:26M
│  │  └─ zig build-exe first ReleaseFast thumb-freestanding success 122ms MaxRSS:82M
│  │     └─ zig build-lib ZigGBA ReleaseFast thumb-freestanding cached 36ms MaxRSS:29M
│  └─ objcopy generated (+1 more reused dependencies)
├─ zig build-exe first ReleaseFast thumb-freestanding (+1 more reused dependencies)
├─ install generated to mode3draw.gba success
│  ├─ objcopy generated success 7ms MaxRSS:26M
│  │  └─ zig build-exe mode3draw ReleaseFast thumb-freestanding success 180ms MaxRSS:99M
│  │     └─ zig build-lib ZigGBA ReleaseFast thumb-freestanding cached 37ms MaxRSS:29M
│  └─ objcopy generated (+1 more reused dependencies)
├─ zig build-exe mode3draw ReleaseFast thumb-freestanding (+1 more reused dependencies)
├─ install generated to debugPrint.gba success
│  ├─ objcopy generated success 9ms MaxRSS:26M
│  │  └─ zig build-exe debugPrint ReleaseFast thumb-freestanding success 160ms MaxRSS:86M
│  │     └─ zig build-lib ZigGBA ReleaseFast thumb-freestanding cached 37ms MaxRSS:29M
│  └─ objcopy generated (+1 more reused dependencies)
├─ zig build-exe debugPrint ReleaseFast thumb-freestanding (+1 more reused dependencies)
├─ install generated to mode4flip.gba transitive failure
│  ├─ objcopy generated transitive failure
│  │  └─ zig build-exe mode4flip ReleaseFast thumb-freestanding 1 errors
│  │     ├─ zig build-lib ZigGBA ReleaseFast thumb-freestanding cached 35ms MaxRSS:29M
│  │     └─ ConvertMode4Image examples/mode4flip/mode4flip.agp cached
│  └─ objcopy generated (+1 more reused dependencies)
├─ zig build-exe mode4flip ReleaseFast thumb-freestanding (+2 more reused dependencies)
├─ install generated to keydemo.gba success
│  ├─ objcopy generated success 10ms MaxRSS:26M
│  │  └─ zig build-exe keydemo ReleaseFast thumb-freestanding success 159ms MaxRSS:76M
│  │     └─ zig build-lib ZigGBA ReleaseFast thumb-freestanding cached 34ms MaxRSS:29M
│  └─ objcopy generated (+1 more reused dependencies)
├─ zig build-exe keydemo ReleaseFast thumb-freestanding (+1 more reused dependencies)
├─ install generated to objDemo.gba success
│  ├─ objcopy generated success 9ms MaxRSS:26M
│  │  └─ zig build-exe objDemo ReleaseFast thumb-freestanding success 123ms MaxRSS:77M
│  │     └─ zig build-lib ZigGBA ReleaseFast thumb-freestanding cached 38ms MaxRSS:29M
│  └─ objcopy generated (+1 more reused dependencies)
├─ zig build-exe objDemo ReleaseFast thumb-freestanding (+1 more reused dependencies)
├─ install generated to tileDemo.gba success
│  ├─ objcopy generated success 10ms MaxRSS:26M
│  │  └─ zig build-exe tileDemo ReleaseFast thumb-freestanding success 159ms MaxRSS:76M
│  │     └─ zig build-lib ZigGBA ReleaseFast thumb-freestanding cached 36ms MaxRSS:29M
│  └─ objcopy generated (+1 more reused dependencies)
├─ zig build-exe tileDemo ReleaseFast thumb-freestanding (+1 more reused dependencies)
├─ install generated to screenBlock.gba success
│  ├─ objcopy generated success 10ms MaxRSS:26M
│  │  └─ zig build-exe screenBlock ReleaseFast thumb-freestanding success 160ms MaxRSS:83M
│  │     └─ zig build-lib ZigGBA ReleaseFast thumb-freestanding cached 35ms MaxRSS:29M
│  └─ objcopy generated (+1 more reused dependencies)
├─ zig build-exe screenBlock ReleaseFast thumb-freestanding (+1 more reused dependencies)
├─ install generated to charBlock.gba success
│  ├─ objcopy generated success 10ms MaxRSS:26M
│  │  └─ zig build-exe charBlock ReleaseFast thumb-freestanding success 160ms MaxRSS:76M
│  │     └─ zig build-lib ZigGBA ReleaseFast thumb-freestanding success 38ms MaxRSS:75M
│  └─ objcopy generated (+1 more reused dependencies)
├─ zig build-exe charBlock ReleaseFast thumb-freestanding (+1 more reused dependencies)
├─ install generated to objAffine.gba success
│  ├─ objcopy generated success 10ms MaxRSS:26M
│  │  └─ zig build-exe objAffine ReleaseFast thumb-freestanding success 159ms MaxRSS:77M
│  │     └─ zig build-lib ZigGBA ReleaseFast thumb-freestanding cached 36ms MaxRSS:28M
│  └─ objcopy generated (+1 more reused dependencies)
└─ zig build-exe objAffine ReleaseFast thumb-freestanding (+1 more reused dependencies)
examples/mode4flip/mode4flip.zig:7:35: error: unable to open 'front.agi': FileNotFound
const frontImageData = @embedFile("front.agi");
                                  ^~~~~~~~~~~
referenced by:
    loadImageData: examples/mode4flip/mode4flip.zig:12:85
    main: examples/mode4flip/mode4flip.zig:23:5
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

~/codebases/zig/ZigGBA master ❯
@wendigojaeger
Copy link
Owner

Partially fixed with bfb70ba

@wendigojaeger
Copy link
Owner

Closing because the rest is a duplicate of #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants