KavrakiLab / tmkit

A Task-Motion Planning Framework
http://tmkit.kavrakilab.org
BSD 3-Clause "New" or "Revised" License
48 stars 12 forks source link

Compiling TMKit in a Docker container requires root privileges on host machine #10

Open theredcomputer opened 6 years ago

theredcomputer commented 6 years ago

This "issue" appears Ubuntu 16.04 and 18.04. The specific error I'm encountering occurs when running configure to install amino (I realize this is the issue tracker for TMKit and not amino, but the KavrakiLab/amino repo doesn't have the ability to raise issues). The following text contains the "issue":

[...]
configure: Use GLPK:          no
configure: Use CGAL:          
configure: Build Demos:       yes
configure: URDF Demos:        
## ----------- ##
## END SUMMARY ##
## ----------- ##
[maxima start]
cd ./src/mac && maxima --very-quiet -b euler77.mac
personality failure 1
make: *** [src/mac/euler.f] Error 255
Makefile:4460: recipe for target 'src/mac/euler.f' failed

personality is a specific syscall. To allow the syscall to go through, I reload dockerd using this seccomp policy and then run docker build ..

This method works, but reloading dockerd requires root privileges. Being able to compile amino without root in Docker would be ideal. I've tried using using configure's --without-maxima flag, but that didn't help.

ndantam commented 6 years ago

Maxima is used to generate some source files. As a workaround, I suggest to generate a distribution tarball (make dist) outside of docker. This tarball will contain the generated sources. Then, within docker, maxima will not be needed.

theredcomputer commented 6 years ago

Attempting this gives an error.

stephen@ubuntu:~/amino/amino$ make dist
make  dist-gzip am__post_remove_distdir='@:'
make[1]: Entering directory '/home/stephen/amino/amino'
make[1]: *** No rule to make target 'euler.c', needed by 'distdir'.  Stop.
make[1]: Leaving directory '/home/stephen/amino/amino'
Makefile:4039: recipe for target 'dist' failed
make: *** [dist] Error 2
ndantam commented 5 years ago

(Previously reply didn't get posted...)

You do need maxima to generate the sources (euler.c) for the distribution tarball.