Giter Club home page Giter Club logo

Comments (3)

aaron-skydio avatar aaron-skydio commented on June 12, 2024

The relevant factor may be the compiler, which I see is AppleClang 15 - looking at the Eigen source it does look like those are just unused. It might also be that the compilers we test on usually do catch this, but they're system includes so it's fine?

This should make the build work though I think, regardless of why you're actually seeing the warning. Really just the first commit here: #370

from symforce.

tbretl avatar tbretl commented on June 12, 2024

Thanks.

Turns out this was an easy one - the problem was not having first installed eigen. If I either do a global install (brew install eigen) or a local install (mamba install eigen) then building SymForce from source succeeds as expected with pip install ..

It looks like the install script recognized that Eigen was missing and tried to fetch it (see Eigen3 not found, adding with FetchContent in the earlier error log), but this process did not succeed. I suspect the reason is that FetchContent failed to install Eigen inside my mamba environment and did not have permission to install Eigen globally (nor would I have wanted it to do so).

Perhaps the README.md should be modified to say that it is necessary to install Eigen before building from source.

Along these same lines, the README.md should also be modified to say that gmp must be installed with brew and cannot be installed with mamba on macOS. When I install gmp with mamba, I get the following error:

      CMake Error at /private/var/folders/0j/gcrqfhps14b11tyxczhdzdv80000gn/T/pip-build-env-qp81m144/normal/lib/python3.11/site-packages/cmake/data/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
        Could NOT find GMP (missing: GMP_LIBRARIES GMP_INCLUDE_DIRS)
      Call Stack (most recent call first):
        /private/var/folders/0j/gcrqfhps14b11tyxczhdzdv80000gn/T/pip-build-env-qp81m144/normal/lib/python3.11/site-packages/cmake/data/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
        cmake/FindGMP.cmake:19 (find_package_handle_standard_args)
        CMakeLists.txt:198 (find_package)

from symforce.

aaron-skydio avatar aaron-skydio commented on June 12, 2024

Did you try doing a clean build with #370 before installing eigen? I expect that to work, unless I'm misunderstanding things.

The fatal errors from the log are these:

      In file included from /Users/timothybretl/Documents/sabbatical/Projects/symforce/symforce/opt/sparse_cholesky/sparse_cholesky_solver.cc:6:
      In file included from /Users/timothybretl/Documents/sabbatical/Projects/symforce/symforce/opt/sparse_cholesky/./sparse_cholesky_solver.h:14:
      In file included from /Users/timothybretl/Documents/sabbatical/Projects/symforce/build/temp.macosx-11.0-arm64-cpython-312/_deps/eigen3-src/Eigen/MetisSupport:11:
      In file included from /Users/timothybretl/Documents/sabbatical/Projects/symforce/build/temp.macosx-11.0-arm64-cpython-312/_deps/eigen3-src/Eigen/SparseCore:61:
      /Users/timothybretl/Documents/sabbatical/Projects/symforce/build/temp.macosx-11.0-arm64-cpython-312/_deps/eigen3-src/Eigen/src/SparseCore/TriangularSolver.h:273:13: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
            Index count = 0;
                  ^
      [ 52%] Building C object _deps/metis-build/programs/CMakeFiles/ndmetis.dir/io.c.o
      In file included from /Users/timothybretl/Documents/sabbatical/Projects/symforce/symforce/opt/sparse_cholesky/sparse_cholesky_solver.cc:6:
      In file included from /Users/timothybretl/Documents/sabbatical/Projects/symforce/symforce/opt/sparse_cholesky/./sparse_cholesky_solver.h:15:
      In file included from /Users/timothybretl/Documents/sabbatical/Projects/symforce/build/temp.macosx-11.0-arm64-cpython-312/_deps/eigen3-src/Eigen/Sparse:29:
      In file included from /Users/timothybretl/Documents/sabbatical/Projects/symforce/build/temp.macosx-11.0-arm64-cpython-312/_deps/eigen3-src/Eigen/SparseLU:35:
      /Users/timothybretl/Documents/sabbatical/Projects/symforce/build/temp.macosx-11.0-arm64-cpython-312/_deps/eigen3-src/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:78:9: error: variable 'nsuper_et_post' set but not used [-Werror,-Wunused-but-set-variable]
        Index nsuper_et_post = 0; // Number of relaxed snodes in postordered etree
              ^
      /Users/timothybretl/Documents/sabbatical/Projects/symforce/build/temp.macosx-11.0-arm64-cpython-312/_deps/eigen3-src/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:79:9: error: variable 'nsuper_et' set but not used [-Werror,-Wunused-but-set-variable]
        Index nsuper_et = 0; // Number of relaxed snodes in the original etree
              ^

Which mean that Eigen was fetched successfully, but was not added as a system include path on the compile command, meaning that warnings in Eigen itself were fatal - #370 fixes this. If Eigen is already installed, it's included as a system include path, meaning warnings in Eigen itself are ignored.

I'll take a look at the gmp issue separately

from symforce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.