Coder Social home page Coder Social logo

libfmvoice's People

Contributors

vampirefrog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

libfmvoice's Issues

error: call to undeclared library function 'memset'

On macOS, LLVM 16:

cc -Wall -O2 -MMD -c tfi_file.c -o tfi_file.o
tfi_file.c:24:2: error: call to undeclared library function 'memset' with type 'void *(void *, int, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        memset(f, 0, sizeof(*f));
        ^
tfi_file.c:24:2: note: include the header <string.h> or explicitly provide a declaration for 'memset'
1 error generated.

FTBFS: Missing header & functions

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

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.