When building on aix (5.3) with gcc (don't know for xlc) there is an inconsistency in building aix-sharelibs between data/ and others, mainly stubdata/, causing this build error:
When building genrb, data/ is not built yet, and genrb is linked against stubdata/libicudata38.a
For genrb execution, LIBPATH is set to find lib/libicudata38.a if available, instead of stubdata/libicudata38.a
But lib/libicudata38.a is built differently than stubdata/libicudata38.a:
Now looking at the build commands for stubdata/libicudata38.a:
And for lib/libicudata38.a:
So stubdata/libicudata38.a directly is the shared object, while lib/libicudata38.a is an archive containing the shared object.
Each lib/libicu*.a besides lib/libicudata*.a is the shared object directly, not an archive containing the shared object:
Seems that ticket 4738 also applies to each library except in data/ ?
When using "LDFLAGS=-Wl,-brtl", having lib*.a as shared objects works, so only the different build methods for data/ and stubdata/ remains as problem, as they produce libraries with identical names.
ICU on AIX normally builds with the Visual Age compiler. The gcc compiler is almost never tested on AIX.
As a work around, you should use the Visual Age compiler instead, which is ICU's reference platform. The Visual Age compiler is known to work. Using -Wl,-brtl is not a good option because it's not the default behavior of AIX shared libraries, and it causes performance problems.
Ticket #4738 is probably the reason why shared libraries are correctly built with the Visual Age compiler but not the gcc compiler.