{"action":"created","issue":{"url":"https://api.github.com/repos/roboptim/roboptim-core/issues/115","repository_url":"https://api.github.com/repos/roboptim/roboptim-core","labels_url":"https://api.github.com/repos/roboptim/roboptim-core/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/roboptim/roboptim-core/issues/115/comments","events_url":"https://api.github.com/repos/roboptim/roboptim-core/issues/115/events","html_url":"https://github.com/roboptim/roboptim-core/issues/115","id":178070596,"number":115,"title":"Failure when compiling from source on Ubuntu xenial","user":{"login":"arocchi","id":5487512,"avatar_url":"https://avatars.githubusercontent.com/u/5487512?v=3","gravatar_id":"","url":"https://api.github.com/users/arocchi","html_url":"https://github.com/arocchi","followers_url":"https://api.github.com/users/arocchi/followers","following_url":"https://api.github.com/users/arocchi/following{/other_user}","gists_url":"https://api.github.com/users/arocchi/gists{/gist_id}","starred_url":"https://api.github.com/users/arocchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arocchi/subscriptions","organizations_url":"https://api.github.com/users/arocchi/orgs","repos_url":"https://api.github.com/users/arocchi/repos","events_url":"https://api.github.com/users/arocchi/events{/privacy}","received_events_url":"https://api.github.com/users/arocchi/received_events","type":"User","site_admin":false},"labels":[{"id":49261983,"url":"https://api.github.com/repos/roboptim/roboptim-core/labels/bug","name":"bug","color":"e11d21","default":true},{"id":214224317,"url":"https://api.github.com/repos/roboptim/roboptim-core/labels/external%20dependency","name":"external dependency","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-20T14:08:38Z","updated_at":"2016-12-16T19:55:06Z","closed_at":null,"body":"I get the following errors when compiling roboptim on ubuntu xenial (16.04)\n\n```\n[  2%] Building CXX object src/CMakeFiles/roboptim-core.dir/generic-solver.cc.o\ncd /home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/src && /usr/bin/c++   -Droboptim_core_EXPORTS -I/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build -I/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include -I/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include -isystem /usr/include/eigen3  -Werror  -pedantic -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion -DROBOPTIM_DO_NOT_CHECK_ALLOCATION -fvisibility=hidden -DROBOPTIM_STORAGE_ORDER=ColMajor -fPIC   -I/usr/include/eigen3 -o CMakeFiles/roboptim-core.dir/generic-solver.cc.o -c /home/arocchi/Code/robotology-superbuild/external/roboptim-core/src/generic-solver.cc\nIn file included from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/differentiable-function.hh:261:0,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/util.hxx:28,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/util.hh:165,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/function.hxx:33,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/function.hh:603,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:31,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/generic-solver.hh:36,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/src/generic-solver.cc:22:\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/differentiable-function.hxx: In member function ‘void roboptim::GenericDifferentiableFunction<T>::impl_jacobian(roboptim::GenericDifferentiableFunction<T>::jacobian_ref, roboptim::GenericDifferentiableFunction<T>::const_argument_ref) const [with T = roboptim::EigenMatrixSparse; roboptim::GenericDifferentiableFunction<T>::jacobian_ref = Eigen::SparseMatrix<double, 0>&; roboptim::GenericDifferentiableFunction<T>::const_argument_ref = const Eigen::Ref<const Eigen::Matrix<double, -1, 1> >&]’:\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/differentiable-function.hxx:52:46: error: conversion to ‘int’ from ‘Eigen::EigenBase<Eigen::SparseMatrix<double, 0> >::Index {aka long int}’ may alter its value [-Werror=conversion]\n               (triplet_t (i, idx, it.value ()));\n                                              ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/differentiable-function.hxx:52:46: error: conversion to ‘int’ from ‘Eigen::EigenBase<Eigen::SparseMatrix<double, 0> >::Index {aka long int}’ may alter its value [-Werror=conversion]\nIn file included from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:34:0,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/generic-solver.hh:36,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/src/generic-solver.cc:22:\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh: At global scope:\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: error: ‘roboptim::Problem<T>::scales_t’ is deprecated [-Werror=deprecated-declarations]\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:211:33: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     scales_t& argumentScales () ROBOPTIM_CORE_DEPRECATED;\n                                 ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: note: declared here\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:122:32: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     typedef scaling_t scales_t ROBOPTIM_CORE_DEPRECATED;\n                                ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: error: ‘roboptim::Problem<T>::scales_t’ is deprecated [-Werror=deprecated-declarations]\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:214:45: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     const scales_t& argumentScales () const ROBOPTIM_CORE_DEPRECATED;\n                                             ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: note: declared here\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:122:32: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     typedef scaling_t scales_t ROBOPTIM_CORE_DEPRECATED;\n                                ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: error: ‘roboptim::Problem<T>::scalesVect_t’ is deprecated [-Werror=deprecated-declarations]\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:274:47: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     const scalesVect_t& scalesVector () const ROBOPTIM_CORE_DEPRECATED;\n                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: note: declared here\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:144:40: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     typedef scalingVect_t scalesVect_t ROBOPTIM_CORE_DEPRECATED;\n                                        ^\ncc1plus: all warnings being treated as errors\n\n```\n\nWhen setting `USE_CXX11` these errors show up instead:\n\n```\n[  0%] Building CXX object src/CMakeFiles/roboptim-core.dir/generic-solver.cc.o\ncd /home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/src && /usr/bin/c++   -Droboptim_core_EXPORTS -I/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build -I/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include -I/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include -isystem /usr/include/eigen3  -Werror  -pedantic -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion -DROBOPTIM_DO_NOT_CHECK_ALLOCATION -fvisibility=hidden -DROBOPTIM_STORAGE_ORDER=ColMajor -fPIC   -I/usr/include/eigen3 -o CMakeFiles/roboptim-core.dir/generic-solver.cc.o -c /home/arocchi/Code/robotology-superbuild/external/roboptim-core/src/generic-solver.cc\nIn file included from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/differentiable-function.hh:261:0,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/util.hxx:28,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/util.hh:165,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/function.hxx:33,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/function.hh:603,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:31,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/generic-solver.hh:36,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/src/generic-solver.cc:22:\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/differentiable-function.hxx: In member function ‘void roboptim::GenericDifferentiableFunction<T>::impl_jacobian(roboptim::GenericDifferentiableFunction<T>::jacobian_ref, roboptim::GenericDifferentiableFunction<T>::const_argument_ref) const [with T = roboptim::EigenMatrixSparse; roboptim::GenericDifferentiableFunction<T>::jacobian_ref = Eigen::SparseMatrix<double, 0>&; roboptim::GenericDifferentiableFunction<T>::const_argument_ref = const Eigen::Ref<const Eigen::Matrix<double, -1, 1> >&]’:\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/differentiable-function.hxx:52:46: error: conversion to ‘int’ from ‘Eigen::EigenBase<Eigen::SparseMatrix<double, 0> >::Index {aka long int}’ may alter its value [-Werror=conversion]\n               (triplet_t (i, idx, it.value ()));\n                                              ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/differentiable-function.hxx:52:46: error: conversion to ‘int’ from ‘Eigen::EigenBase<Eigen::SparseMatrix<double, 0> >::Index {aka long int}’ may alter its value [-Werror=conversion]\nIn file included from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:34:0,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/generic-solver.hh:36,\n                 from /home/arocchi/Code/robotology-superbuild/external/roboptim-core/src/generic-solver.cc:22:\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh: At global scope:\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: error: ‘roboptim::Problem<T>::scales_t’ is deprecated [-Werror=deprecated-declarations]\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:211:33: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     scales_t& argumentScales () ROBOPTIM_CORE_DEPRECATED;\n                                 ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: note: declared here\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:122:32: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     typedef scaling_t scales_t ROBOPTIM_CORE_DEPRECATED;\n                                ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: error: ‘roboptim::Problem<T>::scales_t’ is deprecated [-Werror=deprecated-declarations]\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:214:45: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     const scales_t& argumentScales () const ROBOPTIM_CORE_DEPRECATED;\n                                             ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: note: declared here\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:122:32: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     typedef scaling_t scales_t ROBOPTIM_CORE_DEPRECATED;\n                                ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: error: ‘roboptim::Problem<T>::scalesVect_t’ is deprecated [-Werror=deprecated-declarations]\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:274:47: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     const scalesVect_t& scalesVector () const ROBOPTIM_CORE_DEPRECATED;\n                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/build/include/roboptim/core/deprecated.hh:36:63: note: declared here\n #  define ROBOPTIM_CORE_DEPRECATED __attribute__ ((deprecated))\n                                                               ^\n/home/arocchi/Code/robotology-superbuild/external/roboptim-core/include/roboptim/core/problem.hh:144:40: note: in expansion of macro ‘ROBOPTIM_CORE_DEPRECATED’\n     typedef scalingVect_t scalesVect_t ROBOPTIM_CORE_DEPRECATED;\n                                        ^\ncc1plus: all warnings being treated as errors\n\n```\n"},"comment":{"url":"https://api.github.com/repos/roboptim/roboptim-core/issues/comments/267681986","html_url":"https://github.com/roboptim/roboptim-core/issues/115#issuecomment-267681986","issue_url":"https://api.github.com/repos/roboptim/roboptim-core/issues/115","id":267681986,"user":{"login":"bchretien","id":2742231,"avatar_url":"https://avatars.githubusercontent.com/u/2742231?v=3","gravatar_id":"","url":"https://api.github.com/users/bchretien","html_url":"https://github.com/bchretien","followers_url":"https://api.github.com/users/bchretien/followers","following_url":"https://api.github.com/users/bchretien/following{/other_user}","gists_url":"https://api.github.com/users/bchretien/gists{/gist_id}","starred_url":"https://api.github.com/users/bchretien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bchretien/subscriptions","organizations_url":"https://api.github.com/users/bchretien/orgs","repos_url":"https://api.github.com/users/bchretien/repos","events_url":"https://api.github.com/users/bchretien/events{/privacy}","received_events_url":"https://api.github.com/users/bchretien/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T19:55:06Z","updated_at":"2016-12-16T19:55:06Z","body":"@gergondet Thanks a lot for analyzing the issue :+1: \r\n\r\nFor the first problem, we should aim at supporting both Eigen 3.2 and 3.3. We can also add a template inline method that implements the scaling of the row, and specialize it for sparse matrices. That way all versions are covered (as far as we know), and we avoid too much code duplication. Later on we can improve it for cache efficiency (row-major / column-major being both supported), but for now we should at least have the same efficiency. For that part, we would not need distinct code for Eigen 3.2 and 3.3 if I understood correctly.\r\n\r\nFor the second problem, if having a unique code working for both Eigen 3.2 and 3.3 is too difficult, I guess we can make a specific macro indeed."}}
{"actor":{"display_login":"bchretien"}}