You need to disable patch4 in the spec file as it is applicable only for AIX 6.1
Also the following patch is required.
# cat gettext-0.20.2-aix-new.patch
--- ./gettext-runtime/intl/Makefile.in_orig 2021-03-03 14:07:57 +0000
+++ ./gettext-runtime/intl/Makefile.in 2021-03-03 14:08:50 +0000
@@ -1841,7 +1841,7 @@
localename-table.h: $(srcdir)/localename-table.in.h $(srcdir)/export.h
sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \
-e 's/extern,/extern LIBINTL_DLL_EXPORTED,/' \
- -e "/#if HAVE_USELOCALE/r $(srcdir)/export.h" \
+ -e "/#if HAVE_WORKING_USELOCALE/r $(srcdir)/export.h" \
< $(srcdir)/localename-table.in.h \
| sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \
> localename-table.h
------------------------------
Ayappan P
------------------------------
Original Message:
Sent: Tue March 02, 2021 09:21 AM
From: C- -T
Subject: gettext-0.20.2-1: package rebuild error
the preprocessor output revealed nothing really helpful...
packagebuilder@aixbuildhostng: /home/packagebuilder/rpmbuild/BUILD/gettext-0.20.2/64bit/gettext-runtime/intl # gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"\" -DLIBDIR=\"/usr/local/lib\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -Drelocate2=libintl_relocate2 -DDEPENDS_ON_LIBICONV=1 -D_THREAD_SAFE -fvisibility=hidden -g -O2 -c ./localename.c -fPIC -DPIC -o .libs/localename.o -Epackagebuilder@aixbuildhostng: /home/packagebuilder/rpmbuild/BUILD/gettext-0.20.2/64bit/gettext-runtime/intl # cd .libs/packagebuilder@aixbuildhostng: /home/packagebuilder/rpmbuild/BUILD/gettext-0.20.2/64bit/gettext-runtime/intl/.libs # grep wcscoll_l localename.oextern int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); extern int wcscoll_l(const wchar_t *, const wchar_t *,packagebuilder@aixbuildhostng: /home/packagebuilder/rpmbuild/BUILD/gettext-0.20.2/64bit/gettext-runtime/intl/.libs # grep wcsxfrm_l localename.oextern size_t wcsxfrm_l(wchar_t * extern size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t,
commenting out the definitions in /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/include-fixed/wchar.h makes compilation go through, but editing compiler internal files is not a valid fix.
especially as there are more errors about to come along...
gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -D_THREAD_SAFE -g -O2 -c -o propername.o propername.cpropername.c: In function 'mbsstr_trimmed_wordbounded':propername.c:67:11: error: conversion to non-scalar type requested if (MB_CUR_MAX > 1) ^~gmake[6]: *** [Makefile:1645: propername.o] Error 1gmake[6]: Leaving directory '/home/packagebuilder/rpmbuild/BUILD/gettext-0.20.2/64bit/gettext-runtime/gnulib-lib'
so how for heavens sake did you ever get this stuff build correctly? any special settings in your build env which i'am not aware off?
------------------------------
I regret starting this entire conversation
Original Message:
Sent: Tue March 02, 2021 07:50 AM
From: Ayappan P
Subject: gettext-0.20.2-1: package rebuild error
Probably you need to create the pre-processing file to figure out the issue.
Capture the entire compilation command, add " -E ", run it manually and capture the generated pre-processing file.
Then you can look for "wcscoll_l" in the file and see the conflicting declarations.
------------------------------
Ayappan P
Original Message:
Sent: Mon March 01, 2021 11:19 AM
From: C- -T
Subject: gettext-0.20.2-1: package rebuild error
i need to rebuild the gettext package, alas an compiler error is thrown. all dependencies are up to date and no noteworthy changes are made (just disabled this stupid iconv hardcode patch). so just a plain rpmbuild -ba gettext-0.20.2-1.spec.
this error is a little bit odd, as gcc 8.3 is used?!
In file included from ./localename.c:34:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/include-fixed/string.h:364:19: error: conflicting types for 'wcscoll_l' extern int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); ^~~~~~~~~In file included from /opt/freeware/include/iconv.h:110, from ./gettextP.h:27, from ./localename.c:25:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/include-fixed/wchar.h:307:12: note: previous declaration of 'wcscoll_l' was here extern int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); ^~~~~~~~~In file included from ./localename.c:34:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/include-fixed/string.h:365:19: error: conflicting types for 'wcsxfrm_l' extern size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t, locale_t); ^~~~~~~~~In file included from /opt/freeware/include/iconv.h:110, from ./gettextP.h:27, from ./localename.c:25:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/include-fixed/wchar.h:362:15: note: previous declaration of 'wcsxfrm_l' was here extern size_t wcsxfrm_l(wchar_t * __restrict__, const wchar_t * __restrict__, size_t, locale_t); ^~~~~~~~~
any hints?
------------------------------
I regret starting this entire conversation
------------------------------