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

Linking errors on Ubuntu 22.04 #38

Open
vanfanel opened this issue Jan 23, 2024 · 6 comments
Open

Linking errors on Ubuntu 22.04 #38

vanfanel opened this issue Jan 23, 2024 · 6 comments

Comments

@vanfanel
Copy link

vanfanel commented Jan 23, 2024

Hello there,

I'm having a hard time building 64doom, latest GIT code.

I have installed both the toolchain and latest unstable libdragon branch.
64doom compiles fine, but on the linking phase I get:

/opt/libdragon/bin/n64tool \
        --header /opt/libdragon/mips64-elf/lib/header --title DOOM --toc --output DOOM.z64 DOOM.bin --align 8 DOOM.sym --align 8 DOOM.msym --align 16 rom.dfs
ERROR: Cannot open /opt/libdragon/mips64-elf/lib/header for reading!
ERROR: Header file '/opt/libdragon/mips64-elf/lib/header' is too small (minimum is 4096 bytes)

Any idea on what am I doing wrong, please?

@Bobbar
Copy link

Bobbar commented Jan 24, 2024

I believe it's related to this change:
DragonMinded/libdragon#158

Still can't get it to build myself though.

@Bobbar
Copy link

Bobbar commented Jan 24, 2024

I was able to get a ROM working for Ares by using the trunk branch of libdragon instead of unstable. I'll test it with real hardware later.

@Bobbar
Copy link

Bobbar commented Jan 25, 2024

I confirmed that the ROMs work on real hardware.

For posterity: I started with a fresh WSL2 Ubuntu image then installed unstable libdragon. That didn't work for the reasons above. So then I switched to the trunk branch and just ran the build.sh again, and that finally worked for me.

Cheers

@vanfanel
Copy link
Author

@Bobbar Thanks for trying and for the trunk branch suggestion.
However, on GNU/Linux, using the trunk branch of libdragon, I get this upon building 64doom:

/opt/libdragon/bin/mips64-elf-objcopy DOOM.elf DOOM.bin -O binary
/opt/libdragon/bin/n64sym DOOM.elf DOOM.sym
/opt/libdragon/bin/n64dso-msym DOOM.elf DOOM.msym
make: /opt/libdragon/bin/n64dso-msym: No such file or directory
make: *** [Makefile:109: DOOM.z64] Error 127

...and that's because n64dso-msym does NOT exist on the trunk branch at all, at least on GNU/Linux.

So, what is going on? 64doom only builds on whatever is used on Window$ to build GNU/Linux stuff?

@Bobbar
Copy link

Bobbar commented Jan 25, 2024

Hmm. It very well may be because I installed unstable first, then installed trunk on top of it without clearing the /opt/libdragon directory. So I'm probably using the n64dso-msym that was compiled from unstable.

@vanfanel
Copy link
Author

@Bobbar Ah yes, that did it, I could finally generate DOOM.z64, thanks!

However, this is still an issue, having to mix two different libdragon versions doesn't look quite right...

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