Ok got some replies : Some replies of Jeff Johnson :
>> >> I'm working on porting RPM 4.2.1 to AIX for OpenPKG project and I'm >> puzzled with some macros and directive and may be you could help me : >> >You (and openpkg) ought to be using sources later than rpm-4.2.1. <shrug> ... >> 1) rpmio/fts.c >> >> Some macros allow to tailor rpm to OS specifics : >> >> I have to add : >> >> #if defined(OPENPKG_AIX) >> # define __errno_location() (&errno) >> # define dirfd(x) ((dirp)->dd_fd) >> # define _STAT_VER 0 >> # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) >> # define _D_EXACT_NAMLEN(d) ((d)->d_namlen) >> #endif >> >> Wonder if these are correct ? >I can't tell without seeing AIX include details, but that's approximately the set of >macros that need to be defined. >> 2) There is many redefinitions in AIX includes. >> >> For example : >> >> libgen.h >> >> #if _XOPEN_SOURCE_EXTENDED==1 >> >> extern char * __loc1; >> >> #ifdef _NO_PROTO >> extern char *basename(); >> extern char *dirname(); >> extern char *regcmp(); >> extern char *regex(); >> #else /* _NO_PROTO */ >> extern char *basename(char *); >> extern char *dirname(char *); >> extern char *regcmp(const char *, ...); >> extern char *regex(const char *, const char *, ...); >> #endif /* _NO_PROTO */ >> >> #endif /* _XOPEN_SOURCE_EXTENDED */ >> >> regexp.h >> >> #ifdef _NO_PROTO >> extern char *regex(); >> extern char *regcmp(); >> #else /* _NO_PROTO */ >> extern char *regex(char *, char *, char *); >> extern char *regcmp(int); >> #endif /* _NO_PROTO */ >> >> To fixed that by avoiding including libgen.h in rpm system.h >> >> #ifndef OPENPKG_AIX >> /* for basename(3) and dirname(3) */ >> #include <libgen.h> >> #endif >> >That'll work, but is a bit drastic. Adding 2 prototypes for basename(3) >and dirname(3), or including duplicate static inline functions where needed, >uncouples from the gross need to include <libgen.h> in order to get 2 symbols cast >to return "char *" pointers. >>3) There is duplicates between native stdio.h and the stuff from GCC : >>usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build >>-I../rpmdb -I../rpmio -I../popt -DOPENPKG -DOPENPKG_AIX >>-I/QOpenSys/tmp/openpkg-2.3.1/zlib-1.2.2 >>-I/QOpenSys/tmp/openpkg-2.3.1/bzip2-1.0.2 >>-I/QOpenSys/tmp/openpkg-2.3.1/beecrypt-4.1.2 -DOPENPKG -DOPENPKG_AIX >>-I/QOpenSys/tmp/openpkg-2.3.1/zlib-1.2.2 >>-I/QOpenSys/tmp/openpkg-2.3.1/bzip2-1.0.2 >>-I/QOpenSys/tmp/openpkg-2.3.1/beecrypt-4.1.2 -O2 -D_GNU_SOURCE >>-D_REENTRANT -MT getdate.lo -MD -MP -MF .deps/getdate.Tpo -c getdate.c >>-o getda >Because you are compiling somehow with different include paths. If using gcc, >prefer /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h >in all cases. Also Jeff recommand switching to rpm-4.4.1and told the required stuff. >Will need neon ripped, or alternatively, libxml2/expat added. OTOH, zlib >internal to rpm may permit zlib (and perhaps bzip2) to be dropped if there for rpm >purposes. >elfutils should be in the set above if AIX uses elf as well. Meanwhile, I finished the rpm 4.2.1 build of AIX 5.2 / PASE and the diff between original 4.2.1 and patched 4.2.1 is attached. [EMAIL PROTECTED] openpkg-2.3.1]$ rpm-4.2.1.new/rpm --version OpenPKG RPM 4.2.1 Question : did there is a way to restart the bootstrap build from a certain phase to avoid rebuilding al stuff and in such case, loosing my rpm patches ? Ralf, will you add my patches to the HEAD so I could take from an up to date openpkg ? 2005/5/16, Henri Gomez <[EMAIL PROTECTED]>: > Well I contacted the rpm-devel list for the misc problems encountered > during the AIX / PASE build of rpm 4.2.1 and will see if they have > some advices. > > BTW, did there is people here who tried to port OpenPKG to AIX 5.2 ? > May be Ralf but others ? >
RPM.diff
Description: Binary data