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

Error building the gtsam branch #51

Open
behnamasadi opened this issue Jun 20, 2023 · 1 comment
Open

Error building the gtsam branch #51

behnamasadi opened this issue Jun 20, 2023 · 1 comment

Comments

@behnamasadi
Copy link

I got an error during building the project on gtsam (the branch that has been used for this project on the line cmake --build build_gtsam --config RelWithDebInfo) I got the following error:

#0 3.429 pyparsing.exceptions.ParseException: Expected string_end, found 'namespace'  (at char 1249), (line:46, col:1)
#0 3.450 make[2]: *** [python/CMakeFiles/pybind_wrap_gtsam_unstable.dir/build.make:76: python/gtsam_unstable.cpp] Error 1
#0 3.450 make[1]: *** [CMakeFiles/Makefile2:32340: python/CMakeFiles/pybind_wrap_gtsam_unstable.dir/all] Error 2

and if it continues:

#0 50.92 /NeRF-SLAM/thirdparty/gtsam/gtsam/sfm/DsfTrackGenerator.cpp: In function 'gtsam::gtsfm::DSFMapIndexPair gtsam::gtsfm::generateDSF(const MatchIndicesMap&)':
#0 50.92 /NeRF-SLAM/thirdparty/gtsam/gtsam/sfm/DsfTrackGenerator.cpp:41:26: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'Eigen::Index' {aka 'long int'} [-Wsign-compare]
#0 50.92    41 |     for (size_t k = 0; k < corr_indices.rows(); k++) {
#0 50.92       |                        ~~^~~~~~~~~~~~~~~~~~~~~

so I containerized the project to avoid dependencies problem, below is my docker image:



MAINTAINER Behnam Asadi behnam.asadi@gmail.com


# this is for timezone config
ENV DEBIAN_FRONTEND=noninteractive 
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

#RUN apt-get update && apt upgrade -y
RUN apt-get update


# 1) Dependencies
RUN echo "************************ Dependencies ************************"
RUN apt-get install -y build-essential cmake git openssh-server apt-utils libgoogle-glog-dev libgflags-dev pip libssl-dev openssl xorg-dev libglew-dev libboost-all-dev

# 2) Installing latest version of CMake

RUN echo "************************ Installing latest version of CMake ************************"
WORKDIR "/"
RUN cd /
RUN git clone https://github.com/Kitware/CMake/
RUN cd CMake
WORKDIR "/CMake"
RUN ./bootstrap && make -j18 && make install
WORKDIR "/"
RUN cd /



# 3) CUDA 11.3
RUN echo "************************ CUDA 11.3 ************************"
RUN pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113


# 4) Pip install 
RUN echo "************************ cloning NeRF-SLAM  ************************"
RUN git clone https://github.com/ToniRV/NeRF-SLAM.git --recurse-submodules
RUN cd /NeRF-SLAM
WORKDIR "/NeRF-SLAM"
RUN git submodule update --init --recursive


# 5) Pip install 
RUN echo "************************ Pip install ************************"
RUN cd /NeRF-SLAM
WORKDIR "/NeRF-SLAM"
RUN pip install -r requirements.txt
RUN pip install -r ./thirdparty/gtsam/python/requirements.txt


# 6) Pip install 
RUN echo "************************ Compile ngp ************************"
RUN cmake ./thirdparty/instant-ngp -B build_ngp
RUN cmake --build build_ngp --config RelWithDebInfo -j18




# 7) Compile gtsam and enable the python wrapper:
RUN echo "************************ Compile gtsam and enable the python wrapper ************************"
RUN cmake ./thirdparty/gtsam -DGTSAM_BUILD_PYTHON=1 -B build_gtsam 
RUN cmake --build build_gtsam --config RelWithDebInfo -j18
RUN cd build_gtsam
RUN make python-install
@JoseMFloresG
Copy link

Can you share with us the complete docker image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants