Skip to content

won't build opus_encoder #479

Description

@SparePartsBin

here's what is happening-
opus$ make
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/analysis.o src/analysis.c
In file included from src/analysis.c:45:
celt/float_cast.h:129:10: warning: #warning "Don't have the functions lrint() and lrintf ()." [-Wcpp]
129 | #warning "Don't have the functions lrint() and lrintf ()."
| ^~~~~~~
celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
130 | #warning "Replacing these functions with a standard C cast."
| ^~~~~~~
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/mlp.o src/mlp.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/mlp_data.o src/mlp_data.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/opus.o src/opus.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/opus_encoder.o src/opus_encoder.c
In file included from src/opus_encoder.c:38:
celt/float_cast.h:129:10: warning: #warning "Don't have the functions lrint() and lrintf ()." [-Wcpp]
129 | #warning "Don't have the functions lrint() and lrintf ()."
| ^~~~~~~
celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
130 | #warning "Replacing these functions with a standard C cast."
| ^~~~~~~
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/opus_decoder.o src/opus_decoder.c
In file included from src/opus_decoder.c:47:
celt/float_cast.h:129:10: warning: #warning "Don't have the functions lrint() and lrintf ()." [-Wcpp]
129 | #warning "Don't have the functions lrint() and lrintf ()."
| ^~~~~~~
celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
130 | #warning "Replacing these functions with a standard C cast."
| ^~~~~~~
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/opus_multistream.o src/opus_multistream.c
In file included from src/opus_multistream.c:37:
celt/float_cast.h:129:10: warning: #warning "Don't have the functions lrint() and lrintf ()." [-Wcpp]
129 | #warning "Don't have the functions lrint() and lrintf ()."
| ^~~~~~~
celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
130 | #warning "Replacing these functions with a standard C cast."
| ^~~~~~~
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/opus_multistream_encoder.o src/opus_multistream_encoder.c
In file included from src/opus_multistream_encoder.c:37:
celt/float_cast.h:129:10: warning: #warning "Don't have the functions lrint() and lrintf ()." [-Wcpp]
129 | #warning "Don't have the functions lrint() and lrintf ()."
| ^~~~~~~
celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
130 | #warning "Replacing these functions with a standard C cast."
| ^~~~~~~
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/opus_multistream_decoder.o src/opus_multistream_decoder.c
In file included from src/opus_multistream_decoder.c:37:
celt/float_cast.h:129:10: warning: #warning "Don't have the functions lrint() and lrintf ()." [-Wcpp]
129 | #warning "Don't have the functions lrint() and lrintf ()."
| ^~~~~~~
celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
130 | #warning "Replacing these functions with a standard C cast."
| ^~~~~~~
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o src/repacketizer.o src/repacketizer.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/bands.o celt/bands.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/celt.o celt/celt.c
In file included from celt/celt.c:48:
celt/float_cast.h:129:10: warning: #warning "Don't have the functions lrint() and lrintf ()." [-Wcpp]
129 | #warning "Don't have the functions lrint() and lrintf ()."
| ^~~~~~~
celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
130 | #warning "Replacing these functions with a standard C cast."
| ^~~~~~~
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/celt_decoder.o celt/celt_decoder.c
In file included from celt/celt_decoder.c:49:
celt/float_cast.h:129:10: warning: #warning "Don't have the functions lrint() and lrintf ()." [-Wcpp]
129 | #warning "Don't have the functions lrint() and lrintf ()."
| ^~~~~~~
celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
130 | #warning "Replacing these functions with a standard C cast."
| ^~~~~~~
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/celt_encoder.o celt/celt_encoder.c
In file included from celt/celt_encoder.c:49:
celt/float_cast.h:129:10: warning: #warning "Don't have the functions lrint() and lrintf ()." [-Wcpp]
129 | #warning "Don't have the functions lrint() and lrintf ()."
| ^~~~~~~
celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
130 | #warning "Replacing these functions with a standard C cast."
| ^~~~~~~
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/celt_lpc.o celt/celt_lpc.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/cwrs.o celt/cwrs.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/entcode.o celt/entcode.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/entdec.o celt/entdec.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/entenc.o celt/entenc.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/kiss_fft.o celt/kiss_fft.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/laplace.o celt/laplace.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/mathops.o celt/mathops.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/mdct.o celt/mdct.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/modes.o celt/modes.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/opus_custom_demo.o celt/opus_custom_demo.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/pitch.o celt/pitch.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/quant_bands.o celt/quant_bands.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/rate.o celt/rate.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o celt/vq.o celt/vq.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o silk/A2NLSF.o silk/A2NLSF.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o silk/CNG.o silk/CNG.c
xtensa-esp32s3-elf-gcc -Os -g0 -ffast-math -fno-common -mlongcalls -DOPUS_BUILD -DOPUS_HAVE_FLOAT -DFIXED_POINT -DFLOAT_APPROX -DNONTHREADSAFE_PSEUDOSTACK -Iinclude -Isrc -Icelt -Isilk -c -o silk/HP_variable_cutoff.o silk/HP_variable_cutoff.c
silk/HP_variable_cutoff.c:32:10: fatal error: main_FIX.h: No such file or directory
32 | #include "main_FIX.h"
| ^~~~~~~~~~~~
compilation terminated.
make: *** [: silk/HP_variable_cutoff.o] Error 1

This from Copilot-
Why your build is failing
Your current “Opus” directory is a hybrid, likely from a vendor like:

Seeed / ReSpeaker

XMOS

Espressif demo repos

Random forks on GitHub

These hybrid trees often contain:

CELT from Opus

A partial copy of the old SILK codec

Missing SILK-only headers

Removed float files

Removed fixed files

A Makefile that assumes a complete SILK-only tree

This hybrid cannot build a valid Opus encoder.

It’s not Opus.
It’s not SILK.
It’s a broken mix of both.

That’s why you keep hitting:

missing main_FLP.h

missing main_FIX.h

missing structs_FIX.h

missing float SILK files

missing fixed SILK files

Because your tree is not Opus.

⭐ The only correct path forward
If your goal is:

✔ A working Opus encoder on ESP32‑S3
then you must use:

The real Opus source tree
and only the real Opus source tree.

And that tree does not contain the files you’re looking for —
because Opus doesn’t use them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions