Skip to content

Commit 40a6e39

Browse files
author
tobixdev
committed
Fiddling arround for a long time
1 parent 824276d commit 40a6e39

File tree

2 files changed

+37
-27
lines changed

2 files changed

+37
-27
lines changed

ReadMe.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
# Acknowledgements
22

3-
Thanks to [dinfuehr](https://gist.github.com/dinfuehr) for providing [cacao-jvm-dockerfile](https://gist.github.com/dinfuehr/ab83ad825cd24be0e816588d0465a7fb), which is the core of this repository.
3+
Thanks to [dinfuehr](https://gist.github.com/dinfuehr) for providing [cacao-jvm-dockerfile](https://gist.github.com/dinfuehr/ab83ad825cd24be0e816588d0465a7fb), on which this guide is based.
44

55
# What is this?
66

7-
This guide summarizes the setup of a [cacaojvm](http://www.cacaojvm.org/) dev container using Windows 10 with docker. In theory a similar approach should work on Linux based systems, if you want to isolate your cacao-dev environment from your day-to-day system.
7+
This guide summarizes the setup of a [cacaojvm](http://www.cacaojvm.org/) dev container using Windows 10 with docker.
88

9-
This repository solely extends the gist provided by [dinfuehr](https://gist.github.com/dinfuehr) with an "Getting Started" installation guide.
9+
In theory a similar approach should work on Linux based systems, if you want to isolate your cacao-dev environment from your day-to-day system.
1010

1111
Tools used in this guide:
1212
* Windows 10 Pro
1313
* docker for Desktop
1414
* Visual Studio Code
15-
* [Remote - Containers Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
15+
* [Remote - Containers Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
1616

1717
# Getting Started
1818

1919
* Fork the repository using your BitBucket account. [Further information](http://c1.complang.tuwien.ac.at/cacaowiki/Draft/CodeSubmissionProcess?action=show&redirect=Contributing) on the code submission process.
20-
* Clone the forked repository into a well known location (e.g. `C:\Development`)
20+
* Change the mercurial repository link in the docker file (`RUN hg clone https://bitbucket.org/cacaovm/cacao-staging`) to your forked repository.
2121
* Open VS Code
22-
* Open the cacao folder in the dev container
23-
* Press F1 to open the command palette.
24-
* Execute the command `Remove-Containers: Open Folder in Container`
25-
* Select the folder created through cloning this repository in Step #1.
26-
* Let VS Code do the rest
27-
* VS Code will setup the container for you
22+
* Create the dev container
23+
* Press F1 to open the command palette.
24+
* Execute the command `Remove-Containers: Reopen in Container`
25+
* VS Code/docker will setup the container for you
2826
* Verify the installation
29-
* Toggle the integrated terminal
30-
* Open a new bash shell
31-
* Try to locate the `cacao-staging` repository under `/code/cacao-staging`
32-
* You should now be able to use the `Open Folder` command to open the folder `/code` in the container
27+
* Toggle the integrated terminal
28+
* Open a new bash shell
29+
* Try to locate the `cacao-staging` repository under `/code/cacao-staging`
30+
* You should now be able to use the `Open Folder` command to open the folder `/code` in the container
31+
* Validate the environment by invoking `make check` in the `/code/build` directory

dockerfile

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM ubuntu:16.04
2-
32

4-
RUN apt-get update \
5-
&& apt-get install -y \
3+
RUN apt-get install -y \
64
mercurial \
75
wget \
86
unzip \
@@ -15,10 +13,16 @@ RUN apt-get update \
1513
libiberty-dev \
1614
fastjar \
1715
zlib1g-dev \
18-
19-
# for add-apt-repository
2016
software-properties-common
2117

18+
RUN apt update \
19+
&& apt-get install -y software-properties-common \
20+
&& add-apt-repository ppa:ubuntu-toolchain-r/test \
21+
&& apt update \
22+
&& apt install gcc-9 g++-9 -y \
23+
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9 \\
24+
&& update-alternatives --config gcc
25+
2226
RUN add-apt-repository ppa:openjdk-r/ppa -y \
2327
&& apt-get update \
2428
&& apt-get install -y openjdk-7-jdk
@@ -27,10 +31,13 @@ RUN mkdir -p /code/tools
2731
WORKDIR /code
2832

2933
RUN cd tools \
30-
&& wget http://search.maven.org/remotecontent\?filepath\=junit/junit/4.10/junit-4.10.jar \
31-
-O junit-4.10.jar \
34+
&& wget https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar -O junit-4.12.jar \
3235
&& mkdir -p /usr/share/java \
33-
&& cp junit-4.10.jar /usr/share/java/junit4.jar
36+
&& cp junit-4.12.jar /usr/share/java/junit4.jar
37+
38+
RUN cd tools \
39+
&& wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar -O hamcrest-1.3.jar \
40+
&& cp hamcrest-1.3.jar /usr/share/java/hamcrest.jar
3441

3542
RUN cd tools \
3643
&& wget http://ufpr.dl.sourceforge.net/project/jasmin/jasmin/jasmin-2.4/jasmin-2.4.zip \
@@ -41,7 +48,11 @@ RUN cd tools \
4148
&& wget ftp://ftp.gnu.org/gnu/classpath/classpath-0.99.tar.gz \
4249
&& tar xzf classpath-0.99.tar.gz
4350

44-
RUN hg clone https://bitbucket.org/cacaovm/cacao-staging
51+
RUN cd tools \
52+
&& wget https://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.gz \
53+
&& tar xzf boost_1_61_0.tar.gz
54+
55+
RUN hg clone https://bitbucket.org/tobixdev/cacao-staging/
4556

4657
RUN cd tools/classpath-0.99 \
4758
&& sh autogen.sh \
@@ -53,6 +64,6 @@ RUN cd cacao-staging && sh autogen.sh
5364

5465
RUN mkdir build \
5566
&& cd build \
56-
&& ../cacao-staging/configure --enable-disassembler \
57-
&& make \
58-
&& make check
67+
&& ../cacao-staging/configure --enable-debug --enable-compiler2 --enable-replacement --enable-logging --with-java-runtime-library=gnuclasspath --with-java-runtime-library-prefix=/usr/local/classpath --with-junit-jar=/usr/share/java/junit4.jar:/usr/share/java/hamcrest.jar
68+
69+
ENV CPATH=/code/tools/boost_1_61_0/

0 commit comments

Comments
 (0)