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
(WIP) Fix Vagrantfile #757
Conversation
When trying to compile XCSoar with this Vagrantfile from a Windows 10 install I get the following rror $ make TARGET=UNIX
GET output/download/boost_1_77_0.tar.bz2
download https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2
Traceback (most recent call last):
File "/xcsoar-host-src/./build/download.py", line 15, in <module>
download_and_verify(*sys.argv[1:])
File "/xcsoar-host-src/build/python/build/download.py", line 40, in download_and_verify
os.link(tmp.name, path)
PermissionError: [Errno 1] Operation not permitted: '/xcsoar-host-src/output/download/tmphdxkaw0n' -> './output/download/boost_1_77_0.tar.bz2'
make: *** [build/libboost.mk:14: output/download/boost_1_77_0.tar.bz2] Error 1 also try using $ sudo make TARGET=UNIX but it raises same error |
My guess (but I may be wrong) is that shared folder (shared between VM and guest OS) is in a NTFS partition (because of Windows 10). And hard link may not be supported. XCSoar/build/python/build/download.py Line 40 in 77642eb
I wonder if only source code shouldn't be in the shared folder but all the build process should be outside of this folder. |
a367d8b
to
805626c
Compare
Cross linking from windows is always difficult. Git for example checks out the source on windows with CRLF formatted files. Using then this git to compile inside a shared folder can lead to lots of errors. This here seems a permission error. So I think a I fixed your commit message. I would be happy to merge this as it is, if you agree. |
One noteable difference between this and the container: xcsoar is in /opt/xcsoar inside the container. |
Ok let's merge this. |
Currently trying to change
to
When running
it seems to be compiling now... (even with Windows as guest OS) $ make TARGET=UNIX
GET output/download/boost_1_77_0.tar.bz2
https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2 https://sourceforge.net/projects/boost/files/boost/1.77.0/boost_1_77_0.tar.bz2/download fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854 ./output/download
download https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2
UNTAR boost_1_77_0.tar.bz2
Applying patch /xcsoar-host-src/lib/boost/patches/no_locale.diff
Applying patch /xcsoar-host-src/lib/boost/patches/ublas_no_serialization.patch
Applying patch /xcsoar-host-src/lib/boost/patches/no_math_throw
Applying patch /xcsoar-host-src/lib/boost/patches/geometry_missing_include
Now at patch /xcsoar-host-src/lib/boost/patches/geometry_missing_include
CXX output/UNIX/dbg/src/io/MapFile.o
CXX output/UNIX/dbg/src/io/ConfiguredFile.o
CXX output/UNIX/dbg/src/io/DataFile.o
CXX output/UNIX/dbg/src/Airspace/ProtectedAirspaceWarningManager.o
CXX output/UNIX/dbg/src/Airspace/ActivePredicate.o
CXX output/UNIX/dbg/src/Task/Serialiser.o
CXX output/UNIX/dbg/src/Task/Deserialiser.o
CXX output/UNIX/dbg/src/Task/SaveFile.o
CXX output/UNIX/dbg/src/Task/LoadFile.o
CXX output/UNIX/dbg/src/Task/TaskFile.o
CXX output/UNIX/dbg/src/Task/TaskFileXCSoar.o
CXX output/UNIX/dbg/src/Task/TaskFileIGC.o
CXX output/UNIX/dbg/src/Task/TaskFileSeeYou.o
CXX output/UNIX/dbg/src/Task/DefaultTask.o
CXX output/UNIX/dbg/src/Task/MapTaskManager.o Syncing folder can be done using:
|
Well compile doesn't work as expected $ make TARGET=UNIX
GET output/download/boost_1_77_0.tar.bz2
https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2 https://sourceforge.net/projects/boost/files/boost/1.77.0/boost_1_77_0.tar.bz2/download fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854 ./output/download
download https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2
UNTAR boost_1_77_0.tar.bz2
Applying patch /xcsoar-host-src/lib/boost/patches/no_locale.diff
Applying patch /xcsoar-host-src/lib/boost/patches/ublas_no_serialization.patch
Applying patch /xcsoar-host-src/lib/boost/patches/no_math_throw
Applying patch /xcsoar-host-src/lib/boost/patches/geometry_missing_include
Now at patch /xcsoar-host-src/lib/boost/patches/geometry_missing_include
CXX output/UNIX/dbg/src/io/MapFile.o
CXX output/UNIX/dbg/src/io/ConfiguredFile.o
CXX output/UNIX/dbg/src/io/DataFile.o
CXX output/UNIX/dbg/src/Airspace/ProtectedAirspaceWarningManager.o
CXX output/UNIX/dbg/src/Airspace/ActivePredicate.o
CXX output/UNIX/dbg/src/Task/Serialiser.o
CXX output/UNIX/dbg/src/Task/Deserialiser.o
CXX output/UNIX/dbg/src/Task/SaveFile.o
CXX output/UNIX/dbg/src/Task/LoadFile.o
CXX output/UNIX/dbg/src/Task/TaskFile.o
CXX output/UNIX/dbg/src/Task/TaskFileXCSoar.o
CXX output/UNIX/dbg/src/Task/TaskFileIGC.o
CXX output/UNIX/dbg/src/Task/TaskFileSeeYou.o
CXX output/UNIX/dbg/src/Task/DefaultTask.o
CXX output/UNIX/dbg/src/Task/MapTaskManager.o
CXX output/UNIX/dbg/src/Task/ProtectedTaskManager.o
CXX output/UNIX/dbg/src/Task/FileProtectedTaskManager.o
CXX output/UNIX/dbg/src/Task/RoutePlannerGlue.o
CXX output/UNIX/dbg/src/Task/ProtectedRoutePlanner.o
CXX output/UNIX/dbg/src/Task/TaskStore.o
CXX output/UNIX/dbg/src/Task/TypeStrings.o
CXX output/UNIX/dbg/src/Task/ValidationErrorStrings.o
CXX output/UNIX/dbg/src/RadioFrequency.o
CXX output/UNIX/dbg/src/Engine/Navigation/TraceHistory.o
CXX output/UNIX/dbg/src/Engine/Navigation/Aircraft.o
CXX output/UNIX/dbg/src/Engine/Trace/Point.o
CXX output/UNIX/dbg/src/Engine/Trace/Trace.o
CXX output/UNIX/dbg/src/Engine/Trace/Vector.o
CXX output/UNIX/dbg/src/Engine/Util/Gradient.o
CXX output/UNIX/dbg/src/Engine/ThermalBand/ThermalBand.o
CXX output/UNIX/dbg/src/Engine/ThermalBand/ThermalSlice.o
CXX output/UNIX/dbg/src/Engine/ThermalBand/ThermalEncounterBand.o
CXX output/UNIX/dbg/src/Engine/ThermalBand/ThermalEncounterCollection.o
CXX output/UNIX/dbg/src/HorizonWidget.o
CXX output/UNIX/dbg/src/Renderer/TextRowRenderer.o
CXX output/UNIX/dbg/src/Renderer/TwoTextRowsRenderer.o
CXX output/UNIX/dbg/src/Renderer/HorizonRenderer.o
CXX output/UNIX/dbg/src/Renderer/GradientRenderer.o
CXX output/UNIX/dbg/src/Renderer/GlassRenderer.o
In file included from ./src/ui/canvas/opengl/Scissor.hpp:28,
from src/Renderer/GlassRenderer.cpp:29:
./src/ui/canvas/opengl/Globals.hpp:37:10: fatal error: glm/fwd.hpp: No such file or directory
37 | #include <glm/fwd.hpp>
| ^~~~~~~~~~~~~
compilation terminated.
make: *** [build/compile.mk:108: output/UNIX/dbg/src/Renderer/GlassRenderer.o] Error 1 Did I missed something? |
You are missing the submodules: (other git repos references from inside xcsoar's git) use the recursive option when cloning. git clone --recursive git://github.com/XCSoar/XCSoar |
I think you want to exclude ./output |
I think if I use rsync instead of VirtualBox shared folder I don't need to exclude any directory because source will be synced from host to guest at vagrant up (and only this way as it doesn't seems to be multidirectional sync according to https://www.vagrantup.com/docs/synced-folders/rsync ) So I don't really know currently what is the best solution... remove rsync__exclude or using My main issue being that creating this box is very long! |
The bad side of this is that running a command line will be required to sync from host to guest
So this can be done either by doing
or
|
During the end of provisioning we can see
I think I didn't forget submodules but I'm still getting this
in the and this folder is different from my problem was that I was probably confusing both... and I didn't wrote
in my XCSoar git repository on the host |
What is your use-case exactly? The vagrant container was mainly intended to be used as ssh box to edit and compile xcsoar in. If you install X or use the FrameBuffer you can also execute it inside. |
If you edit in your own ide and just need a compiler, the docker approach would fit better. |
I would like to be able to edit source from host, compile on the guest (which works fine now) but also run GUI on the guest. PS : to display GUI (with appropriate keymap) I did on the guest side:
PS2 : it can be interesting to have VirtualBox Guest Additions installed or on the host side you can simply install a Vagrant plugin like so
|
Not sure Steps to reproduce the problem On guest:
shows On host
back to guest
I also tried |
I can confirm that Maybe an other workaround to avoid On the guest
|
I didn't noticed previously in https://xcsoar.readthedocs.io/en/latest/build.html make TARGET=UNIX TARGET_OUTPUT_DIR=~/output with such a solution, maybe normal synced folder could be used (not necessarily rsync shared folder) |
Unfortunately the build system doesn't seems to take account of this parameter for download
|
According to build/libboost.mk and build/dirs.mk
should work |
I'm facing an other problem using
|
After running
I'm currently facing
I have no idea why |
I have never used the OUT parameter. I would expect a lot of failures there... I would go with a share mount (smb) for example. That way you have 1 state and forget about the sync issues. |
The problem with sync (even rsync) is that it is on folder basis... and so even if xcsoar repository on host doesn't have an ouput folder, and this folder is create on guest side, it will be completly lost when halting and running again a vm. Unfortunately when changing OUT parameter value, I haven't been able to compile XCSoar. So the workaround can be done by using symbolic link from /opt/xcsoar/output to for example ~/output. When synchronization using rsync occurs (from host to guest), /opt/xcsoar/output symbolic link is broken but fortunately content of ~/output is not lost (and so compilation can be quicker!) |
bb2289c
to
65aacd6
Compare
I have no idea what this is about, but there hasn't been any progress in nearly two years. |
Closes #756