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

No such file or directory: ...env.sh #374

Closed
tkruse opened this issue Mar 4, 2013 · 4 comments
Closed

No such file or directory: ...env.sh #374

tkruse opened this issue Mar 4, 2013 · 4 comments
Assignees

Comments

@tkruse
Copy link
Member

tkruse commented Mar 4, 2013

This is some weird issue that I had problems to reproduce. Sometimes it happened like this, sometimes not. Cannot say whether this a bfl bug instead:

Using current catkin master, commit 453669f

To reproduce:

mkdir bfl_ws
cd bfl_ws
mkdir src
cd src
git clone git://github.com/ros/catkin.git
wget https://github.com/ros-gbp/bfl-release/archive/release/groovy/bfl/0.7.0-7.tar.gz
tar -xvf 0.7.0-7.tar.gz 
mv bfl-release-release-groovy-bfl-0.7.0-7/ bfl
cd ..
src/catkin/bin/catkin_make_isolated  --install-space `pwd`/install

Note there is no --install option used here.
For me, this results in:

$ src/catkin/bin/catkin_make_isolated  --install-space /home/kruset/work/catkin/bfl/install
Base path: /home/kruset/work/catkin/bfl
Source space: /home/kruset/work/catkin/bfl/src
Build space: /home/kruset/work/catkin/bfl/build_isolated
Devel space: /home/kruset/work/catkin/bfl/devel_isolated
Install space: /home/kruset/work/catkin/bfl/install
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~  traversing 2 packages in topological order:
~~  - bfl (plain cmake)
~~  - catkin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The packages or cmake arguments have changed, forcing cmake invocation
==> Processing plain cmake package: 'bfl'
==> Creating build directory: 'build_isolated/bfl'
==> cmake /home/kruset/work/catkin/bfl/src/bfl -DCMAKE_INSTALL_PREFIX=/home/kruset/work/catkin/bfl/devel_isolated/bfl
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kruset/work/catkin/bfl/build_isolated/bfl
==> make -j8 -l8 in '/home/kruset/work/catkin/bfl/build_isolated/bfl'
Scanning dependencies of target orocos-bfl
[  1%] [  2%] [  3%] [  5%] [  6%] [  7%] Building CXX object src/CMakeFiles/orocos-bfl.dir/wrappers/matrix/matrix_BOOST.o
[...]
==> make install in '/home/kruset/work/catkin/bfl/build_isolated/bfl'
[ 40%] Built target orocos-bfl
[ 48%] Built target test_complete_filter
[ 51%] Built target test_ekf
[ 55%] Built target test_matrixwrapper
[ 59%] Built target test_model
[ 63%] Built target test_pdf
[ 67%] Built target test_sample
[ 73%] Built target test_smoother
[ 77%] Built target test_compare_filters
[ 81%] Built target test_linear_kalman
[ 84%] Built target test_nonlinear_kalman
[ 91%] Built target test_nonlinear_particle
[ 94%] Built target test_kalman_smoother
[100%] Built target test_discrete_filter
Install the project...
-- Install configuration: "Debug"
-- Installing: /home/kruset/work/catkin/bfl/devel_isolated/bfl/lib/pkgconfig/orocos-bfl.pc
-- Installing: /home/kruset/work/catkin/bfl/devel_isolated/bfl/lib/pkgconfig/bfl.pc
[...]
==> Generating an env.sh
<== Failed to process package 'bfl': 
  [Errno 2] No such file or directory: '/home/kruset/work/catkin/bfl/install/env.sh'
Command failed, exiting.
!!! BASH reports ERROR: shell returned 1
   @ kruset-GT70 : ~/work/catkin/bfl  
kruset:work/catkin/bfl $ ls

Note the make install line comes before somemore "built ..." lines, not sure whether that is correct.
Sometimes the above worked though. But if so, then this command next would not work (added --install option):

$ src/catkin/bin/catkin_make_isolated  --install-space `pwd`/install --install
==> Generating an env.sh
<== Failed to process package 'bfl': 
  [Errno 2] No such file or directory: '/home/kruset/work/catkin/bfl/install/env.sh'
Command failed, exiting.

And at some point, I saw a "build" and "devel" folder appearing, though I had only invoked catkin_:make_isolated. I feel like hallucinating, and could not reproduce that particular behavior.

@tkruse
Copy link
Member Author

tkruse commented Mar 4, 2013

I should also mention that when I added <buildtool_depend>catkin</buildtool_depend>, I could not reproduce the problem (tried 3 times), which is why I thought that was the bug.

@dirk-thomas
Copy link
Member

Your example output does not match the mentioned command sequence and with these commands I can't reproduce the issue - it builds fine.

I can get it to fail when I first run the build without install and than run it again with install (or the other way around). Can you please verify that is exactly the same case you have?

Since bfl does not require catkin to be build it does not require to depend on it at build time. When you add that dependency you change the build order which might affect the result.

@ghost ghost assigned dirk-thomas Mar 5, 2013
@tkruse
Copy link
Member Author

tkruse commented Mar 5, 2013

I saw non-deterministic behavior, but running without install option and then with seems to have been one deterministic way of getting that failure.

I cannot give you a deterministic sequence of steps to reproduce non-deterministic behavior.

And I am not sure how the ordering of catkin and bfl could change the sucess of build if both are totally independent of each other, but I guess it makes some sense for someone.

@dirk-thomas
Copy link
Member

Rerunning CMake for plain CMake packages will not be sufficient when toggling the install flag. The build folder will still have cached values from the other environment which can break the build. The only viable way I currently see is to separate the build folder for devel and install for plain CMake packages.

@dirk-thomas dirk-thomas reopened this Oct 4, 2013
dirk-thomas added a commit that referenced this issue Oct 4, 2013
cwecht pushed a commit to cwecht/catkin that referenced this issue Mar 20, 2018
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