-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added build instructions for rose and boost
- Loading branch information
Showing
5 changed files
with
241 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM ubuntu:18.04 | ||
|
||
|
||
|
||
WORKDIR /mnt/rosedocker | ||
|
||
|
||
RUN apt-get update && apt-get install -y git wget build-essential libtool flex bison python3-dev\ | ||
unzip perl-doc doxygen texlive libboost-all-dev gdb gcc g++ gfortran autoconf automake\ | ||
libxml2-dev libdwarf-dev graphviz openjdk-8-jdk-headless openjdk-8-jre-headless ghostscript &&\ | ||
useradd -ms /bin/bash ipt &&\ | ||
git clone https://github.com/rose-compiler/rose &&\ | ||
cd rose/ && ./build && cd ../ && mkdir buildrose/ && cd buildrose/ &&\ | ||
../rose/configure --prefix=/home/ipt/opt/rose-inst --enable-edg_version=4.12 --with-boost-libdir=/usr/lib/x86_64-linux-gnu --with-boost=/usr &&\ | ||
make core -j4 && make install-core -j4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
FROM ubuntu:18.04 | ||
|
||
|
||
|
||
WORKDIR /mnt/rosedocker | ||
|
||
|
||
|
||
RUN apt-get update && apt-get install -y git wget build-essential unzip gdb ghostscript &&\ | ||
useradd -ms /bin/bash ipt && cd /mnt/rosedocker/ && mkdir roseCompile && cd roseCompile/ &&\ | ||
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz &&\ | ||
tar -xvf jdk-8u131-linux-x64.tar.gz && export JAVA_HOME=/mnt/rosedocker/roseCompile/jdk1.8.0_131 &&\ | ||
export JAVA_TOOL_OPTIONS="-Xms2G -Xmx2G" &&\ | ||
export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/jdk1.8.0_131/jre/lib/amd64/server &&\ | ||
apt-get install autoconf automake flex bison -y &&\ | ||
wget http://mirror.jre655.com/GNU/libtool/libtool-2.4.6.tar.gz &&\ | ||
tar xf libtool-2.4.6.tar.gz && cd libtool-2.4.6 &&\ | ||
sh configure --prefix /mnt/rosedocker/roseCompile/lib && make install && cd .. &&\ | ||
export PATH=/mnt/rosedocker/roseCompile/lib/bin:$PATH &&\ | ||
export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/lib/lib/:$LD_LIBRARY_PATH &&\ | ||
|
||
# Boost installation | ||
wget -O boost-1.64.0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download &&\ | ||
tar xf boost-1.64.0.tar.bz2 && cd boost_1_64_0/ &&\ | ||
./bootstrap.sh --prefix=/mnt/rosedocker/roseCompile/boost_install --with-libraries=chrono,date_time,filesystem,iostreams,program_options,random,regex,serialization,signals,system,thread,wave &&\ | ||
./b2 --prefix=/mnt/rosedocker/roseCompile/boost_install -sNO_BZIP2=1 runtime-link=static link=static install &&\ | ||
cd .. && export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/boost_install/lib:$LD_LIBRARY_PATH &&\ | ||
|
||
# Rose installation | ||
mkdir roseCompileTree && git clone https://github.com/rose-compiler/rose &&cd rose &&\ | ||
./build && cd .. && cd roseCompileTree/ &&\ | ||
apt-get install -y gfortran &&\ | ||
/mnt/rosedocker/roseCompile/rose/configure --prefix=/mnt/rosedocker/roseCompile/roseCompileTree --with-boost=/mnt/rosedocker/roseCompile/boost_install --disable-shared --enable-static --with-CXX_DEBUG=no --with-C_DEBUG=no &&\ | ||
make core -j4 && make install-core -j4 &&\ | ||
|
||
|
||
# Test identity translator (it.cc) | ||
mkdir /home/ipt/src && cd /home/ipt/src &&\ | ||
cp /mnt/rosedocker/roseCompile/roseCompileTree/include/edg/g++_HEADERS/rose_edg_required_macros_and_functions.h . &&\ | ||
|
||
|
||
# Remove the unnecessary packages | ||
apt-get remove build-essential gfortran && apt autoremove | ||
|
||
|
||
# This file has some bugs in it. To fix it: | ||
# Uncomment the following line: #undef __SIZE_TYPE__ (line 32) | ||
# Comment out: #define __CHAR32_TYPE__ unsigned int (line 379) | ||
# Comment out: #define __PTRDIFF_TYPE__ long int (line 403) | ||
|
||
|
||
# Compile the identity translator | ||
# g++ -DNDEBUG -std=c++0x -w -v -static-libstdc++ -std=c++0x -w -o identtrans /home/ipt/src/it.cc -I/mnt/rosedocker/roseCompile/boost_install/include/ -I/mnt/rosedocker/roseCompile/roseCompileTree/include -L/mnt/rosedocker/roseCompile/roseCompileTree/lib -I/mnt/rosedocker/roseCompile/roseCompileTree/include/rose -L/mnt/rosedocker/roseCompile/boost_install/lib /mnt/rosedocker/roseCompile/roseCompileTree/lib/librose.a /mnt/rosedocker/roseCompile/roseCompileTree/lib/libhpdf.a -L/mnt/rosedocker/roseCompile/jdk1.8.0_131/jre/lib/amd64/server -ljvm -ldl -lboost_date_time -lboost_thread -lboost_filesystem -lboost_program_options -lboost_regex -lboost_system -lboost_serialization -lboost_wave -lboost_iostreams -lpthread -lboost_chrono | ||
|
||
# Run the identity translator on a hellow worl file (returns a similar file) | ||
# export JAVA_HOME=/mnt/rosedocker/roseCompile/jdk1.8.0_131 | ||
# export JAVA_TOOL_OPTIONS="-Xms2G -Xmx2G" | ||
# export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/jdk1.8.0_131/jre/lib/amd64/server | ||
# export PATH=/mnt/rosedocker/roseCompile/lib/bin:$PATH | ||
# export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/lib/lib/:$LD_LIBRARY_PATH | ||
# export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/boost_install/lib:$LD_LIBRARY_PATH | ||
|
||
|
||
# /home/ipt/src/identtrans -c hello_world.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
export JAVA_HOME=/mnt/rosedocker/roseCompile/jdk1.8.0_131 | ||
export JAVA_TOOL_OPTIONS="-Xms2G -Xmx2G" | ||
export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/jdk1.8.0_131/jre/lib/amd64/server | ||
export PATH=/mnt/rosedocker/roseCompile/lib/bin:$PATH | ||
export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/lib/lib/:$LD_LIBRARY_PATH | ||
export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/boost_install/lib:$LD_LIBRARY_PATH | ||
export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/roseCompileTree/lib:$LD_LIBRARY_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Source this file right after entering the container | ||
cd /mnt/rosedocker | ||
|
||
mkdir roseCompile | ||
cd roseCompile | ||
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz | ||
tar -xvf jdk-8u131-linux-x64.tar.gz | ||
export JAVA_HOME=/mnt/rosedocker/roseCompile/jdk1.8.0_131 | ||
export JAVA_TOOL_OPTIONS="-Xms2G -Xmx2G" | ||
|
||
cd /home/ipt | ||
|
||
export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/jdk1.8.0_131/jre/lib/amd64/server:/home/ipt/opt/rose-inst/lib | ||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/ipt/opt/rose-inst/bin:/home/ipt/opt/rose-inst/include | ||
|
||
|
||
# To compile the translator in a file called simple_translator.cc | ||
# g++ it.cc -L/home/ipt/opt/rose-inst/lib -I/home/ipt/opt/rose-inst/include \ | ||
# -I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu \ | ||
# -I/usr/include/boost -lboost_system -lrose -lboost_chrono | ||
|
||
|
||
|
||
g++ it.cc -L/home/ipt/opt/rose-inst/lib -I/home/ipt/opt/rose-inst/include \ | ||
-I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu \ | ||
-I/usr/include/boost -lboost_system -lrose -lboost_chrono | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
#!/bin/bash | ||
|
||
cd /mnt/rosedocker/ | ||
|
||
cd /home/ipt/ | ||
ls | ||
cd opt/ | ||
ls | ||
cd rose-inst/ | ||
ls | ||
find . -name "librose" | ||
ls bin/ | ||
cd lib/ | ||
ls | ||
pwd | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD | ||
cho $LD_LIBRARY_PATH | ||
echo $LD_LIBRARY_PATH | ||
gcc | ||
whereis gcc | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/gcc | ||
cd ../ | ||
ls | ||
cd include/ | ||
ls | ||
cd rose/ | ||
ls | ||
cd ../ | ||
pwd | ||
echo $PATH | ||
export PATH=$PATH:/home/ipt/opt/rose-inst/bin | ||
export PATH=$PATH:/home/ipt/opt/rose-inst/include | ||
cd ../../ | ||
cd ../ | ||
vi it.cc | ||
g++ it.cc | ||
g++ it.cc -I/home/ipt/opt/rose-inst/include | ||
g++ it.cc -I/home/ipt/opt/rose-inst/include -I/home/ipt/opt/rose-inst/include/rose | ||
whereis boost | ||
cd /usr/include/boost/ | ||
ls | ||
find / -name "boostlib" | ||
whereis liboost | ||
whereis libboost | ||
whereis libboost-dev | ||
which boost | ||
cd /usr/ | ||
ls | ||
cd lib/ | ||
ls | ||
cd ../share/ | ||
ls | ||
cd boost-build/ | ||
ls | ||
cd src/ | ||
ls | ||
cd ../../boostbook/ | ||
ls | ||
cd /usr/lib/x86_64-linux-gnu | ||
ls | ||
ls | grep "thread" | ||
cd /home/ipt/ | ||
ls | ||
g++ it.cc -I/home/ipt/opt/rose-inst/include -I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu | ||
cd /usr/ | ||
ls | ||
cd include/ | ||
ls | ||
cd boost/ | ||
ls | ||
pwd | ||
cd /home/ipt/ | ||
g++ it.cc -I/home/ipt/opt/rose-inst/include -I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu -I/usr/include/boost | ||
cd /usr/include/boost/system/ | ||
ls | ||
cd /home/ipt/ | ||
g++ it.cc -I/home/ipt/opt/rose-inst/include -I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu -I/usr/include/boost -I/usr | ||
g++ it.cc -I/home/ipt/opt/rose-inst/include -I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu -I/usr/include/boost -lboost_system | ||
g++ it.cc -L/home/ipt/opt/rose-inst/lib -I/home/ipt/opt/rose-inst/include -I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu -I/usr/include/boost -lboost_system | ||
cd /mnt/rosedocker/ | ||
grep -Ril "frontend" . | ||
find . -name "frontend.h" | ||
vi rose/src/rose.h | ||
cd /home/ipt/ | ||
g++ it.cc -L/home/ipt/opt/rose-inst/lib -I/home/ipt/opt/rose-inst/include -I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu -I/usr/include/boost -lboost_system -lrose | ||
g++ it.cc -L/home/ipt/opt/rose-inst/lib -I/home/ipt/opt/rose-inst/include -I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu -I/usr/include/boost -lboost_system -lrose -lboost_chrono | ||
cd /mnt/rosedocker/ | ||
ls | ||
mkdir roseCompile | ||
cd roseCompile | ||
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz | ||
tar -xvf jdk-8u131-linux-x64.tar.gz | ||
export JAVA_HOME=/mnt/rosedocker/roseCompile/jdk1.8.0_131 | ||
export JAVA_TOOL_OPTIONS="-Xms2G -Xmx2G" | ||
export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/jdk1.8.0_131/jre/lib/amd64/server | ||
ls | ||
cd /home/ipt/ | ||
g++ it.cc -L/home/ipt/opt/rose-inst/lib -I/home/ipt/opt/rose-inst/include -I/home/ipt/opt/rose-inst/include/rose -L//usr/lib/x86_64-linux-gnu -I/usr/include/boost -lboost_system -lrose -lboost_chrono | ||
ls | ||
./a.out | ||
./a.out -c input.c | ||
find . -name "librose.so.0" | ||
export OLD_LDP=$LD_LIBRARY_PATH | ||
echo $PWD | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ipt/opt/rose-inst/lib | ||
./a.out -c input.c | ||
vi input.xc | ||
vi input.c | ||
./a.out -c input.c | ||
vi rose_input.c | ||
vi input. | ||
vi input.c | ||
vi rose_input.c | ||
find / -name "librose.a" | ||
history | ||
history | cut -c 8- | ||
|
||
|
||
|
||
|
||
# Things to run | ||
export LD_LIBRARY_PATH=/mnt/rosedocker/roseCompile/jdk1.8.0_131/jre/lib/amd64/server:/home/ipt/opt/rose-inst/lib | ||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/ipt/opt/rose-inst/bin:/home/ipt/opt/rose-inst/include |