xiph / xiph/opus

won't build opus_encoder

Open
#479 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.3k
Forks
808
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported make command and the failure in silk/HP_variable_cutoff.c, where main_FIX.h is missing; compare the build inputs with the available SILK sources. Review celt/float_cast.h warnings as context, then confirm that the intended Opus build completes without the missing-header error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.