xiph / xiph/opus

Floating Point libraries failing to build when targeting Fixed Point support only. MSVC 2017 v141

Open
#348 3 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

I'm trying to build the opus library from source. My target is Windows 10.0.17763.0 x64 using the v141 (Visual Studio 2017) toolset. My use case needs to decode a 16-bit fixed-point opus.

I was able to generate the opus library and several accompanying projects when using OPUS_ENABLE_FLOAT_API=ON. I was also able to build without problems.

Then, I started configuring for my desired build. I disabled this option (as we're not using floating point) and enabled OPUS_FIXED_POINT=ON. Visual Studio projects were generated without issue, but when trying to build, I received this error.

`

------ Build All started: Project: opus, Configuration: x64-Debug ------
[1/5] Building C object CMakeFiles\opus.dir\silk\float\x86\inner_product_FLP_avx2.c.obj
FAILED: CMakeFiles/opus.dir/silk/float/x86/inner_product_FLP_avx2.c.obj
C:\PROGRA2\MICROS2\2019\COMMUN1\VC\Tools\MSVC\14161.270\bin\HostX64\x64\cl.exe /nologo -DCUSTOM_MODES -DDISABLE_DEBUG_FLOAT -DDISABLE_FLOAT_API -DDLL_EXPORT -DENABLE_HARDENING -DFIXED_POINT=1 -DHAVE_CONFIG_H -DHAVE_LRINT -DHAVE_LRINTF -DOPUS_BUILD -DOPUS_HAVE_RTCD -DOPUS_X86_MAY_HAVE_AVX2 -DOPUS_X86_MAY_HAVE_SSE -DOPUS_X86_MAY_HAVE_SSE2 -DOPUS_X86_MAY_HAVE_SSE4_1 -DOPUS_X86_PRESUME_SSE -DOPUS_X86_PRESUME_SSE2 -DUSE_ALLOCA -D_CRT_SECURE_NO_WARNINGS -Dopus_EXPORTS -I......\include -I. -I......\ -I......\dnn -I......\celt -I......\silk -I......\silk\fixed /DWIN32 /D_WINDOWS /Zi /Ob0 /Od /RTC1 -MDd /w44244 /w44305 /w44267 /GS /arch:AVX2 /showIncludes /FoCMakeFiles\opus.dir\silk\float\x86\inner_product_FLP_avx2.c.obj /FdCMakeFiles\opus.dir\ /FS -c ......\silk\float\x86\inner_product_FLP_avx2.c
D:\dev\git\opus\opus\silk\float\x86\inner_product_FLP_avx2.c(33): fatal error C1083: Cannot open include file: 'SigProc_FLP.h': No such file or directory
ninja: build stopped: subcommand failed.

Build All failed.
`

It appears to try and compile some of the floating point code when targeting fixed point, but the headers are not included. I'm a novice with CMake, so I'm looking for some guidance. I'll dive in and try to track down the problem in the meantime.

Additional Info/Context:

I'm not currently working with the absolute latest code. My revision is at commit 20568812 * README related osce fixes III from 3 weeks ago. I will update and see if it's still an issue.

I have verified this using the built-in tools for a CMake project in Visual Studio 2019 (VS 2019) and with the command prompt also using the CMake version shipping with 2019. If needed, I will also post the output when running in command prompt as it doesn't use ninja and provides more verbose errors.
Using VS 2017 was not an options as the accompanying CMake version is too old. The project which needs to use opus is managed with VS 2017, but I intend to build with the v141 toolset and move the built library.

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

Reproduce the fixed-point-only configuration with OPUS_ENABLE_FLOAT_API=OFF and OPUS_FIXED_POINT=ON using the CMake-generated Visual Studio project. Start with silk/float/x86/inner_product_FLP_avx2.c and its missing SigProc_FLP.h include, then inspect which sources are selected for the opus target; done means the fixed-point build no longer attempts the unsupported floating-point source and completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.