MoePus / VapourSynth-LC

A light cutter filter for VapourSynth
GNU General Public License v3.0
1 stars 0 forks source link

fail build in linux #1

Open sl1pkn07 opened 4 years ago

sl1pkn07 commented 4 years ago
g++ -c -fPIC -march=native -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -I./LC -I/usr/include/vapoursynth  -o VSPlugin.o LC/VSPlugin.cpp
In file included from LC/VSPlugin.cpp:2:
LC/LC.H:56:2: error: extra qualification 'LC_Process<pointType>::' on member 'LC_Process' [-fpermissive]
   56 |  LC_Process::LC_Process(const LC_BASIC_DATA &_d, int n, VSFrameContext *_frameCtx, VSCore *_core, const VSAPI *_vsapi)
      |  ^~~~~~~~~~
LC/LC.H:56:118: error: explicit specialization of 'LC_Process<pointType>::LC_Process(const LC_BASIC_DATA&, int, VSFrameContext*, VSCore*, const VSAPI*)' must be introduced by 'template <>'
   56 |  LC_Process::LC_Process(const LC_BASIC_DATA &_d, int n, VSFrameContext *_frameCtx, VSCore *_core, const VSAPI *_vsapi)
      |                                                                                                                      ^
LC/LC.H:80:2: error: extra qualification 'LC_Process<pointType>::' on member 'LC_Process' [-fpermissive]
   80 |  LC_Process::~LC_Process()
      |  ^~~~~~~~~~
LC/LC.H:80:26: error: explicit specialization of 'LC_Process<pointType>::~LC_Process()' must be introduced by 'template <>'
   80 |  LC_Process::~LC_Process()
      |                          ^
LC/LC.H: In member function 'void LC_Process<pointType>::process()':
LC/LC.H:114:35: error: 'sinf' is not a member of 'std'; did you mean 'isinf'?
  114 |      float processV = minV * std::sinf(((threshold[i] - minV) / static_cast<float>(threshold[i]) * 90) / 180.0f * 3.14159f) * processRate;
      |                                   ^~~~
      |                                   isinf
In file included from LC/VSPlugin.cpp:2:
LC/LC.H:133:35: error: 'sinf' is not a member of 'std'; did you mean 'isinf'?
  133 |      float processV = minV * std::sinf(((threshold[i] - minVabs) / static_cast<float>(threshold[i]) * 90) / 180.0f * 3.14159f) * processRate;
      |                                   ^~~~
      |                                   isinf
LC/VSPlugin.cpp: In function 'const VSFrameRef* filterGetFrame(int, int, void**, void**, VSFrameContext*, VSCore*, const VSAPI*)':
LC/VSPlugin.cpp:15:56: error: no matching function for call to 'LC_Process<unsigned char>::LC_Process(LC_BASIC_DATA&, int&, VSFrameContext*&, VSCore*&, const VSAPI*&)'
   15 |    LC_Process<BYTE> worker(*d, n, frameCtx, core, vsapi);
      |                                                        ^
In file included from LC/VSPlugin.cpp:2:
LC/LC.H:11:7: note: candidate: 'constexpr LC_Process<unsigned char>::LC_Process(const LC_Process<unsigned char>&)'
   11 | class LC_Process
      |       ^~~~~~~~~~
LC/LC.H:11:7: note:   candidate expects 1 argument, 5 provided
LC/LC.H:11:7: note: candidate: 'constexpr LC_Process<unsigned char>::LC_Process(LC_Process<unsigned char>&&)'
LC/LC.H:11:7: note:   candidate expects 1 argument, 5 provided
LC/VSPlugin.cpp:21:56: error: no matching function for call to 'LC_Process<short unsigned int>::LC_Process(LC_BASIC_DATA&, int&, VSFrameContext*&, VSCore*&, const VSAPI*&)'
   21 |    LC_Process<WORD> worker(*d, n, frameCtx, core, vsapi);
      |                                                        ^
In file included from LC/VSPlugin.cpp:2:
LC/LC.H:11:7: note: candidate: 'constexpr LC_Process<short unsigned int>::LC_Process(const LC_Process<short unsigned int>&)'
   11 | class LC_Process
      |       ^~~~~~~~~~
LC/LC.H:11:7: note:   candidate expects 1 argument, 5 provided
LC/LC.H:11:7: note: candidate: 'constexpr LC_Process<short unsigned int>::LC_Process(LC_Process<short unsigned int>&&)'
LC/LC.H:11:7: note:   candidate expects 1 argument, 5 provided
make: *** [Makefile:2: all] Error 1
g++ -c -fpermissive -fPIC -march=native -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -I./LC -I/usr/include/vapoursynth  -o VSPlugin.o LC/VSPlugin.cpp
In file included from LC/VSPlugin.cpp:2:
LC/LC.H:56:2: warning: extra qualification 'LC_Process<pointType>::' on member 'LC_Process' [-fpermissive]
   56 |  LC_Process::LC_Process(const LC_BASIC_DATA &_d, int n, VSFrameContext *_frameCtx, VSCore *_core, const VSAPI *_vsapi)
      |  ^~~~~~~~~~
LC/LC.H:56:118: error: explicit specialization of 'LC_Process<pointType>::LC_Process(const LC_BASIC_DATA&, int, VSFrameContext*, VSCore*, const VSAPI*)' must be introduced by 'template <>'
   56 |  LC_Process::LC_Process(const LC_BASIC_DATA &_d, int n, VSFrameContext *_frameCtx, VSCore *_core, const VSAPI *_vsapi)
      |                                                                                                                      ^
LC/LC.H:80:2: warning: extra qualification 'LC_Process<pointType>::' on member 'LC_Process' [-fpermissive]
   80 |  LC_Process::~LC_Process()
      |  ^~~~~~~~~~
LC/LC.H:80:26: error: explicit specialization of 'LC_Process<pointType>::~LC_Process()' must be introduced by 'template <>'
   80 |  LC_Process::~LC_Process()
      |                          ^
LC/LC.H: In member function 'void LC_Process<pointType>::process()':
LC/LC.H:114:35: error: 'sinf' is not a member of 'std'; did you mean 'isinf'?
  114 |      float processV = minV * std::sinf(((threshold[i] - minV) / static_cast<float>(threshold[i]) * 90) / 180.0f * 3.14159f) * processRate;
      |                                   ^~~~
      |                                   isinf
In file included from LC/VSPlugin.cpp:2:
LC/LC.H:133:35: error: 'sinf' is not a member of 'std'; did you mean 'isinf'?
  133 |      float processV = minV * std::sinf(((threshold[i] - minVabs) / static_cast<float>(threshold[i]) * 90) / 180.0f * 3.14159f) * processRate;
      |                                   ^~~~
      |                                   isinf
LC/VSPlugin.cpp: In function 'const VSFrameRef* filterGetFrame(int, int, void**, void**, VSFrameContext*, VSCore*, const VSAPI*)':
LC/VSPlugin.cpp:15:56: error: no matching function for call to 'LC_Process<unsigned char>::LC_Process(LC_BASIC_DATA&, int&, VSFrameContext*&, VSCore*&, const VSAPI*&)'
   15 |    LC_Process<BYTE> worker(*d, n, frameCtx, core, vsapi);
      |                                                        ^
In file included from LC/VSPlugin.cpp:2:
LC/LC.H:11:7: note: candidate: 'constexpr LC_Process<unsigned char>::LC_Process(const LC_Process<unsigned char>&)'
   11 | class LC_Process
      |       ^~~~~~~~~~
LC/LC.H:11:7: note:   candidate expects 1 argument, 5 provided
LC/LC.H:11:7: note: candidate: 'constexpr LC_Process<unsigned char>::LC_Process(LC_Process<unsigned char>&&)'
LC/LC.H:11:7: note:   candidate expects 1 argument, 5 provided
LC/VSPlugin.cpp:21:56: error: no matching function for call to 'LC_Process<short unsigned int>::LC_Process(LC_BASIC_DATA&, int&, VSFrameContext*&, VSCore*&, const VSAPI*&)'
   21 |    LC_Process<WORD> worker(*d, n, frameCtx, core, vsapi);
      |                                                        ^
In file included from LC/VSPlugin.cpp:2:
LC/LC.H:11:7: note: candidate: 'constexpr LC_Process<short unsigned int>::LC_Process(const LC_Process<short unsigned int>&)'
   11 | class LC_Process
      |       ^~~~~~~~~~
LC/LC.H:11:7: note:   candidate expects 1 argument, 5 provided
LC/LC.H:11:7: note: candidate: 'constexpr LC_Process<short unsigned int>::LC_Process(LC_Process<short unsigned int>&&)'
LC/LC.H:11:7: note:   candidate expects 1 argument, 5 provided
make: *** [Makefile:2: all] Error 1

gcc 9.3.0 VS 49

MoePus commented 4 years ago

Sorry i dont use a linux environment.(So no makefile) but i tried to fix it by your compile log.😂

sl1pkn07 commented 4 years ago

my "makefile" xd

  echo "all:
      g++ -c -fpermissive -fPIC ${CXXFLAGS} ${CPPFLAGS} -I./LC $(pkg-config --cflags vapoursynth) -o VSPlugin.o LC/VSPlugin.cpp
      g++ -shared -fPIC ${LDFLAGS} -o lib${_plug}.so VSPlugin.o" > Makefile
sl1pkn07 commented 3 years ago

seems not build with gcc due a not found std::sinf, add `#include ' in LC.h not avail. so i tried with clang++

works ok if add

diff --git a/LC/LC.H b/LC/LC.H
index fb90fdd..7ef44b2 100644
--- a/LC/LC.H
+++ b/LC/LC.H
@@ -1,5 +1,6 @@
 #pragma once
 #include "Helper.h"
+#include <cmath>
 #include <iostream>
 #include <vector>  
 #include <algorithm> 

and add -stdlib=libc++ in the "makefile" rule

greetings

sl1pkn07 commented 2 years ago

Hello, since vapoursynth R60, i get this then load the plugin

/usr/lib/vapoursynth/liblc.so: undefined symbol: _ZNSt20bad_array_new_lengthC1Ev

how fix this?

EDIT:

found it. i ilso need add -stdlib=libc++ tho the linker step

greetings