Coder Social home page Coder Social logo

dockpack / base_boost Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 1.0 76 KB

🅱️ Ansible role for to install/compile Boost C++ libraries on Linux and Windows.

License: MIT License

Makefile 60.54% Jinja 39.46%
developer-tools boost-libraries gcc-compiler cplusplus-11 cplusplus-14 cplusplus-17 hacktoberfest redhat windows libraries rhel7 rhel8 centos

base_boost's Introduction

GalaxyBuild Status

base_boost is an ansible-role that installs libraries for GNU C++ compiler tools

Requirements

RHEL-like system, or Ubuntu, or Windows.

Role Variables

  • Corporate feature: toggles desired state compilers_present: present

  • Software collections offer latest versions of programming languages. Set to true also for using the gcc-toolkit on Centos8. collections_enabled: true

  • approved/test release of software collections' devtoolset cplusplus_devtoolset: devtoolset-7

Most Boost libraries are header-only: they consist entirely of header files containing templates and inline functions, and require no separately-compiled library binaries or special treatment when linking. Yet this role does compile libraries, but you can override that behaviour if you like:

compile_boost: true

The only Boost libraries that must be built separately, and have no extra documentation to compile, are set as default (override them in group_vars or your playbook):

compile_boost_with:
  --with-chrono
  --with-context
  --with-filesystem
  --with-graph_parallel
  --with-iostreams
  --with-locale
  --with-program_options
  --with-regex
  --with-serialization
  --with-signals
  --with-system
  --with-thread
  --with-timer
  --with-wave

# # boost_cflags valuse for windows

/DFOO - define FOO in the preprocessor
/EHsc - catch C++ exceptions, assume extern "C" functions never throw C++ exceptions
/GR - enable RTTI
/MD - make a multithreaded DLL
/MDd - make a debug multithreaded DLL
/O1 - optimize for size
/O2 - optimize for speed
/Ob0 - no auto-inlining
/Ob1 - only inline functions that are marked inline, and C++ member functions defined in a class declaration
/Ob2 - let compiler inline freely
/Od - no optimization
/RTC1 - run-time checking: report when a variable is used without being initialized, and stack frame run-time error checking. See their site for more details.
/W3 - use warning level 3 (out of 4), “production quality”
/Zi - generate “complete debugging information”, like -g for clang/gcc

Dependencies

https://www.softwarecollections.org/en/docs/

Example Usage

Refer to a complete build server https://github.com/bbaassssiiee/buildserver

License

MIT

Author Information

Bas Meijer @bbaassssiiee

base_boost's People

Contributors

bbaassssiiee avatar dependabot[bot] avatar jkhoogland avatar wabscale avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

wabscale

base_boost's Issues

download bzip2 source timeout problem

Retry handler needs another look:

    docker: TASK [dockpack.base_boost : download bzip2 source] *****************************
    docker: Saturday 30 November 2019  08:25:50 -0500 (0:00:00.089)       3:43:48.341 *****
    docker: FAILED - RETRYING: download bzip2 source (10 retries left).
    docker: FAILED - RETRYING: download bzip2 source (9 retries left).
    docker: FAILED - RETRYING: download bzip2 source (8 retries left).
    docker: FAILED - RETRYING: download bzip2 source (7 retries left).
    docker: FAILED - RETRYING: download bzip2 source (6 retries left).
    docker: FAILED - RETRYING: download bzip2 source (5 retries left).
    docker: FAILED - RETRYING: download bzip2 source (4 retries left).
    docker: FAILED - RETRYING: download bzip2 source (3 retries left).
    docker: FAILED - RETRYING: download bzip2 source (2 retries left).
    docker: FAILED - RETRYING: download bzip2 source (1 retries left).
    docker: fatal: [127.0.0.1]: FAILED! => changed=false 
    docker:   attempts: 10
    docker:   dest: /tmp/
    docker:   elapsed: 10
    docker:   gid: 0
    docker:   group: root
    docker:   mode: '01777'
    docker:   msg: 'Request failed: <urlopen error (''_ssl.c:602: The handshake operation timed out'',)>'
    docker:   owner: root
    docker:   size: 136
    docker:   state: directory
    docker:   uid: 0
    docker:   url: https://www.sourceware.org/pub/bzip2/bzip2-1.0.6.tar.gz

cleanup of build artefacts

After the installation of the boost libraries, in /usr/local/{include,lib} the folder /usr/local/src/boost_VERSION containing the boost library build artefacts should be removed. It is not necessary anymore.

Removing this from the image will save substantial of space on the image.

[vola@dbdadcadc07d ~]$ du -hs /usr/local/src/boost_1_72_0/
791M /usr/local/src/boost_1_72_0/

zlib download has no retry

After compiling GCC my build failed because the zlib source download had not retry...

    virtualbox-iso: TASK [dockpack.base_boost : unarchive zlib source] *****************************
    virtualbox-iso: Tuesday 28 May 2019  23:48:53 -0400 (0:00:00.313)       3:42:45.091 ***********
    virtualbox-iso: fatal: [127.0.0.1]: FAILED! => changed=false
    virtualbox-iso:   msg: 'Failure downloading http://zlib.net/zlib-1.2.11.tar.gz, Request failed: <urlopen error timed out>'
    virtualbox-iso:
    virtualbox-iso: PLAY RECAP *********************************************************************
    virtualbox-iso: 127.0.0.1                  : ok=81   changed=45   unreachable=0    failed=1    skipped=29   rescued=0    ignored=0
    virtualbox-iso:
    virtualbox-iso: Tuesday 28 May 2019  23:49:05 -0400 (0:00:11.527)       3:42:56.618 ***********
    virtualbox-iso: ===============================================================================

    virtualbox-iso: Playbook run took 0 days, 3 hours, 42 minutes, 56 seconds
==> virtualbox-iso: Deregistering and deleting VM...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error executing Ansible: Non-zero exit status: 2

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error executing Ansible: Non-zero exit status: 2

==> Builds finished but no artifacts were created.
make: *** [packer] Error 1

[ANSIBLE DEPRECATION WARNING]: The parameter "sha256sum" has been deprecated

TASK [base_boost : download Boost sources] *************************************

[DEPRECATION WARNING]: The parameter "sha256sum" has been deprecated and will

be removed, use "checksum" instead. This feature will be removed from ansible-

base in version 2.14. Deprecation warnings can be disabled by setting

deprecation_warnings=False in ansible.cfg.

ansible-lint errors

[208] File permissions not mentioned
base_boost/tasks/main.yml:17
Task/Handler: copy goss tests template

[208] File permissions not mentioned
base_boost/tasks/main.yml:72
Task/Handler: unarchive zlib source

[208] File permissions not mentioned
base_boost/tasks/main.yml:115
Task/Handler: unpack bzip2 source

[208] File permissions not mentioned
base_boost/tasks/main.yml:204
Task/Handler: unpack Boost sources

[204] Lines should be no longer than 160 chars
base_boost/tasks/main.yml:300
  shell: "{{ cmd_env | default('') }} ./b2 -j{{ ansible_processor_vcpus }} {{ boost_properties }} variant={{ boost_variant }} cflags='{{ boost_cflags }}' cxxflags='{{ boost_cxxflags }}' \

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.