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

compiliation fails with error: builtin functions must be directly called #30

Open
david0 opened this issue Mar 10, 2021 · 2 comments
Open

Comments

@david0
Copy link

david0 commented Mar 10, 2021

Hi, I tried to compile caps-lv2 on OS/X.

Unfortunately it fails with the following error:

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C plugins/mod-caps-AmpVTS.lv2
c++ -MM -O3 -ffast-math -funroll-loops -Wall -fPIC -DPIC -fdata-sections -ffunction-sections -I../.. -fvisibility=hidden -fvisibility-inlines-hidden ../../Amp.cc ../../ToneStack.cc ../../dsp/polynomials.cc interface.cc > .depend
c++ ../../Amp.cc -O3 -ffast-math -funroll-loops -Wall -fPIC -DPIC -fdata-sections -ffunction-sections -I../.. -fvisibility=hidden -fvisibility-inlines-hidden -o ../../Amp.o -c
In file included from ../../Amp.cc:30:
In file included from ../../Amp.h:39:
../../dsp/ToneStack.h:57:10: warning: private field 'fs' is not used [-Wunused-private-field]
                double fs;
                       ^
1 warning generated.
c++ ../../ToneStack.cc -O3 -ffast-math -funroll-loops -Wall -fPIC -DPIC -fdata-sections -ffunction-sections -I../.. -fvisibility=hidden -fvisibility-inlines-hidden -o ../../ToneStack.o -c
In file included from ../../ToneStack.cc:34:
In file included from ../../ToneStack.h:34:
../../dsp/ToneStack.h:57:10: warning: private field 'fs' is not used [-Wunused-private-field]
                double fs;
                       ^
1 warning generated.
c++ ../../dsp/polynomials.cc -O3 -ffast-math -funroll-loops -Wall -fPIC -DPIC -fdata-sections -ffunction-sections -I../.. -fvisibility=hidden -fvisibility-inlines-hidden -o ../../dsp/polynomials.o -c
c++ interface.cc -O3 -ffast-math -funroll-loops -Wall -fPIC -DPIC -fdata-sections -ffunction-sections -I../.. -fvisibility=hidden -fvisibility-inlines-hidden -o interface.o -c
In file included from interface.cc:5:
In file included from ../../Cabinet.h:39:
../../dsp/v4f.h:84:10: error: builtin functions must be directly called
                d[i] = fn(s[i]);
                       ^
../../dsp/v4f.h:158:12: note: in instantiation of function template specialization 'v4f_map<&__builtin_sinf>' requested here
                                y[0] = v4f_map<__builtin_sinf> (w);
                                       ^
../../dsp/v4f.h:84:10: error: builtin functions must be directly called
                d[i] = fn(s[i]);
                       ^
../../dsp/v4f.h:161:20: note: in instantiation of function template specialization 'v4f_map<&__builtin_cosf>' requested here
                                y[2] = v4f_2 * v4f_map<__builtin_cosf> (w); /* b */
                                               ^
In file included from interface.cc:17:
In file included from ../../Amp.h:39:
../../dsp/ToneStack.h:57:10: warning: private field 'fs' is not used [-Wunused-private-field]
                double fs;
                       ^
1 warning and 2 errors generated.
make[1]: *** [interface.o] Error 1
make: *** [build] Error 2

i'm using clang++:

macbook [caps-lv2]$ c++ --version                                                                                                                                                                                                  18:19:56
Apple clang version 12.0.0 (clang-1200.0.32.27)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@falkTX
Copy link
Member

falkTX commented Mar 10, 2021

@david0
Copy link
Author

david0 commented Mar 19, 2021

The patch works for me 👍 (so does sed 's/__builtin_sinf/sinf/g' +cos)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants