| FROM centos:centos6 AS base-dependencies |
| |
| # Install Development Environment |
| RUN yum groupinstall -y "Development Tools" |
| RUN yum install -y wget git |
| RUN yum -y install centos-release-scl && \ |
| yum -y install devtoolset-8 devtoolset-8-libatomic-devel |
| RUN wget https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.sh && \ |
| chmod +x cmake-3.14.0-Linux-x86_64.sh && \ |
| ./cmake-3.14.0-Linux-x86_64.sh --skip-license --prefix=/usr/local |
| |
| # Install epel repo |
| RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm |
| RUN yum install -y epel-release-latest-6.noarch.rpm |
| |
| # Install dev and runtime dependencies |
| RUN yum install -y tcl-devel tcl tk libstdc++ tk-devel |
| |
| ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc \ |
| CPP=/opt/rh/devtoolset-8/root/usr/bin/cpp \ |
| CXX=/opt/rh/devtoolset-8/root/usr/bin/g++ \ |
| PATH=/opt/rh/devtoolset-8/root/usr/bin:$PATH \ |
| LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:$LD_LIBRARY_PATH |
| |
| # build boost |
| RUN wget http://downloads.sourceforge.net/project/boost/boost/1.67.0/boost_1_67_0.tar.gz \ |
| && tar xfz boost_1_67_0.tar.gz \ |
| && rm -f boost_1_67_0.tar.gz \ |
| && cd boost_1_67_0 \ |
| && ./bootstrap.sh --prefix=/usr --with-libraries=program_options,log,filesystem \ |
| && ./b2 install -j $(nproc) |
| # Install python dev |
| RUN yum install -y https://centos6.iuscommunity.org/ius-release.rpm && \ |
| yum update -y && \ |
| yum install -y python36u python36u-libs python36u-devel python36u-pip |
| |
| RUN yum remove -y swig \ |
| && yum install -y pcre-devel \ |
| && wget https://github.com/swig/swig/archive/rel-3.0.12.tar.gz \ |
| && tar xfz rel-3.0.12.tar.gz \ |
| && rm -rf rel-3.0.12.tar.gz \ |
| && cd swig-rel-3.0.12 \ |
| && ./autogen.sh && ./configure --prefix=/usr && make -j $(nproc) && make install |
| |
| RUN yum install -y http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm |
| RUN yum install -y git |
| RUN ls |
| #RUN git clone --recursive --branch debug https://github.com/kareefardi/OpenROAD-1 |
| #WORKDIR /OpenROAD-1/ |
| RUN git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD |
| WORKDIR /OpenROAD/ |
| #RUN git checkout eec88b45b938e8cff79d7701311546d9f7a49523 |
| |
| # Build |
| RUN mkdir build && mkdir -p /build/version && mkdir install |
| RUN cd build && cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/install .. && make -j$(nproc) |
| RUN cd build && make install |
| RUN cp -r build/install/bin /build/ |
| |
| |
| RUN date +"Build Timestamp: %Y-%m-%d_%H-%M-%S" > /build/version/openroad.version |
| RUN git rev-parse HEAD >> /build/version/openroad.version |
| RUN tar -czf /build.tar.gz /build |
| |