JuliaMPC/MAVs

issue building cain: File "/home/mavs/MAVs/ros/src/CMakeLists.txt" already existsCMake Error:

Closed this issue · 1 comments

@changyuhsuan I just ran into this issue building

febbo@febbo-HP-ZBook-17-G2:~/Documents/workspace/MAVs$ sh build.sh
Using default tag: latest
latest: Pulling from c1yxuan/avpg_base
3b37166ec614: Already exists 
504facff238f: Already exists 
ebbcacd28e10: Already exists 
c7fb3351ecad: Already exists 
2e3debadcbf7: Already exists 
7acbb21d37c1: Already exists 
8e0de1839bff: Pull complete 
c4ecce26bb2d: Pull complete 
909a4d505656: Pull complete 
4e889c9d9a5d: Pull complete 
933317eb9819: Pull complete 
35f0e0ae5178: Pull complete 
0123cac95dd0: Pull complete 
320bf8c53371: Pull complete 
80fd3676520c: Pull complete 
dbe02d47b782: Pull complete 
170cedfd4734: Pull complete 
d5b32dc65a6d: Pull complete 
4e4fe3d2f33b: Pull complete 
5930547c6629: Pull complete 
5a236a84596c: Pull complete 
ccc16409b80c: Pull complete 
bf9f47f7c5b5: Pull complete 
2dd542535892: Pull complete 
Digest: sha256:9d91224a00965a42a4b237841875f10f4b50f5e4a442034d4223bebca5741243
Status: Downloaded newer image for c1yxuan/avpg_base:latest
Sending build context to Docker daemon  346.2MB
Step 1/6 : FROM c1yxuan/avpg_base
 ---> ec31ab6036fb
Step 2/6 : RUN mkdir -p /home/$USERNAME/MAVs/ros
 ---> Running in d45a16697a1c
Removing intermediate container d45a16697a1c
 ---> f101d34f1cbd
Step 3/6 : COPY --chown=mavs:mavs ros /home/$USERNAME/MAVs/ros
 ---> 2805f6ecd228
Step 4/6 : RUN /bin/bash -c 'source /opt/ros/kinetic/setup.bash; cd /home/$USERNAME/MAVs/ros/src; sudo rosdep init; rosdep update; catkin_init_workspace; cd ..; catkin_make'     && echo "source /home/$USERNAME/MAVs/ros/devel/setup.bash" >> /home/$USERNAME/.bashrc     && echo 'alias julia='/opt/julia-d386e40c17/bin/julia'' >> ~/.bashrc     && echo 'export PATH="$PATH:/opt/julia-d386e40c17/bin"' >>  ~/.bashrc
 ---> Running in 8abd4df3f3be
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run

	rosdep update

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index.yaml
Add distro "groovy"
Add distro "hydro"
Add distro "indigo"
Add distro "jade"
Add distro "kinetic"
Add distro "lunar"
Add distro "melodic"
updated cache in /home/mavs/.ros/rosdep/sources.cache
File "/home/mavs/MAVs/ros/src/CMakeLists.txt" already existsCMake Error: The current CMakeCache.txt directory /home/mavs/MAVs/ros/build/CMakeCache.txt is different than the directory /home/febbo/Documents/workspace/MAVs/ros/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/home/mavs/MAVs/ros/src/CMakeLists.txt" does not match the source "/home/febbo/Documents/workspace/MAVs/ros/src/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
Base path: /home/mavs/MAVs/ros
Source space: /home/mavs/MAVs/ros/src
Build space: /home/mavs/MAVs/ros/build
Devel space: /home/mavs/MAVs/ros/devel
Install space: /home/mavs/MAVs/ros/install
####
#### Running command: "cmake /home/mavs/MAVs/ros/src -DCATKIN_DEVEL_PREFIX=/home/mavs/MAVs/ros/devel -DCMAKE_INSTALL_PREFIX=/home/mavs/MAVs/ros/install -G Unix Makefiles" in "/home/mavs/MAVs/ros/build"
####
Invoking "cmake" failed
The command '/bin/sh -c /bin/bash -c 'source /opt/ros/kinetic/setup.bash; cd /home/$USERNAME/MAVs/ros/src; sudo rosdep init; rosdep update; catkin_init_workspace; cd ..; catkin_make'     && echo "source /home/$USERNAME/MAVs/ros/devel/setup.bash" >> /home/$USERNAME/.bashrc     && echo 'alias julia='/opt/julia-d386e40c17/bin/julia'' >> ~/.bashrc     && echo 'export PATH="$PATH:/opt/julia-d386e40c17/bin"' >>  ~/.bashrc' returned a non-zero code: 1
febbo@febbo-HP-ZBook-17-G2:~/Documents/workspace/MAVs$ 

The fix is to delete the build and the devel folders and rebuild