Skip to content

The quick-start example doesn't compile on Debian10 64 bit (run is WLS Windows-10 from VisualStudioCode) #18

Open
@IvankoB

Description

@IvankoB

on any g++ v8.3 compiler (g++, c89-gcc, c99-gcc) choosen and any C++ standard (CMAKE_CXX_STANDARD 98 / 11 / 14).

Eigen3 v 3.3.7-1 is installed from within Debian :
apt install libeigen3-dev

The project is really needed for very old (Debian6 which can't be upgraded on the targets) LINUX (where builds well with gcc-4.4.5 but many "Parameter .. not used" warnings issued).
DEBIAN10 WLS in Windows10 is only tried for develepment convinience reasons as long as the Eigen vesion is 3.3.7-1 in both DEBIAN6 and DEBIAN10.

The build log :

[main] Building folder: uzsearch uzsearch
[build] Starting build
[proc] Executing command: /usr/bin/cmake --build /home/pochta/myprojects/uzsearch/build --config Debug --target uzsearch -- -j 6
[build] [ 50%] Building CXX object CMakeFiles/uzsearch.dir/main.cpp.o
[build] In file included from /home/pochta/myprojects/GITROOT/MiniDNN/include/Callback/VerboseCallback.h:8,
[build] from /home/pochta/myprojects/GITROOT/MiniDNN/include/MiniDNN.h:34,
[build] from /home/pochta/myprojects/uzsearch/main.cpp:1:
[build] /home/pochta/myprojects/GITROOT/MiniDNN/include/Callback/../Network.h: In instantiation of ‘bool MiniDNN::Network::fit(MiniDNN::Optimizer&, const Eigen::MatrixBase&, const Eigen::MatrixBase&, int, int, int) [with DerivedX = Eigen::Matrix<double, -1, 2>; DerivedY = Eigen::Matrix<double, -1, 2>]’:
[build] /home/pochta/myprojects/uzsearch/main.cpp:48:36: required from here
[build] /home/pochta/myprojects/GITROOT/MiniDNN/include/Callback/../Network.h:477:21: error: call of overloaded ‘pre_training_batch(MiniDNN::Network*, Eigen::Matrix<double, -1, 2>&, Eigen::Matrix<double, -1, 2>&)’ is ambiguous
[build] m_callback->pre_training_batch(this, x_batches[i], y_batches[i]);
[build] ^~~~~~~~~~
[build] In file included from /home/pochta/myprojects/GITROOT/MiniDNN/include/MiniDNN.h:33,
[build] from /home/pochta/myprojects/uzsearch/main.cpp:1:
[build] /home/pochta/myprojects/GITROOT/MiniDNN/include/Callback.h:49:22: note: candidate: ‘virtual void MiniDNN::Callback::pre_training_batch(const MiniDNN::Network*, const Matrix&, const Matrix&)’
[build] virtual void pre_training_batch(const Network* net, const Matrix& x,
[build] ^~~~~~~~~~~~~~~~~~
[build] /home/pochta/myprojects/GITROOT/MiniDNN/include/Callback.h:51:22: note: candidate: ‘virtual void MiniDNN::Callback::pre_training_batch(const MiniDNN::Network*, const Matrix&, const IntegerVector&)’
[build] virtual void pre_training_batch(const Network* net, const Matrix& x,
[build] ^~~~~~~~~~~~~~~~~~
[build] In file included from /home/pochta/myprojects/GITROOT/MiniDNN/include/Callback/VerboseCallback.h:8,
[build] from /home/pochta/myprojects/GITROOT/MiniDNN/include/MiniDNN.h:34,
[build] from /home/pochta/myprojects/uzsearch/main.cpp:1:
[build] /home/pochta/myprojects/GITROOT/MiniDNN/include/Callback/../Network.h:481:21: error: call of overloaded ‘post_training_batch(MiniDNN::Network*, Eigen::Matrix<double, -1, 2>&, Eigen::Matrix<double, -1, 2>&)’ is ambiguous
[build] m_callback->post_training_batch(this, x_batches[i], y_batches[i]);
[build] ^~~~~~~~~~
[build] In file included from /home/pochta/myprojects/GITROOT/MiniDNN/include/MiniDNN.h:33,
[build] from /home/pochta/myprojects/uzsearch/main.cpp:1:
[build] /home/pochta/myprojects/GITROOT/MiniDNN/include/Callback.h:55:22: note: candidate: ‘virtual void MiniDNN::Callback::post_training_batch(const MiniDNN::Network*, const Matrix&, const Matrix&)’
[build] virtual void post_training_batch(const Network* net, const Matrix& x,
[build] ^~~~~~~~~~~~~~~~~~~
[build] /home/pochta/myprojects/GITROOT/MiniDNN/include/Callback.h:57:22: note: candidate: ‘virtual void MiniDNN::Callback::post_training_batch(const MiniDNN::Network*, const Matrix&, const IntegerVector&)’
[build] virtual void post_training_batch(const Network* net, const Matrix& x,
[build] ^~~~~~~~~~~~~~~~~~~
[build] make[3]: *** [CMakeFiles/uzsearch.dir/build.make:63: CMakeFiles/uzsearch.dir/main.cpp.o] Error 1
[build] make[2]: *** [CMakeFiles/Makefile2:585: CMakeFiles/uzsearch.dir/all] Error 2
[build] make[1]: *** [CMakeFiles/Makefile2:597: CMakeFiles/uzsearch.dir/rule] Error 2
[build] make: *** [Makefile:359: uzsearch] Error 2
[build] Build finished with exit code 2

It also fails in runtime with the only instantiation (all the latter code is commented): Matrix x = Matrix::Random(400, 100);
with the run log :

pochta@Vano-Home:~/myprojects/uzsearch$ /home/pochta/myprojects/uzsearch/build/uzsearch
uzsearch: /usr/include/eigen3/Eigen/src/Core/util/XprHelper.h:110: Eigen::internal::variable_if_dynamic<T, Value>::variable_if_dynamic(T) [with T = long int; int Value = 2]: Assertion `v == T(Value)' failed.
Aborted (core dumped)

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