Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building and installing w/ python3 -m pip install . does not install slam headers and libraries. #323

Open
arbor-arthur opened this issue May 3, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@arbor-arthur
Copy link

Describe the bug
After installing symforce with python3 -m pip install ., my C++ program has an error using #include <symforce/slam/imu_preintegration/imu_factor.h> because the slam subdirectory is not installed. Libraries are also missing.

To Reproduce
Clone the symforce repository, cd into it, and run python3 -m pip install . to install.
On my computer this installs headers into /Library/Frameworks/Python.framework/Versions/3.9/include and libraries into /Library/Frameworks/Python.framework/Versions/3.9/lib/.

Make a file test.cc

#include <symforce/slam/imu_preintegration/imu_factor.h>
int main() {
    return 0;
}

Try building the test program with the flags that have otherwise worked for me.

clang test.cc -std=c++17 -DSPDLOG_FMT_EXTERNAL=1 -I/usr/local/include/eigen3 -I/Library/Frameworks/Python.framework/Versions/3.9/include
test.cc:1:10: fatal error: 'symforce/slam/imu_preintegration/imu_factor.h' file not found

I was able to fix this issue by adding the following lines to symforce/slam/CMakeLists.txt:

# ------------------------------------------------------------------------------
# install

install(TARGETS symforce_slam DESTINATION lib)
install(DIRECTORY ./ DESTINATION include/symforce/slam FILES_MATCHING PATTERN "*.h" PATTERN "*.tcc")

Expected behavior
All standard Symforce libraries and headers should be installed when running a build/install command.

Environment (please complete the following information):

  • OS and version: MacOS Ventura 13.3.1
  • Python version: Python 3.9.13
  • SymForce Version: 0.8.0

Additional context
cmake version 3.26.3

@arbor-arthur arbor-arthur added the bug Something isn't working label May 3, 2023
@chao-qu-skydio
Copy link
Contributor

This is also fixed in the current master. We might put out a new release that addresses all these issues.

@chao-qu-skydio chao-qu-skydio self-assigned this May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants