1 / 24

Developing Software on Linux

Developing Software on Linux. Tim Marriott Mel Nicholson ICCAD 2003. Introduction. Why Linux? Porting to Linux Developing on Linux. Why Linux?. The question should be “Why the PC?” Inexpensive Performance What is wrong with Windows as the OS? It is too different from Unix

dagmar
Download Presentation

Developing Software on Linux

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Developing Software on Linux Tim Marriott Mel Nicholson ICCAD 2003

  2. Introduction • Why Linux? • Porting to Linux • Developing on Linux

  3. Why Linux? • The question should be “Why the PC?” • Inexpensive Performance • What is wrong with Windows as the OS? • It is too different from Unix • Major EDA software runs on Unix • The initial port is tough and the continued support is difficult • Linux is a robust OS that is very close to Unix • The initial port is easy and the continued support is also easy • It is in the right place at the right time

  4. Why Linux? • We port to Linux because customers want it • Fast Hardware • Inexpensive Hardware • It’s an easy port • We develop on Linux because it increases our productivity • Fast Hardware • Inexpensive Hardware • Not a steep learning curve for our developers

  5. Porting to Linux • Porting Overview • What Linux to choose? • Problems with the Linux Support Story • The Enterprise is Coming • Porting Issues Encountered

  6. Porting Overview • Linux is really just another flavor of Unix • The port was not difficult • The issues encountered were no more difficult than between flavors of Unix • Very few problems were encountered • OS and hardware configuration took the most time to get right

  7. What Linux to Choose? • Versioned Linux was the gating factor to delivering a port • Can’t base a product on all variants of the OS that the open source community produces • Various companies supply versioned variants of Linux • Red Hat, SuSE, Caldera, Mandrake • Synopsys chose Red Hat

  8. Problems with the Linux Support Story • Linux companies didn’t deliver a true enterprise support structure • Versions are not compatible • No long term support of versions • No compatibility guarantees between patches • Versions release very often • ISV’s stay with old versions for long periods of time • Synopsys is still based on Red Hat 7.2 • Linux companies have recognized the flaw • Enterprise versions are becoming available • Consumer versions are unfriendly to business

  9. The Enterprise is Coming • Red Hat now only supports an Enterprise version • Yearly subscription based support • Guaranteed binary and API compatibility between versions • 12-18 months between major releases • Cost will increase • Stability will offset the additional cost • Red Hat Enterprise Linux WS $179 - $299 on x86 • $792 on Itanium and AMD64 Information on this slide from http://www.redhat.com

  10. Porting Issues Encountered • Calling fclose() on a file that is not open crashes • Be sure to only call fclose() once per open file • Binary files are not platform independent due to Little Endian byte order • Must decide where you want to handle the conversion when reading/writing binary files

  11. Porting Issues Encountered • Gcc doesn’t increment i++ until the end of the statement • result = foo(x[i++], x[i]); • Increment some other way • i and i+1 is one option • C compiler has problems with nested function calls and function calls in “if” statements • Use separate statements instead

  12. Porting Issues Encountered • “/bin” and “/usr/bin” are separate directories • Make sure command location is defined for Linux • Default sorting order is not the same • Set environment variable LC_ALL to C

  13. Porting Issues Encountered • Can’t initialize global scope to be stdout or stdin • stdout/stdin are not constant expressions and are therefore not suitable for initialization • If a NULL pointer is passed to fclose it will crash • Check the pointer • if (fd) fclose(fd);

  14. Porting Issues Encountered • intptr_t is not defined in int_types.h • It is defined in stdint.h • SIGEMT is not defined • Do not use SIGEMT

  15. Porting Issues Encountered • The default floating point precision varies • Uses native support of underlying hardware • Different results for register operation versus loaded • Makes golden-file based regression testing difficult • IEEE compliance options incur a performance penalty

  16. Developing on Linux • Linux Development Model • Office Productivity Tools • Developer Tools • GUI Development

  17. Linux Development Model SCM Data Servers Linux Box 2 CPU 4 GB Memory Exceed Vnc Big Local Disk Windows Desktop Computer Room

  18. Office Productivity Tools • Windows Desktop avoids the office productivity tool issues • OpenOffice and StarOffice available on Linux • MS Office compatible • CodeWeavers CrossOver Office • Allows MS Office to run directly on Linux • VMware dual operating system capable

  19. Developer Tools • Compilers • Gnu (gcc, g++) • Intel Compilers • Debuggers • gdb • Graphical front end, ddd

  20. Developer Tools • Editors (IDE’s) • Emacs, Vim • Highly configurable editors • Can tightly integrate gdb and SCM systems • Kdevelop • Full integrated MS Visual C++ style IDE • Source Control Systems • Clearcase, Perforce, CVS, RCS

  21. Developer Tools • Memory Debug • Purify (Available Soon) • Valgrind • Performance • Quantify (Available Soon) • Kcachegrind

  22. Developer Tools • Test Coverage • Purecov (Available Soon) • Gcov • Scripting Language • Perl, Tcl/Tk, Python, JavaScript

  23. GUI Development • Native GUI toolkits available • Gnome GTK+ is a C based public domain toolkit • LessTiff is Motif compatible library • Tcl/Tk provides scripting type capabilities • Java, AWT or Swing • Qt is a C++ class library commercially available from Trolltech • KDE is written in Qt • Portable across Linux/Unix/Windows platforms • Public Domain version available • Synopsys standardized on Qt

  24. Summary • The PC has given us fast, inexpensive hardware • Linux enables EDA on the PC • Enterprise Linux makes this a viable solution • Stability, Compatibility, Predictability • Linux is a winning platform for EDA! • For customers and developers

More Related