How to Build and Run Your Application on Multiple Red Hat Enterprise Linux Releases Dr. Matt Newsome Engineering Manager - Toolchain 06.26.12 1 Red Hat Developer Day – 26 June 2012 v1.0 Red Hat Developer Toolset Dr. Matt Newsome Engineering Manager - Toolchain 06.26.12 2 Red Hat Developer Day – 26 June 2012 Introduction ● Dr. Matt Newsome Engineering Manager, Toolchain team ● ● 3 -> Responsible for toolchains in Fedora and RHEL – GCC compiler suite – – Language-specific runtimes binutils (assembler/linker/etc) – OpenMP – Ancillary tools Development lead for Red Hat Developer Toolset Red Hat Developer Day – 26 June 2012 -> Overview ● ● 4 Red Hat Enterprise Linux Tools ● Available Tools and Status ● Work-in-progress Developer Toolset ● Motivation ● Architecture and Contents ● Lifecycle and Roadmap ● Practicalities / Usage ● Release Information ● Common Questions and Answers ● Questions Red Hat Developer Day – 26 June 2012 Red Hat Enterprise Linux Tools 5 Red Hat Developer Day – 26 June 2012 Tools Reliability and Leadership ● Compilers/Debuggers ● ● ● ● gcc/gdb celebrated 25th anniversary this year Stability and performance to match Tools in major RHEL releases actively supported for 10 years RHEL7 Innovations ● Leading role in ISO C/C++11 Standard Implementation – ● Parallelism and Concurrency Leadership – – ● 6 Notably extensions for guaranteed atomic memory accesses Led gcc Transactional Memory (e.g. Intel Haswell) OpenMP v3.1 gdb: remote debugging capabilities for Cloud deployments Red Hat Developer Day – 26 June 2012 Tools Reliability and Leadership ● Performance Tools in current RHEL 5 and 6 ● ● ● ● application analysis without rebuilding oprofile – unobtrusive, system-wide code profiler valgrind – runtime analysis (particularly memory) RHEL7 ● ● ● 7 systemtap – live systemtap enhancement – remote instrumentation pcp – new tool for system monitoring dyninst – new library for runtime code-patching Red Hat Developer Day – 26 June 2012 Tools Reliability and Leadership ● Eclipse IDE in RHEL6 ● ● ● ● RHEL7 Timeframe (Currently planning) ● ● ● ● 8 Unifies other tools in Integrated Development Environment Best-in-class editor, code management features C/C++ Development for i686 and x86_64 Eclipse releases via new initiative Update to Eclipse 4.2 and Juno (June 2012) stack Red Hat leading profiling tools unification Support for remote C/C++ debug and profiling Red Hat Developer Day – 26 June 2012 Toolchain Support ● Current Toolchains: ● ● ● 10 year RHEL lifecycle ● ● ● 9 RHEL5: gcc-4.1 (2006), gcc-4.4 (2009) RHEL6: gcc-4.4 (2009) High Stability Very limited access to newer GCC releases & features ...but our customers also want newer tools on older RHEL! Red Hat Developer Day – 26 June 2012 Red Hat Developer Toolset 10 Red Hat Developer Day – 26 June 2012 High-Level Summary ● ● ● 11 What is it? ● An extra set of up-to-date developer tools ● Tools run on RHEL x and RHEL x+1 ● Apps developed on RHEL x will work on RHEL x and x+1 How do I get it? ● Through Red Hat Developer Subscriptions ● Through Partner Programs When is it available? ● Announced today ● General Availability to subscribers today Red Hat Developer Day – 26 June 2012 What is the Developer Toolset? ● More recent developer tools than those in RHEL ● Does not replace RHEL system tools ● First release of new offering ● 12 ● C/C++ only ● i686/x86_64 only ● First released software built on Software Collections (more later) ● Additional Developer Toolset features will be added over time Libraries ● Most libraries re-used from base RHEL system ● Some newer features statically linked (more later) ● No need to install special libraries for built applications Red Hat Developer Day – 26 June 2012 Why Offer a Developer Toolset? ● ● Single most common request from customers, partners, ISVs More options for developers ● ● Build and execution on both RHEL x and RHEL x+1 (e.g. RHEL 5 and 6) Increased productivity and lower operating costs – Lower development cost (one compiler version) – Lower QA cost ● ● 13 Build once Easier to qualify on multiple RHEL releases Red Hat Developer Day – 26 June 2012 Developer Toolset – Toolchain Implications (1) ● 14 Application Sources Build Branched Sources Build gcc x gcc y Deploy Deploy RHEL 5 RHEL 6 RHEL system toolchain ● Multiple versions of gcc ● Varying features ● Different source branches for different gcc versions Red Hat Developer Day – 26 June 2012 Developer Toolset – Toolchain Implications (2) Application Sources x.1 Sources Sources Sources x.2 Build gcc x.1 gcc x gcc gcc x.2x gcc x.3 Build gcc y.1 gcc x gcc gcc y.2x gcc y.3 Sources x.3 Branch App Sources y.1 Sources Sources Sources y.2 Sources y.3 ● 15 Deploy Deploy RHEL 5.6 RHEL 5 RHEL 5 RHEL 5.8 RHEL 5.9 RHEL 6.0 RHEL 5 RHEL 5 RHEL 6.1 RHEL 6.2 etc. RHEL system toolchain ● Issues compounded by multiple simultaneous minor releases ● gcc on supported minor releases kept in sync periodically ● But developers may prioritize minor versions differently ● Result: higher development and testing costs Red Hat Developer Day – 26 June 2012 Developer Toolset – Toolchain Implications (3) Single set of sources ● Deploy RHEL 6 (all supported minor releases) Developer Toolset gcc ● Single version of gcc on all supported RHEL5, RHEL6 ● Feature parity, all at the same patch level ● 16 Build Single, up-to-date gcc on multiple RHEL major and minor releases RHEL 5 (all supported minor releases) Can deploy exact same application binaries to multiple supported major and minor RHEL releases ● No need for extra libraries with your application ● Result: reduced development and testing costs Red Hat Developer Day – 26 June 2012 What’s in the Developer Toolset? ● v1.0 ● gcc-4.7: C/C++ Compilers & Associated Runtimes ● gdb-7.4: C/C++ debugging ● binutils-2.22: x86/x86_64 assembler, linker, etc. ● Software Collection .rpm’s for RHEL6 and RHEL5 ● ● v1.1 ● ● 17 All components are already in Fedora 17, planned for future RHEL Additional low level tools in ~6 months Eclipse, other languages and higher level tools in the future Red Hat Developer Day – 26 June 2012 RHEL Software Collections ● What are Software Collections? ● ● ● ● 18 Structural definition for an application or toolset that is independent of the OS Installed outside the normal hierarchy for RHEL native components (but still compliant with FHS) Installs additional applications ● /opt/<vendor>/... ● Allows multiple versions to be co-installed ● Each major app version gets a different file system root ● scl script used to activate (PATH, LDCONFIG, etc.) Application lifecycles are independent of RHEL Red Hat Developer Day – 26 June 2012 Developer Toolset is a Software Collection RHEL x.y System toolchain / usr bin gcc lib libc.so etc. Developer Toolset Toolchain etc. opt rh root enable usr bin gcc etc. Internal script invoked via “scl” utility 19 ● Separate tools, not default ● Only enabled by deliberate invocation (more later) Red Hat Developer Day – 26 June 2012 Toolset Life Cycle ● Separate product from RHEL – independent release cycle ● Major release once per year ● ● Support current and n-1 versions ● ● ● 20 New gcc release (Spring) + 1 Fedora Release (Summer) Effectively 2 years of support Minor release after 6 months ● Patches from upstream ● New components can be added Ad hoc (“z-stream”) updates for serious bugs Red Hat Developer Day – 26 June 2012 Being Considered for Developer Toolset v1.1 ● Fortran language support will be added ● New tools: ● elfutils - utilities and libraries to handle compiled objects ● systemtap - live application analysis without rebuilding ● valgrind - runtime analysis (particularly memory) ● oprofile - unobtrusive, system-wide code profiler ● pcp - system monitoring and management Being Considered for Later Developer Toolset Releases 21 ● Eclipse ● Others TBC Red Hat Developer Day – 26 June 2012 Practicalities 22 Red Hat Developer Day – 26 June 2012 Usage ● ● Installation ● Usual .rpm installation process after subscribing to channel ● (yum install devtoolset-1.0) Simple usage scl enable devtoolset-1.0 'gcc -g helloworld.c -o helloworld' scl enable devtoolset-1.0 'gdb helloworld' ● More advanced usage scl enable devtoolset-1.0 'bash' (gcc/gdb/etc. now use toolset versions, not RHEL defaults) ● Eclipse scl enable devtoolset-1.0 'eclipse' (launches Eclipse with toolset gcc/gdb for build/debug) ● 23 Normal gcc/gdb after this point Red Hat Developer Day – 26 June 2012 Under the Hood 24 Red Hat Developer Day – 26 June 2012 How does it work? ● Toolset rpm includes /opt/rh/devtoolset-1.0/enable ● Script simply prefixes PATH: ● ● /opt/rh/devtoolset-1.0/root/usr/bin:$PATH ● (and adds some environment variables) Alternatives ● 25 /opt/rh/etc/alternatives/... Red Hat Developer Day – 26 June 2012 Linkage ● ● ● Most libraries linked dynamically for you from base RHEL ● All of C Library (glibc - libm, libc, etc) ● All of OpenMP (libgomp) ● Most of libstdc++ ● Most of libgcc What about newer features? C++11 library contents? ● Newer features in gcc-4.7 than in gcc-4.1/4.4 in RHEL5/6 ● These parts statically linked for you into your application But statically linked code == bad! ● 26 True, let's dig deeper... Red Hat Developer Day – 26 June 2012 Security 27 Red Hat Developer Day – 26 June 2012 Security Implications (1) Traditional RHEL Application symbol symbol symbol symbol dynamic linkage libstdc++ (C++ Library) ● 28 V2 glibc (C Library) libgcc (conversions, etc.) libgomp (OpenMP) RHEL Toolchain ● Dynamic linkage ● Security updates and bugfixes resolved by normal errata Red Hat Developer Day – 26 June 2012 Security Implications (2) Same Application Built with Developer Toolset symbol symbol symbol symbol dynamic linkage libstdc++ (C++ Library) ● 29 v2 glibc (C Library) libgcc (conversions, etc.) libgomp (OpenMP) Developer Toolset Works Similarly ● Dynamic linkage for most symbols ● Security updates and bugfixes resolved by normal errata ● But... Red Hat Developer Day – 26 June 2012 Archive of newer libstdc++ symbols (.a) Security Implications (3) static linkage Application Built with Developer Toolset symbol symbol symbol symbol .o newer symbol .o newer symbol dynamic linkage v2 libstdc++ (C++ Library) ● 30 v2 glibc (C Library) libgcc (conversions, etc.) libgomp (OpenMP) Developer Toolset Statically Links Newer Symbols ● Dynamic linkage for most symbols ● Static linkage for symbols newer than base RHEL libraries ● Carried in application to avoid carrying extra libraries Red Hat Developer Day – 26 June 2012 Security Implications (4) Archive of newer libstdc++ symbols (.a) REBUILD Application Built with Developer Toolset symbol symbol symbol symbol .o newer symbol .o newer symbol Rebuild required to remove bugs ● 31 Developer Toolset Statically Links Newer Symbols ● Bugs in statically linked objects require rebuild to resolve ● But... – Risk is very low – Security errata will inform you if you need to rebuild Red Hat Developer Day – 26 June 2012 Common Questions 32 Red Hat Developer Day – 26 June 2012 Common Questions (1) ● How do I make Developer Toolset gcc/gdb the default? scl enable devtoolset-1.0 'bash' (with caution) ● ● 33 Will my apps run on RHEL7? ● We intend RHEL6 apps to run fine on RHEL7 ● But nothing to announce today How do I use Developer Toolset gcc to...X? ● scl enable devtoolset-1.0 '<X>' solves most of these ● Should be easy to integrate into build systems Red Hat Developer Day – 26 June 2012 Common Questions (2) ● Which RHEL versions can I run toolset on? ● Which RHEL versions can I run toolset-built apps on? [Unreleased versions are planned, subject to change] 34 Red Hat Developer Day – 26 June 2012 Common Questions (3) ● ● What do gcc-4.7, etc give me as a developer? ● User guide summarizes main new features ● Includes fine details on changes from RHEL5/6 gcc Headline Features ● ● ● 35 C++11 Language Standard – Leading compiler implementation – Atomic extensions for guaranteed atomic access to memory – Memory model for clearer semantics Transactional Memory – Software implementation in gcc-4.7 – Intel announced Hardware TM extensions OpenMP v3.1 Red Hat Developer Day – 26 June 2012 Common Questions (4) ● Gotchas and issues? ● ● 36 Release notes spell these out Main ones to be aware of ● C++11, TM are experimental, use with caution or use C++98 ● Some base RHEL errata are required for all features ● Forwards only (don't build on RHEL6 and run on RHEL5) ● Forwards only (don't build on rhel-5.8 and run on rhel-5.6) ● Intended for userland development, not kernel rebuilding ● RHEL5 doesn't understand newer DWARF, use switches ● RHEL5 lacks some RHEL6 rpm features; we're investigating Red Hat Developer Day – 26 June 2012 Common Questions (5) ● How can I download Red Hat Developer Toolset? ● 37 Good question... Red Hat Developer Day – 26 June 2012 Accessing Red Hat Developer Toolset 38 Red Hat Developer Day – 26 June 2012 How do I get the Developer Toolset? ● Developer Toolset and Software Collections ● ● Existing Red Hat Enterprise Linux Subscribers: ● ● ● You may procure a Red Hat Developer Workstation, priced the same as a RHEL Workstation. Contact your sales rep to purchase or convert an exiting subscription. In the mean time – The Developer Toolset is available on the bottle opener usb stick or via FTP If you are not a RHEL subscriber, you may procure: ● ● ● ● 39 Being announced and released today Red Hat Developer Workstation Red Hat Developer Subscriptions Red Hat Developer Suite Red Hat Enterprise Linux NFR Red Hat Developer Day – 26 June 2012 Developer Suite ● ● 40 RHEL Server ● Developer Toolset ● Up to 8 sockets ● Smart Management ● Unlimited virtual guests ● MRG Real-time Features ● High availability ● Load balancer ● Resilient storage ● Scalable filesystems ● High-performance networking ● Extended User Support Red Hat Developer Day – 26 June 2012 RHEL Developer Offerings Developer Suite Developer Support Subscription RHEL Developer Workstation (Self Support) Professional RHEL Enterprise Professional Enterprise 1 25 Developer Suites 1 Developer Suite Add on's 1 of each 25 of each 1 of each Support Self Support SLA None Developer Support 2 business days Developer Toolset Sockets 41 4 business hours 2 business days 4 business hours Included 8 Red Hat Developer Day – 26 June 2012 2 Subscribing to the Developer Toolset Channel (1) ● Subscribing to a RHEL Channel https://access.redhat.com/knowledge/solutions/11312 ● 42 Access RHN Channels Red Hat Developer Day – 26 June 2012 Subscribing to the Developer Toolset Channel (2) ● 43 Child channel of RHEL5 or RHEL6 Red Hat Developer Day – 26 June 2012 Subscribing to the Developer Toolset Channel (3) ● 44 Subscribe Target Systems Red Hat Developer Day – 26 June 2012 TEST Deploy: - No special steps required Support: Subscribe: - Login on web portal - Subscribe to Toolset RHEL channel Install RPMs on RHEL: BUILD - yum install devtoolset-1.0 - Read user guide / release notes Compile: - scl enable devtoolset-1.0 'gcc' Debug: - scl enable devtoolset-1.0 'gdb' 45 Test: - QA app on target RHEL versions DEPLOY - Developer Workstation - Developer Subscriptions - Developer Suite - RHEL NFR SUPPORT Procure Toolset subscription: DEBUG INSTALL SUBSCRIBE PROCURE Developer Toolset v1.0 Workflow - Toolset components supported in the same way as RHEL gcc/gdb - FAQs and Documentation on portal - Support groups for extra info Red Hat Developer Day – 26 June 2012 Links ● Resources ● Developer Program ● ● Developer Toolset Docs ● 46 http://red.ht/rheldevelop http://red.ht/devToolset Red Hat Developer Day – 26 June 2012 Links ● Main Link: Red Hat Developer Toolset 1.0 User Guide https://docs.redhat.com/docs/en-US/Red_Hat_Developer_Toolset/1.0/html-single/User_Guide/index.html ● Red Hat Developer Toolset 1.0 Release Notes https://docs.redhat.com/docs/en-US/Red_Hat_Developer_Toolset/1.0/html-single/Release_Notes/index.html ● Red Hat Software Collections Guide https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Software_Collections_Guide/index.html ● Red Hat Enterprise Linux 6 ● Developer Guide https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/index.html ● Installation Guide https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/index.html ● Deployment Guide https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/index.html ● Support https://docs.redhat.com/docs/en-US/Red_Hat_Developer_Toolset/... 47 Red Hat Developer Day – 26 June 2012 Questions 48 Red Hat Developer Day – 26 June 2012 References ● Related Talks / Demos: ● Developer Day: Developer Day Talk – Video will be posted online – Secure Development Practices (1pm Eastern, Room 304) – Packaging and Software Collections (1pm Eastern, Room 302) – Parallelism & Concurrency (2pm Eastern, Room 304) Summit – ● – – 49 RHEL Roadmap Presentation (Weds 3:40pm; part 2 from 4:50pm) Demos in the Developer Zone (Tues PM, Weds, Thurs) Red Hat Developer Day – 26 June 2012 Contacts ● General questions, thoughts, etc. ● ● ● [email protected] Red Hat Developer Program ● Mike Guerette ([email protected]) ● Langdon White ([email protected]) Red Hat Developer Toolset ● Product Manager – ● Engineering Lead – 50 Brian Gollaher ([email protected]) Matt Newsome ([email protected], @dev_tools on Twitter) Red Hat Developer Day – 26 June 2012 SEE US AT SUMMIT Visit us at Developer Zone! FOLLOW US ON TWITTER twitter.com/#!/RHELdevelop PLAY US ON YOUTUBE bit.ly/RHELdevOnYouTube LEARN & SHARE AT red.ht/rheldevoug GIVE US FEEDBACK [email protected] 51
© Copyright 2024