Skip to content
New issue

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

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

Already on GitHub? # to your account

DESTDIR broken on master #280

Closed
mikepurvis opened this issue Jan 22, 2016 · 8 comments
Closed

DESTDIR broken on master #280

mikepurvis opened this issue Jan 22, 2016 · 8 comments

Comments

@mikepurvis
Copy link
Member

Looks like it mostly does the right thing, but tries to create the initial path in the un-prefixed location. Previously I needed the following change:

diff --cc catkin_tools/verbs/catkin_build/job.py
index 1fcb3b5,1fcb3b5..e41a437
--- a/catkin_tools/verbs/catkin_build/job.py
+++ b/catkin_tools/verbs/catkin_build/job.py
@@@ -229,6 -229,6 +229,8 @@@ class CMakeJob(Job)
          # Determine the location of where the setup.sh file should be created
          if self.context.install:
              setup_file_path = os.path.join(install_space, 'setup.sh')
++            if self.context.destdir:
++                setup_file_path = self.context.destdir + setup_file_path
              if not self.context.isolate_install and os.path.exists(setup_file_path):
                  return commands
          else:  # Create it in the devel space

But I'm having trouble getting this work with the new backend. I tried making similar changes here, but it seemed to continue to fail in the same way.

@jbohren
Copy link
Contributor

jbohren commented Jan 22, 2016

@mikepurvis Can you modify the unit test here so that it captures the problem?

https://github.com/catkin/catkin_tools/blob/master/tests/system/verbs/catkin_build/test_build.py#L218-L266

@mikepurvis
Copy link
Member Author

It's not immediately clear to me why test_install_catkin_destdir doesn't catch the issue, but here's the output I'm getting:

$ DESTDIR=$(pwd)/tmp catkin build
-----------------------------------------------------------
Profile:                     default
Extending:                   None
Workspace:                   /home/mpurvis/destdir_ws
Source Space:       [exists] /home/mpurvis/destdir_ws/src
Build Space:        [exists] /home/mpurvis/destdir_ws/build
Devel Space:        [exists] /home/mpurvis/destdir_ws/devel
Install Space:     [missing] /opt/clearpath/rocksteady
DESTDIR:                     /home/mpurvis/destdir_ws/tmp
-----------------------------------------------------------
Isolate Develspaces:         False
Install Packages:            True
Isolate Installs:            False
-----------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-----------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-----------------------------------------------------------
Workspace configuration appears valid.
-----------------------------------------------------------
[build] Found '346' packages in 0.0 seconds.
Starting  >>> catkin
Starting  >>> flirtlib
Starting  >>> gtsam
Starting  >>> libg2o
________________________________________________________________________________________________________________________________________________________________________________
Errors     << catkin:ctr-nuke /home/mpurvis/destdir_ws/build/_logs/catkin/build.ctr-nuke.000.log
Traceback (most recent call last):
  File "/home/mpurvis/catkin_tools/catkin_tools/execution/executor.py", line 148, in async_job
    event_queue))
OSError: [Errno 13] Permission denied: '/opt/clearpath'

................................................................................................................................................................................
Failed     << catkin:ctr-nuke                      [ Exited with code 3 ]
Failed    <<< catkin                               [ 0.0 seconds ]
Abandoned <<< genmsg                               [ Unrelated job failed ]
Abandoned <<< gencpp                               [ Unrelated job failed ]
Abandoned <<< genlisp                              [ Unrelated job failed ]
...

The async execution engine is unfortunately cloaking where exactly this is going wrong, but perhaps it's actually an issue in catkin itself? It's not clear to me what the ctr-nuke thing is all about.

@jbohren
Copy link
Contributor

jbohren commented Jan 22, 2016

The async execution engine is unfortunately cloaking where exactly this is going wrong, but perhaps it's actually an issue in catkin itself?

You can get the full trace with:

catkin build --develdebug warning

@jbohren
Copy link
Contributor

jbohren commented Jan 22, 2016

But if it's failing in ctr-nuke so I think I know what's wrong.

@jbohren
Copy link
Contributor

jbohren commented Jan 22, 2016

Yeah, this isn't respecting DESTDIR:

prefix=(devel_space if not context.install else install_space)))

@jbohren
Copy link
Contributor

jbohren commented Jan 22, 2016

@mikepurvis
Copy link
Member Author

Yeah, was about to post back— when I create and chown it that directory, /opt/clearpath/rocksteady/etc/catkin/profile.d/06-ctr-nuke.sh is the one file that gets created. It's not clear to me how to adjust the test to cover it.

@mikepurvis
Copy link
Member Author

That looks like it has it fixed. Thanks for the quick work.

jbohren added a commit that referenced this issue Jan 22, 2016
build: Making ctr-nuke env hook go to the right place, fixes #280.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants