On 17/11/2017 13:48, Michael Felt wrote:
On 11/13/2017 7:46 AM, William A Rowe Jr wrote:
So, when we prepare source packages, we are using vendor or raw
autocruft packages... Depending on which release, this varies every
by a specific RM.
Well, I was hoping to be able to dual-build (i.e., 32 and 64-bit in one
package apr and apr-util - but it seems I'll have to package the
seperately) - lots of lines (sorry) - but there are differences in
include files that would make me uncomfortable to have a dual package
now. And, no real suggestion on how to make one. So, it seems keeping
the -q64 flag for 64-bit is a good idea (to prevent mixes) - and I'll
just manually add -q32 to my 32-bit package.
+++ start of diff output +++
michael@x071:[/data/prj/apache/apr/static/apr-1.6.3]diff -ru X32 X64
diff -ru X32/opt/bin/apr-1-config X64/opt/bin/apr-1-config
--- X32/opt/bin/apr-1-config 2017-11-30 18:19:56 +0000
+++ X64/opt/bin/apr-1-config 2017-11-30 18:16:21 +0000
@@ -33,7 +33,7 @@
CC="xlc_r"
CPP="xlc_r -E"
SHELL="/bin/sh"
-CPPFLAGS=" -U__STR__ -D_THREAD_SAFE -D_USE_IRS -D_LARGEFILE64_SOURCE"
+CPPFLAGS=" -U__STR__ -D_THREAD_SAFE -D_USE_IRS"
CFLAGS=" -qHALT=E"
LDFLAGS="-Wl,-brtl"
LIBS="-lpthread"
diff -ru X32/opt/build-1/apr_rules.mk X64/opt/build-1/apr_rules.mk
--- X32/opt/build-1/apr_rules.mk 2017-11-30 18:19:56 +0000
+++ X64/opt/build-1/apr_rules.mk 2017-11-30 18:16:21 +0000
@@ -41,7 +41,7 @@
# compilation and linking flags that are supposed to be set only by
the user.
# configure adds to them for tests, but we restore them at the end.
#
-CFLAGS=-I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -I/opt/buildaix/includes
+CFLAGS=-I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64
-I/opt/buildaix/includes
CPPFLAGS=-I/opt/include -I/opt/buildaix/include
LDFLAGS=
LIBS=
@@ -51,7 +51,7 @@
# at the end of the process.
#
EXTRA_CFLAGS= -qHALT=E
-EXTRA_CPPFLAGS= -U__STR__ -D_THREAD_SAFE -D_USE_IRS -D_LARGEFILE64_SOURCE
+EXTRA_CPPFLAGS= -U__STR__ -D_THREAD_SAFE -D_USE_IRS
EXTRA_LDFLAGS=-Wl,-brtl
EXTRA_LIBS=-lpthread
EXTRA_INCLUDES=
diff -ru X32/opt/build-1/libtool X64/opt/build-1/libtool
--- X32/opt/build-1/libtool 2017-11-30 18:19:56 +0000
+++ X64/opt/build-1/libtool 2017-11-30 18:16:20 +0000
@@ -168,7 +168,7 @@
LTCC="xlc_r"
# LTCC compiler flags.
-LTCFLAGS="-I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5
-I/opt/buildaix/includes"
+LTCFLAGS="-I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64
-I/opt/buildaix/includes"
# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BCDT][BCDT]*\\)[ ][
]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'"
diff -ru X32/opt/include/apr-1/apr.h X64/opt/include/apr-1/apr.h
--- X32/opt/include/apr-1/apr.h 2017-11-30 18:19:54 +0000
+++ X64/opt/include/apr-1/apr.h 2017-11-30 18:16:20 +0000
@@ -267,7 +267,7 @@
/* APR Feature Macros */
#define APR_HAS_SHARED_MEMORY 1
#define APR_HAS_THREADS 1
-#define APR_HAS_SENDFILE 1
+#define APR_HAS_SENDFILE 0
#define APR_HAS_MMAP 1
#define APR_HAS_FORK 1
#define APR_HAS_RANDOM 1
@@ -277,7 +277,7 @@
#define APR_HAS_UNICODE_FS 0
#define APR_HAS_PROC_INVOKED 0
#define APR_HAS_USER 1
-#define APR_HAS_LARGE_FILES 1
+#define APR_HAS_LARGE_FILES 0
#define APR_HAS_XTHREAD_FILES 0
#define APR_HAS_OS_UUID 0
@@ -315,7 +315,7 @@
typedef int apr_int32_t;
typedef unsigned int apr_uint32_t;
-#define APR_SIZEOF_VOIDP 4
+#define APR_SIZEOF_VOIDP 8
/*
* Darwin 10's default compiler (gcc42) builds for both 64 and
@@ -350,15 +350,15 @@
#define UINT64_C(v) (v ## ULL)
#endif
#else
- typedef long long apr_int64_t;
- typedef unsigned long long apr_uint64_t;
+ typedef long apr_int64_t;
+ typedef unsigned long apr_uint64_t;
#endif
typedef size_t apr_size_t;
typedef ssize_t apr_ssize_t;
-typedef off64_t apr_off_t;
+typedef off_t apr_off_t;
typedef socklen_t apr_socklen_t;
-typedef unsigned long apr_ino_t;
+typedef ino_t apr_ino_t;
#if APR_SIZEOF_VOIDP == 8
typedef apr_uint64_t apr_uintptr_t;
@@ -537,19 +537,19 @@
#define APR_SIZE_T_FMT "lu"
/* And APR_OFF_T_FMT */
-#define APR_OFF_T_FMT APR_INT64_T_FMT
+#define APR_OFF_T_FMT "ld"
/* And APR_PID_T_FMT */
#define APR_PID_T_FMT "d"
/* And APR_INT64_T_FMT */
-#define APR_INT64_T_FMT "lld"
+#define APR_INT64_T_FMT "ld"
/* And APR_UINT64_T_FMT */
-#define APR_UINT64_T_FMT "llu"
+#define APR_UINT64_T_FMT "lu"
/* And APR_UINT64_T_HEX_FMT */
-#define APR_UINT64_T_HEX_FMT "llx"
+#define APR_UINT64_T_HEX_FMT "lx"
/*
* Ensure we work with universal binaries on Darwin
diff -ru X32/opt/lib/apr.exp X64/opt/lib/apr.exp
--- X32/opt/lib/apr.exp 2017-11-30 18:19:56 +0000
+++ X64/opt/lib/apr.exp 2017-11-30 18:16:20 +0000
@@ -204,7 +204,6 @@
apr_socket_sendv
apr_socket_sendto
apr_socket_recvfrom
-apr_socket_sendfile
apr_socket_recv
apr_socket_opt_set
apr_socket_timeout_set
Binary files X32/opt/lib/libapr-1.a and X64/opt/lib/libapr-1.a differ
diff -ru X32/opt/lib/pkgconfig/apr-1.pc X64/opt/lib/pkgconfig/apr-1.pc
--- X32/opt/lib/pkgconfig/apr-1.pc 2017-11-30 18:19:56 +0000
+++ X64/opt/lib/pkgconfig/apr-1.pc 2017-11-30 18:16:20 +0000
@@ -8,4 +8,4 @@
Description: The Apache Portable Runtime library
Version: 1.6.3
Libs: -L${libdir} -lapr-${APR_MAJOR_VERSION} -lpthread
-Cflags: -U__STR__ -D_THREAD_SAFE -D_USE_IRS -D_LARGEFILE64_SOURCE
-qHALT=E -I${includedir}
+Cflags: -U__STR__ -D_THREAD_SAFE -D_USE_IRS -qHALT=E -I${includedir}
+++ END of diff output
Q. 1) What source package are you talking about?
http://apache.mirror.triple-it.nl//apr/apr-1.6.3.tar.bz2
Building with:
export OBJECT_MODE=64
$ ../src/apr-1.6.3/configure --prefix=/opt --sysconfdir=/var/apr/etc
--sharedstatedir=/var/apr/com --localstatedir=/var/apr
--mandir=/usr/share/man --infodir=/opt/share/info/apr
compiler: xlc
On Nov 12, 2017 11:47, "Michael" <aixto...@felt.demon.nl
<mailto:aixto...@felt.demon.nl>> wrote:
Hi.
I try to package in dual-ABI (i.e., 32-bit and 64-bit modes) -
with binaries (and scripts) from the 64-bit side.
In other words, only the libraries are "dual".
I just noticed that the build-1/libtool sets a dependancy to
64-bit compiles.
root@x064:[/data/prj/apache/apr-util-1.6.1]lslpp -w
/opt/build-1/libtool
File Fileset Type
----------------------------------------------------------------------------
/opt/build-1/libtool
aixtools.apache.apr.rte File
root@x064:[/data/prj/apache/apr-util-1.6.1]grep q64
/opt/build-1/libtool
LTCFLAGS="-I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64"
I know how to 'fix it' in that I shall just remove the -q64 from
the LTCFLAGS define.
If you wanted to consider making this more automatic you could set
a condition such that when
OBJECT_MODE=64 the flag -q64 is added, otherwise - not used.
FYI!
regards,
Michael