LibreOffice and IDEs Bjoern Michaelsen

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
CODING Research Data Management. Research Data Management Coding When writing software or analytical code it is important that others and your future.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
This chapter is extracted from Sommerville’s slides. Text book chapter
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
CSnake C++ build automation based on CMake and Python Maarten Nieber, 2009.
 To explain the importance of software configuration management (CM)  To describe key CM activities namely CM planning, change management, version management.
End HomeWelcome! The Software Development Process.
Configuration Management (CM)
Distribution After Release Tool Natalia Ratnikova.
Installing CompuCell3D from source Maciej Swat Biocomplexity Institute, Indiana University.
CMake refactoring P. Hristov 19/03/2014. History I  Recursive makefiles (F.Carminati):  Problems in dependencies  Slow  "Recursive Makefiles.
Developing software and hardware in parallel Vladimir Rubanov ISP RAS.
Rational Unified Process Fundamentals Module 5: Implementing RUP.
SONIC-3: Creating Large Scale Installations & Deployments Andrew S. Neumann Principal Engineer, Progress Sonic.
Presentation Name / 1 Visual C++ Builds and External Dependencies NAME.
SONIC-3: Creating Large Scale Installations & Deployments Andrew S. Neumann Principal Engineer Progress Sonic.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
1 Chapter 12 Configuration management This chapter is extracted from Sommerville’s slides. Text book chapter 29 1.
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
CMake: Experience in ALICE P. Hristov 19/06/12. History I Recursive makefiles (F.Carminati): – Problems in dependencies – Slow "Recursive Makefiles.
Software development tools
Sitecore upgrades The Past, The Present, The Future.
CMake - Cross-Platform Make R. Douglas Barbieri Made to Order Software Corporation.
LibreOffice IDE integration
Introduction to CMake, v. 2
Layercake: From UNO code to Writer Core
LibreOffice and IDEs Bjoern Michaelsen
If it’s not automated, it’s broken!
INTRO. To I.T Razan N. AlShihabi
gbuild: State of the LibreOffice build system
BASIS Quick Start Guide
Build and Test system for FairRoot
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
Online Database Work Overview Work needed for OKS database
Building Bridges CS 3700 Project 2.
CMS DCS: WinCC OA Installation Strategy
Goals Give you a feeling of what Eclipse is.
Chapter 18 Maintaining Information Systems
The Systems Engineering Context
Computer System and Programming
Community RE Report from the Bleeding Edge
Application images and atomic updates
课程名 编译原理 Compiling Techniques
Building Bridges CS 3700 Project 2.
Fedora in Education BalCCon2k17 17th September 2017 Nemanja Milošević
Bibisect on Demand Bjoern Michaelsen
Embedded Linux Conference - April 2009
Modelling and Extracting the Build-Time Architectural View
Design, prototyping and construction
HP Quality Center 10 Hottest Features and Project Harmonization
Compiler Construction
Design and Programming
Cmake Primer.
CIS16 Application Development – Programming with Visual Basic
Software life cycle models
ABHISHEK SHARMA ARVIND SRINIVASA BABU HEMANT PRASAD 08-OCT-2018
Electronics II Physics 3620 / 6620
Overview Unit testing Building Version control.
Chapter 7 –Implementation Issues
Agile testing for web API with Postman
Bringing more value out of automation testing
An Inventory That Updates Itself
OBJECT ARCHITECTURE DESIGN
Developing and testing enterprise Java applications
Configuration management
Carthage ios 8 onwards Dependency manager that streamlines the process of integrating the libraries into the project.
Design, prototyping and construction
Plug-In Architecture Pattern
Presentation transcript:

LibreOffice and IDEs Bjoern Michaelsen LibreOffice Ubuntu Package Maintainer bjoern.michaelsen@canonical.com Deputy Member, Board of Directors, the Document Foundation bjoern.michaelsen@documentfoundation.org

OLD

Build Environment Effort: Goals OLD Build Environment Effort: Goals Create a compelling, user friendly build experience by making building OOo less complex, stable and faster Concrete goals: Improve the build performance Make the build reliable even for non-experts Better support for execution of tests in the build Create runnable office in the build LibreOffice and IDEs

OLD A Way to Do It Better? Problems in the current system manual dependencies incompatible builds scalability TIMTOWTDI Consequences broken dependencies horizon effects build segmentation bad quality of makefiles LibreOffice and IDEs

Requirements for a new Build System OLD Requirements for a new Build System Scalability/Parallelization Lean dependencies No custom tooling Full dependencies Easy to use Code quality Multiple repository support

GNU Make Build System: NoOp Performance OLD GNU Make Build System: NoOp Performance build.pl GNU Make Modules: framework, sfx2, svl, svtools, sw, toolkit, tools, xmloff

Dont repeat yourself (DRY) In software engineering, don't repeat yourself (DRY) is a principle of software development, a principle aimed at reducing repetition of information of all kinds, especially useful in multi-tier architectures. The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." – Wikipedia on DRY – Wikipedia on DRY, again LibreOffice and IDEs

Dont repeat yourself (DRY) To add a library to LibreOffice now: Add a build description Register in Repository.mk To add a library in LibreOffice 3.3: Add a build description Register in solenv, and explain among other things: The rpaths of the library The name of the library for others to link against it Possible add files to explain which symbols the library should export Add to deliver.lst Add to scp2, and explain: where the library will end up in a installation LibreOffice and IDEs

TIMTOWTDI, read-only code and consistency “There is more than one way to do it!” “... but to read the code, you have to know them all!” Whenever the C++ language designers had two competing ideas as to how they should solve some problem, they said, “OK, we’ll do them both”. So the language is too baroque for my taste. — Donald Knuth LibreOffice and IDEs

TIMTOWTDI, read-only code and consistency To export a symbol in LibreOffice now: Add ${LIBNAME}_DLLPUBLIC to the declaration To export a symbol in LibreOffice 3.3: It depends. You might need to add ${LIBNAME}_DLLPUBLIC to the declaration. Alternatively, you might need to add the platform-dependent mangled name of the symbol to a export file and hope that the little Perl script of ours unmangles and remangles the symbol name right on all platforms. Possibly you need to do both. Or something completely different. LibreOffice and IDEs

TIMTOWTDI, read-only code and consistency Where is my Library in LibreOffice now? In instdir in exactly the place where it would end up in an installation (the same file is also hardlinked from workdir/) Where is my Library in LibreOffice 3.3: In solver/${something}/lib Possibly also in ${module}/${something}/lib Possibly also in workdir/ Finally also in an installation dir Which cant be incrementally updated Thus it always needs to be cleared completely and then repopulated completely by scp2, which is slow and not part of the default build LibreOffice and IDEs

GNU make prototype: example OLD GNU make prototype: example We started with looking at the saving process using Cachegrind and vTunes as we had some leftovers from the last performance improvement activities. Besides that: documents are more often saved than loaded. Before carrying out large implementations we want to investigate the loading process in a similar way. String indexed access: several things are discussed, e.g. tolerant propertysets, property lists, Fastparser, auto styles, type safe attribute APIs instead of properties. Besides some areas we already tackled, the profiling data does not show obviously wasted time, it seems that we must optimize on a larger scale. So now we are looking on those parts who take most of the time as any wins in these parts should have the largest impact of the overall performance. LibreOffice and IDEs

Thanks to everyone working on gbuild! LibreOffice and IDEs

IDE integration make kdevelop-ide-integration see: https://wiki.documentfoundation.org/Development/BuildingOnLinux LibreOffice and IDEs

gbuild-to-ide (first implementation) ran another “make -np” needed a full build make output turned out to be quite inconsistent over releases result: flaky LibreOffice and IDEs

gbuildtojson a “fake platform” does not need a full build creates stable JSON output in WORKDIR JSON files are then used to create IDE solutions LibreOffice and IDEs

IDEs KDevelop (me, various) Building, Debugging, Code Completion Visual Studio (Honza Havlocek, various) Xcode (Jan, initial work by Tor) Building Debugging, Code Completion (?) Vim & YouCompleteMe (Moggi) Building, Code Completion QtCreator, Eclipse ... LibreOffice and IDEs

The abyss gazing back Wer mit Ungeheuern kämpft, mag zusehn, dass er nicht dabei zum Ungeheuer wird. Und wenn du lange in einen Abgrund blickst, blickt der Abgrund auch in dich hinein. – Nietzsche, Jenseits von Gut und Boese He who fights with monsters should look to it that he himself does not become a monster. And if you gaze long into an abyss, the abyss also gazes into you. LibreOffice and IDEs

The abyss gazing back LibreOffice and IDEs

The abyss gazing back LibreOffice and IDEs

Current Build System: Problems OLD Current Build System: Problems Parallelization Full dependencies module borders “compatible builds” Cargo cult programming in makefiles Source tree is not read-only Lots and lots of process instantiations Too many tools for the same job Maintenance of “homegrown” tools No DRY because we ignored preventing TIMTOWTDI

“native build” – challenges Having multiple sources of Truth sucks Having multiple build systems requires syncing Having autogenerated intermediates sucks Custom Targets Degrees of Freedom in Config LibreOffice and IDEs

“this is not an exit” – replacing gbuild Configuration Checks: Cmake High Level Build Description: Cmake, GNU make & guile Build Execution/Driver: ninja LibreOffice and IDEs

Contact me http://skyfromme.wordpress.com Sweetshark on #libreoffice-dev/#libreoffice-qa on freenode Sweet5hark on twitter

Agenda Recursive make considered harmful Dont repeat yourself (DRY) TIMTOWTDI, read-only code and consistency LibreOffice and IDEs

gbuild solenv/gbuild solenv/gbuild/platform solenv/gbuild/extensions ${MODULE}/*.mk LibreOffice and IDEs

Recursive make considered harmful To build LibreOffice now: make To build sw in LibreOffice now make sw To build LibreOffice in 3.3: Execute a bash source *Env.Set.sh cd instsetoo_native build --all -P8 -- -P8 To build sw in LibreOffice 3.3: cd sw build -P8 -- -P8 deliver LibreOffice and IDEs

Recursive make considered harmful Current speed hacks: Concat-deps tiny native C program creates one dependency file per library less files to open for make removes duplicates and cruft along the way creates the initial (empty) per object dependency files this speeds up the build on Windows by 10 minutes (mostly independent of hardware) Only relink libraries on public API change Instdir: drive-by populating a relocatable runnable instance LibreOffice and IDEs

Recursive make considered harmful Further speed hacks (work in progress): Depcache Based on unpatched upstream GNU make 4.0: libswlo.so dependency file: Reading simple include: 1.038s Reading cached file: 0.257s (>400% speedup) VPATH – the undiscovered country LibreOffice and IDEs

TIMTOWTDI, read-only code and consistency Apropos scp2, this is WIP: We want to kill it with fire (announced by Michael Stahl on the LibreOffice conference, Milan) Now that we have an installation populated during the build, install directly from there Less differences between what developers see in their builds and what ends up at the user And one copy less even for packagers Status quo: We can now build and package localization independently (shipped with LibreOffice 4.2) There is initial work for doing the same with the binary packages too. LibreOffice and IDEs

Recursive make considered harmful No phony tmpfs 350MB workdir/Dep/LinkTarget tmpfs 5.9GB workdir/ tmpfs 5.9GB workdir/ include/ LibreOffice and IDEs

Recursive make considered harmful “This paper explores an number of problems regarding the use of recursive make, and shows that they are all symptoms of the same problem. Symptoms that the UNIX community have long accepted as a fact of life, but which need not be endured any longer. These problems include recursive makes which take ``forever'' to work out that they need to do nothing, recursive makes which do too much, or too little, recursive makes which are overly sensitive to changes in the source code and require constant Makefile intervention to keep them working.” – Peter Miller, 1997 http://miller.emu.id.au/pmiller/books/rmch/ LibreOffice and IDEs

Recursive make considered harmful What we did back in a LibreOffice 3.3 release build: Call autogen.sh (which as you suspect is a Perl script) Which calls autoconf to generate ./configure Which configures a patchsystem and prepares a second inner ./configure Call make Which unpacks the source Which patches the source Which call the second (inner) ./configure Which generates a Perlscript called set_soenv Calls set_soenv which generates a LinuxX86-64Env.Set.sh Executes a shell Which sources the LinuxX86-64Env.Set.sh Which then calls a ./bootstrap script Which among other things, compiles a dmake binary Calls a Perl script called “build.pl” Which calls a the freshly build dmake binary in directories Which (hopefully) start compiling your first bits of code ... LibreOffice and IDEs