Running Linux Applications on AIX
Total Page:16
File Type:pdf, Size:1020Kb
Front cover Acrobat bookmark Running Linux Applications on AIX AIX affinity with Linux AIX Toolbox for Linux Applications Porting and source compatibility Luis Ferreira Janethe Co Jan-Rainer Lahmann Gonzalo Quesada ibm.com/redbooks International Technical Support Organization Running Linux Applications on AIX June 2001 SG24-6033-00 Take Note! Before using this information and the product it supports, be sure to read the general information in “Special notices” on page 199. First Edition (June 2001) This edition applies to AIX Toolbox for Linux Applications for use with AIX 4.3.3 and AIX 5L operating systems. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. JN9B Building 003 Internal Zip 2834 11400 Burnet Road Austin, Texas 78758-3493 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright International Business Machines Corporation 2001. All rights reserved. Note to U.S Government Users – Documentation related to restricted rights – Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Figures . vii Tables . .ix Preface . .xi The team that wrote this redbook. .xi Special notice . xiv IBM Trademarks. xv Comments welcome. xv Chapter 1. Introduction . 1 1.1 AIX . 2 1.1.1 Current version and status . 2 1.2 Linux . 4 1.2.1 Brief history . 4 1.2.2 About Linux’s copyright . 5 1.2.3 The GNU Project and the Linux kernel . 5 1.2.4 Different flavors of Linux . 6 1.3 Linux at IBM . 7 1.3.1 Linux applications on AIX . 8 1.3.2 IBM’s UNIX-based operating system strategy . 8 1.4 Future trends and directions. 10 Chapter 2. AIX Toolbox for Linux Applications . 13 2.1 Overview . 15 2.2 Additional information. 16 2.3 Design of the Toolbox . 17 2.3.1 Directory structure. 17 2.3.2 System variables. 20 2.4 Components. 21 2.4.1 Development utilities . 21 2.4.2 User environment utilities and applications. 21 2.4.3 Binaries and sources (rpm and srpm) . 22 2.5 Installation methods . 22 2.5.1 AIX installp . 24 2.5.2 RPM Package Manager . 30 Chapter 3. Toolbox installation . 37 3.1 System requirements . 38 © Copyright IBM Corp. 2001 iii 3.2 Installation procedure . 39 3.2.1 Installing the RPM Package Manager. 39 3.2.2 Preparing to install GNOME, KDE2 and other applications . 40 3.2.3 FTP tools. 41 3.2.4 Installing the Toolbox base . 43 3.2.5 Using the RPM Package Manager . 44 3.2.6 Installing KDE2 . 50 3.2.7 Installing GNOME . 52 3.3 Useful URLs . 53 Chapter 4. Source compatibility: Linux-compatible APIs on AIX . 55 4.1 Writing portable code . 56 4.2 Linux-compatible APIs and LSB functions on AIX . 57 4.3 File macro supported values . 58 4.3.1 File access modes . 60 4.3.2 File descriptor flags for fcntl . 64 4.3.3 File modes. 65 4.3.4 Poll macro values . 65 4.4 Signal values . 66 Chapter 5. Package building and porting . 69 5.1 Compiler installation and requirements. 70 5.2 Rebuilding Toolbox packages. 71 5.2.1 Building packages with rpm . 71 5.2.2 Rebuilding a Toolbox RPM . 72 5.3 Compiling open source software. 80 5.4 Using libtool to handle shared libraries. 82 5.5 Examples . 84 5.5.1 Rebuilding and updating the wget package . 84 Chapter 6. User and administration differences . 89 6.1 Desktop and graphical applications . 90 6.1.1 The XWindow System. 90 6.1.2 The KDE desktop . 96 6.1.3 The GNOME desktop . 102 6.1.4 Package managing using KDE or GNOME. 104 6.1.5 CDE desktop . 109 6.2 Available shells . 112 6.2.1 Overview of shell startup files . 123 6.3 Commands and syntax differences. 128 6.3.1 AIX and AIX Toolbox commands differences . 130 6.4 Administration differences . 134 6.5 Boot process differences . 141 6.5.1 Linux boot process . 141 iv Running Linux Applications on AIX 6.5.2 AIX boot process. 143 6.6 System files differences . 147 6.6.1 File system definitions on AIX and Linux . 148 Appendix A. APIs . 153 Linux-compatible APIs and library functions . 154 Linux-compatible APIs . 154 Linux Standard Base APIs . 162 New APIs in AIX 5L 5.1 . 171 Appendix B. Differences in commands. 187 Appendix C. Other Open Source Software for AIX. 193 Overview . 194 Other sources. ..