Closed GavinRay97 closed 3 years ago
Could be useful. Can you make a plain dockerfile as well for those who prefer to do this locally?
LLVM/Clang 13 is in development, they often out of sync with each other and/or in "broken" state, don't bother with it until it enter stabilization for RC builds. (glibc error: IIRC it comes with gcc install)
And then there is some issues with static linking on Linux after changes in clang 12 and/or build script, needs to be resolved anyway but I can't give any estimate, need to set up VM and all...
Rapidjson will be removed after v0.4 (coming next week). Having both C++ main() and D main() is confusing, and without C++ main() rapidjson no longer needed.
Sure, I have local Dockerfile already so that one will be easier.
I just need to remove some stuff because I also have Cling + cppyy in there for being able to interpret C++ as scripting lang for interactive dev.
Edit: Here it is: https://github.com/GavinRay97/ohmygentool/blob/master/Dockerfile.local-dev
I will build this and push it to my personal Dockerhub, as well as try to compress the image with: https://github.com/docker-slim/docker-slim
Then we can add instructions to README + people won't need to build the image again. They can just pull it and it's ready to go 👍
It works with both VS Code devcontainer
and CLion (the SSH stage at the end is needed for CLion).
I have to write the VSCode devcontainer config still, will PR that to the .vscode
folder later, along with extensions configured in the devcontainer like clangd
, CMake Tools
, etc that you need to be productive.
Thanks!
Adds support for developing and building/running Ohmygentool from within your browser. Lets put a link on the repo README and let anyone who is interested in contributing do so with a click? 😃
devcontainer
Dockerfile for VS Code + CLion that have the required toolchain so you can just spin that up locally and you're g2g)I have put this up at: https://gitpod.io/#https://github.com/GavinRay97/Ohmygentool
If you visit that link and sign in with Github, it should pop you into a browser shell that has everything you need to develop + build OMG, except for Rapidjson (which isn't added as a submodule for some reason). You get 50 free dev hours per account per month.
To build:
One note about the Dockerfile -- I download and unpack a static distribution of LLVM12, and then immediately afterwards I install
clang
andlld
withapt
.This is because trying to build with CMake (even if passing
-DLLVM_DIR
and-DClang_DIR
) always gave me this:Couldn't find a way around it trying to use this version 13.
And then the prebuilt LLVM binaries have some bug with
libc
, but they fix the CMake problem by adding a directory to/usr/lib/cmake/clang
:So you wind up with the mess I have, but it works. Would be awesome if someone knew a fix to this.
See bottom of screen output for OMG being compiled and then invoked: