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

FTBFS: Missing header & functions #3

Open
OPNA2608 opened this issue Jul 8, 2024 · 4 comments
Open

FTBFS: Missing header & functions #3

OPNA2608 opened this issue Jul 8, 2024 · 4 comments
Assignees

Comments

@OPNA2608
Copy link

OPNA2608 commented Jul 8, 2024

This include is broken:

#include "fm_voice.h"

cc -Wall -O2 -DHAVE_STDIO -DENABLE_LOADERS -MMD -c fmbankdump.c -o fmbankdump.o
[...]
fmbankdump.c:4:10: fatal error: fm_voice.h: No such file or directory
  4 | #include "fm_voice.h"
    |          ^~~~~~~~~~~~

The header got moved to fm_voice_bank.h, and the fm_voice_bank_load function this code wants to use was dropped.

/nix/store/2p1sq1nr09xr3xb1a9lrjgdanvk1aakb-binutils-2.42/bin/ld: fmbankdump.o: in function `main':
fmbankdump.c:(.text.startup+0x67): undefined reference to `fm_voice_bank_load'

fb01dump complains about missing function:

/nix/store/2p1sq1nr09xr3xb1a9lrjgdanvk1aakb-binutils-2.42/bin/ld: fb01dump.o: in function `main':
fb01dump.c:(.text.startup+0x120): undefined reference to `fb01_bulk_voice_bank_dump'

fb01dump uses fb01_bulk_voice_bank_dump:

fb01_bulk_voice_bank_dump(&bank);

The header says this should exist, unless we're building for emscripten:

libfmvoice/syx_fb01.h

Lines 148 to 151 in e3b08e2

#ifndef __EMSCRIPTEN__
void fb01_bulk_voice_dump(struct fb01_bulk_voice *voice, int voicenum);
void fb01_bulk_voice_bank_dump(struct fb01_bulk_voice_bank *bank);
#endif /* __EMSCRIPTEN */

But it's only implented when we don't HAVE_STDIO:

#ifndef HAVE_STDIO

[…]

libfmvoice/syx_fb01.c

Lines 249 to 269 in e3b08e2

void fb01_bulk_voice_bank_dump(struct fb01_bulk_voice_bank *bank) {
printf(
"bank %d, channel %d, name=%c%c%c%c%c%c%c%c voices=%d\n",
bank->bank,
bank->channel,
safechar(bank->name[0]),
safechar(bank->name[1]),
safechar(bank->name[2]),
safechar(bank->name[3]),
safechar(bank->name[4]),
safechar(bank->name[5]),
safechar(bank->name[6]),
safechar(bank->name[7]),
bank->num_voices
);
for(int i = 0; i < bank->num_voices; i++) {
struct fb01_bulk_voice *voice = bank->voices + i;
fb01_bulk_voice_dump(voice, i);
}
}
#endif

And the Makefile says that we do HAVE_STDIO:

CFLAGS?=-Wall -O2 -DHAVE_STDIO -DENABLE_LOADERS

@vampirefrog
Copy link
Owner

sorry buddy this code is in flux and I haven't had hobby time lately. I'll fix it eventually

@vampirefrog
Copy link
Owner

you can probably use an older version that still compiles and runs well enough

@vampirefrog
Copy link
Owner

The plan is to use streamlib for I/O but that one is not finished yet.

@vampirefrog vampirefrog self-assigned this Nov 2, 2024
@vampirefrog
Copy link
Owner

okay try now @OPNA2608

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