Skip to content

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

@david0

Description

@david0

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

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