Skip to content

Error: template placeholder type #14

@Pieter-JanD

Description

@Pieter-JanD

I cloned https://github.com/JosephArnold/vhpdbscan/tree/HPDBSCAN-OPTIMIZATION.

In hpdbscan.i it indicates a problem:

variable "class" is not a type nameC/C++(757)
<error-type> class

Then I ran mkdir build && cd build && cmake .. && make.

This gives the following result.

-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 12.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
BUILDING WITHOUT MPI SUPPORT
-- Found OpenMP_C: -fopenmp (found suitable version "4.5", minimum required is "4.0") 
-- Found OpenMP_CXX: -fopenmp (found suitable version "4.5", minimum required is "4.0") 
-- Found OpenMP: TRUE (found suitable version "4.5", minimum required is "4.0")  
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libcrypto.so;/usr/lib/x86_64-linux-gnu/libcurl.so;/usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/x86_64-linux-gnu/libm.so (found suitable version "1.10.7", minimum required is "1.8.10")  
-- Found SWIG: /home/pieterjan.delvaux/miniconda3/envs/testenv/bin/swig4.0 (found version "4.3.0")  
-- Found PythonInterp: /home/pieterjan.delvaux/miniconda3/envs/testenv/bin/python (found version "3.11.8") 
-- Found PythonLibs: /home/pieterjan.delvaux/miniconda3/envs/testenv/lib/libpython3.11.so (found version "3.11.8") 
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (NUMPY) does
  not match the name of the calling package (NumPy).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindNumPy.cmake:28 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:154 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found NUMPY: /home/pieterjan.delvaux/miniconda3/envs/testenv/lib/python3.11/site-packages/numpy/core/include  
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/UseSWIG.cmake:617 (message):
  Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
  flag.  Run "cmake --help-policy CMP0086" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/UseSWIG.cmake:888 (SWIG_ADD_SOURCE_TO_MODULE)
  CMakeLists.txt:163 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build
[ 11%] Building CXX object CMakeFiles/hpdbscan.dir/src/hpdbscan.cpp.o
[ 22%] Linking CXX shared library libhpdbscan.so
[ 22%] Built target hpdbscan
[ 33%] Building CXX object CMakeFiles/hpdbscan-bin.dir/src/cli.cpp.o
[ 44%] Linking CXX executable hpdbscan
[ 44%] Built target hpdbscan-bin
[ 55%] Building CXX object CMakeFiles/hpdbscan64-bin.dir/src/cli.cpp.o
[ 66%] Linking CXX executable hpdbscan64
[ 66%] Built target hpdbscan64-bin
Scanning dependencies of target hpdbscan-binding_swig_compilation
[ 77%] Swig compile swig/hpdbscan.i for python
[ 77%] Built target hpdbscan-binding_swig_compilation
[ 88%] Building CXX object CMakeFiles/hpdbscan-binding.dir/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx.o
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_HPDBSCAN(PyObject*, PyObject*)’:
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8482:3: error: template placeholder type ‘HPDBSCAN<...auto...>’ must be followed by a simple declarator-id
 8482 |   HPDBSCAN *result = 0 ;
      |   ^~~~~~~~
In file included from /home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:3379:
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8496:3: error: ‘result’ was not declared in this scope; did you mean ‘resultobj’?
 8496 |   result = (HPDBSCAN *)new HPDBSCAN(arg1,SWIG_STD_MOVE(arg2));
      |   ^~~~~~
      |   resultobj
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8496:22: error: missing template arguments before ‘*’ token
 8496 |   result = (HPDBSCAN *)new HPDBSCAN(arg1,SWIG_STD_MOVE(arg2));
      |                      ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8496:23: error: expected primary-expression before ‘)’ token
 8496 |   result = (HPDBSCAN *)new HPDBSCAN(arg1,SWIG_STD_MOVE(arg2));
      |                       ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx: In function ‘PyObject* _wrap_HPDBSCAN_cluster64__SWIG_0(PyObject*, Py_ssize_t, PyObject**)’:
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8506:3: error: template placeholder type ‘HPDBSCAN<...auto...>’ must be followed by a simple declarator-id
 8506 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |   ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8506:30: error: missing template arguments before ‘*’ token
 8506 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                              ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8506:31: error: expected primary-expression before ‘)’ token
 8506 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                               ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8521:3: error: ‘arg1’ was not declared in this scope; did you mean ‘argp1’?
 8521 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |   ^~~~
      |   argp1
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8521:28: error: missing template arguments after ‘HPDBSCAN<...auto...>’
 8521 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |                            ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8544:65: error: expected primary-expression before ‘>’ token
 8544 |   result = (arg1)->SWIGTEMPLATEDISAMBIGUATOR cluster< ptrdiff_t >((std::string const &)*arg2,(std::string const &)*arg3);
      |                                                                 ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx: In function ‘PyObject* _wrap_HPDBSCAN_cluster64__SWIG_1(PyObject*, Py_ssize_t, PyObject**)’:
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8558:3: error: template placeholder type ‘HPDBSCAN<...auto...>’ must be followed by a simple declarator-id
 8558 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |   ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8558:30: error: missing template arguments before ‘*’ token
 8558 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                              ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8558:31: error: expected primary-expression before ‘)’ token
 8558 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                               ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8576:3: error: ‘arg1’ was not declared in this scope; did you mean ‘argp1’?
 8576 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |   ^~~~
      |   argp1
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8576:28: error: missing template arguments after ‘HPDBSCAN<...auto...>’
 8576 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |                            ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8604:65: error: expected primary-expression before ‘>’ token
 8604 |   result = (arg1)->SWIGTEMPLATEDISAMBIGUATOR cluster< ptrdiff_t >((std::string const &)*arg2,(std::string const &)*arg3,arg4);
      |                                                                 ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx: In function ‘PyObject* _wrap_HPDBSCAN_cluster64FP64(PyObject*, PyObject*)’:
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8676:3: error: template placeholder type ‘HPDBSCAN<...auto...>’ must be followed by a simple declarator-id
 8676 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |   ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8676:30: error: missing template arguments before ‘*’ token
 8676 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                              ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8676:31: error: expected primary-expression before ‘)’ token
 8676 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                               ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8693:3: error: ‘arg1’ was not declared in this scope; did you mean ‘argp1’?
 8693 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |   ^~~~
      |   argp1
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8693:28: error: missing template arguments after ‘HPDBSCAN<...auto...>’
 8693 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |                            ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8706:55: error: expected primary-expression before ‘double’
 8706 |   result = (arg1)->SWIGTEMPLATEDISAMBIGUATOR cluster< double,ptrdiff_t >(arg2,arg3,arg4);
      |                                                       ^~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx: In function ‘PyObject* _wrap_HPDBSCAN_cluster64FP32(PyObject*, PyObject*)’:
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8728:3: error: template placeholder type ‘HPDBSCAN<...auto...>’ must be followed by a simple declarator-id
 8728 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |   ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8728:30: error: missing template arguments before ‘*’ token
 8728 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                              ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8728:31: error: expected primary-expression before ‘)’ token
 8728 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                               ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8749:3: error: ‘arg1’ was not declared in this scope; did you mean ‘argp1’?
 8749 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |   ^~~~
      |   argp1
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8749:28: error: missing template arguments after ‘HPDBSCAN<...auto...>’
 8749 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |                            ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8765:55: error: expected primary-expression before ‘float’
 8765 |   result = (arg1)->SWIGTEMPLATEDISAMBIGUATOR cluster< float,ptrdiff_t >(arg2,arg3,arg4);
      |                                                       ^~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx: In function ‘PyObject* _wrap_delete_HPDBSCAN(PyObject*, PyObject*)’:
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8775:3: error: template placeholder type ‘HPDBSCAN<...auto...>’ must be followed by a simple declarator-id
 8775 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |   ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8775:30: error: missing template arguments before ‘*’ token
 8775 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                              ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8775:31: error: expected primary-expression before ‘)’ token
 8775 |   HPDBSCAN *arg1 = (HPDBSCAN *) 0 ;
      |                               ^
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8787:3: error: ‘arg1’ was not declared in this scope; did you mean ‘argp1’?
 8787 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |   ^~~~
      |   argp1
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8787:28: error: missing template arguments after ‘HPDBSCAN<...auto...>’
 8787 |   arg1 = reinterpret_cast< HPDBSCAN * >(argp1);
      |                            ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/include/hpdbscan.h:46:7: note: ‘template<class index_type> class HPDBSCAN’ declared here
   46 | class HPDBSCAN {
      |       ^~~~~~~~
/home/pieterjan.delvaux/patchwork-plusplus/vhpdbscan/build/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx:8788:10: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
 8788 |   delete arg1;
      |          ^~~~
make[2]: *** [CMakeFiles/hpdbscan-binding.dir/build.make:76: CMakeFiles/hpdbscan-binding.dir/CMakeFiles/hpdbscan-binding.dir/hpdbscanPYTHON_wrap.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:169: CMakeFiles/hpdbscan-binding.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions