]> git.saurik.com Git - apt.git/blame - COMPILING
Prepare release 1.1~exp17
[apt.git] / COMPILING
CommitLineData
1ae93c94
AL
1General Information
2~~~~~~~~~~~~~~~~~~~
3To compile this you need a couple things
4 - A working POSIX system with working POSIX gcc, g++, make (GNU),
5 ar, sh, awk and sed in the path
6 - GNU Make 3.74 or so, -- normal UNIX make will NOT work
7 * Note 3.77 is broken.
8 - A working ANSI C++ compiler, this is not g++ 2.7.*
9 g++ 2.8 works OK and newer egcs work well also. Nobody has tried it
10 on other compilers :< You will need a properly working STL as well.
11 - A C library with the usual POSIX functions and a BSD socket layer.
7365ff46 12 If your OS conforms to the Single Unix Spec then you are fine:
1ae93c94 13 http://www.opengroup.org/onlinepubs/7908799/index.html
a7c3025f
AL
14 - Refer to the Build-Depends information in debian/control for
15 additional requirements (some of which are Debian-specific)
1ae93c94 16
678bc33e
AL
17** NOTICE **
18The C++ global constructors do not link correctly when using non-shared
7365ff46 19libraries. This is probably the correct behavior of the linker, but I have
678bc33e
AL
20not yet had time to devise a work around for it. The correct thing to
21do is add a reference to debSystem in apt-pkg/init.cc,
22assert(&debSystem == 0) would be fine for instance.
23
1ae93c94
AL
24Guidelines
25~~~~~~~~~~
26I am not interested in making 'ultra portable code'. I will accept patches
27to make the code that already exists conform more to SUS or POSIX, but
28I don't really care if your not-SUS OS doesn't work. It is simply too
29much work to maintain patches for dysfunctional OSs. I highly suggest you
1e3f4083 30contact your vendor and express interest in a conforming C library.
1ae93c94 31
7365ff46 32That said, there are lots of finicky problems that must be dealt with even
1ae93c94
AL
33between the supported OS's. Primarily the path I choose to take is to put
34a shim header file in build/include that transparently adds the required
35functionality. Patches to make autoconf detect these cases and generate the
36required shims are OK.
37
38Current shims:
678bc33e 39 * sys/statvfs.h to convert from BSD/old-glibc statfs to SUS statvfs
1ae93c94 40 * rfc2553 hostname resolution (methods/rfc*), shims to normal gethostbyname.
7365ff46 41 The more adventurous could steal the KAME IPv6 enabled resolvers for those
1cecba4d 42 OS's with IPv6 support but no rfc2553 (why?)
678bc33e 43 * define _XOPEN_EXTENDED_SOURCE to bring in h_errno on HP-UX
1cecba4d 44 * socklen_t shim in netdb.h if the OS does not have socklen_t
1ae93c94 45
7365ff46 46The only completely non-shimmed OS is Linux with glibc2.1, glibc2.0 requires
1cecba4d 47the first three shims.
1ae93c94
AL
48
49Platform Notes
50~~~~~~~~~~~~~~
51Debian GNU Linux 2.1 'slink'
52Debian GNU Linux 'potato'
678bc33e 53Debian GNU Linux 'woody'
1ae93c94
AL
54 * All Archs
55 - Works flawlessly
a034d852 56 - You will want to have docbook-xml and docbook2man installed to get
1ae93c94 57 best results.
1cecba4d 58 - No IPv6 Support in glibc's < 2.1.
1ae93c94
AL
59
60Sun Solaris
61 SunOS cab101 5.7 Generic_106541-04 sun4u sparc
678bc33e 62 SunOS csu201 5.8 Generic_108528-04 sun4u sparc
1ae93c94
AL
63 - Works fine
64 - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution
a5bae0df
AL
65
66OpenBSD
67 OpenBSD gsb086 2.5 CMPUT#0 i386 unknown
678bc33e 68 OpenBSD csu101 2.7 CMPUT#1 i386 unknown
1cecba4d
AL
69 - OS needs 'ranlib' to generate the symbol table after 'ar'.. (not using
70 GNU ar with the gnu tool chain :<)
678bc33e
AL
71 - '2.5' does not have RFC 2553 hostname resolution, but '2.7' does
72 - Testing on '2.7' suggests the OS has a bug in its handling of
73 ftruncate on files that have been written via mmap. It fills the page
74 that crosses the truncation boundary with 0's.
75
1ae93c94
AL
76HP-UX
77 HP-UX nyquist B.10.20 C 9000/780 2016574337 32-user license
78 - Evil OS, does not conform very well to SUS
7365ff46 79 1) snprintf exists but is not prototyped, ignore spurious warnings
1ae93c94
AL
80 2) No socklen_t
81 3) Requires -D_XOPEN_SOURCE_EXTENDED for h_errno
1cecba4d 82 configure should fix the last two (see above)
1ae93c94
AL
83 - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution
84