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

[aubio] broken build feature, it always build without the dependencies #17342

Closed
mhandb opened this issue Apr 18, 2021 · 4 comments · Fixed by #17353
Closed

[aubio] broken build feature, it always build without the dependencies #17342

mhandb opened this issue Apr 18, 2021 · 4 comments · Fixed by #17353
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@mhandb
Copy link

mhandb commented Apr 18, 2021

Host Environment

  • OS: Windows
  • Compiler: MSVC 19.28.29913

To Reproduce
Steps to reproduce the behavior:

  • ./vcpkg install aubio
  • Build an app that uses the new_aubio_source function
  • It will fails with this error message:

source: failed creating with %s at %dHz with hop size %d"
" (no source built-in)

Failure logs

[2/86] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\bin\Hostx64\x64\cl.exe -DHAVE_C99_VARARGS_MACROS=1 -DHAVE_ERRNO_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MATH_H=1 -DHAVE_STDARG_H=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -D_CRT_SECURE_NO_WARNINGS=1 -IC:\dev\repos\GSDK\gsdk\gsdk\gsdk-test\vcpkg\buildtrees\aubio\src\0.4.9-f1b891adc9.clean\src -I. -IC:\dev\repos\GSDK\gsdk\gsdk\gsdk-test\vcpkg_installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP  /MD /O2 /Oi /Gy /DNDEBUG /Z7 /showIncludes /FoCMakeFiles\aubio.dir\src\io\source.c.obj /FdCMakeFiles\aubio.dir\aubio.pdb /FS -c C:\dev\repos\GSDK\gsdk\gsdk\gsdk-test\vcpkg\buildtrees\aubio\src\0.4.9-f1b891adc9.clean\src\io\source.c

You can see in the log that it does not have the -DHAVE_LIBAV=1 flag for instance.

Additional context
This had been broken with this pull request : #16051
It added some options in the port file:

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
    FEATURES
    tools WITH_DEPENDENCIES
    tools HAVE_SNDFILE
    tools HAVE_WAVWRITE
    tools HAVE_WAVREAD
    tools HAVE_LIBAV
    tools HAVE_SWRESAMPLE
)

But most of them are not used in the CmakeLists.txt to forward the option with add_definitions()
I am not sure that all these HAV_XXX are required in the port file. WITH_DEPENDENCIES isn't enough ?
Adding this in the CMakeLists.txt fixes the issue on my side:

...
if(WITH_DEPENDENCIES)
    add_definitions(-DHAVE_SNDFILE=1)
    add_definitions(-DHAVE_WAVWRITE=1)
    add_definitions(-DHAVE_WAVREAD=1)
    add_definitions(-DHAVE_LIBAV=1)
    add_definitions(-DHAVE_SWRESAMPLE=1)
...
@autoantwort
Copy link
Contributor

autoantwort commented Apr 18, 2021

Hm that was that what I was using, but the maintainers said I shouldn't (see here) 😕

@mhandb
Copy link
Author

mhandb commented Apr 18, 2021

Indeed, but the definitions are not forwarded to the compiler, I can see them in the configuration log only.

@PhoebeHui PhoebeHui added the category:port-bug The issue is with a library, which is something the port should already support label Apr 19, 2021
@PhoebeHui
Copy link
Contributor

@mhandb, thanks for reporting this issue! I have submitted a PR to fix this issue.

@mhandb
Copy link
Author

mhandb commented May 18, 2021

@PhoebeHui Any update on this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants