Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pgsql: aix: No need to use mkldexport when we want to export all symbol
Дата
Msg-id 20220910052741.t7w7csyrggwus2ze@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: pgsql: aix: No need to use mkldexport when we want to export all symbol  (Andres Freund <andres@anarazel.de>)
Ответы Re: pgsql: aix: No need to use mkldexport when we want to export all symbol
Список pgsql-committers
Hi,

On 2022-09-09 21:37:49 -0700, Andres Freund wrote:
> On 2022-09-09 21:16:38 -0700, Andres Freund wrote:
> > On September 9, 2022 9:14:26 PM PDT, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > >Andres Freund <andres@anarazel.de> writes:
> > >> aix: No need to use mkldexport when we want to export all symbols
> > >
> > >hmm, early returns not good:
> > >
> > >https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hoverfly&dt=2022-09-10%2003%3A31%3A29
> > >
> > >The backend seems to build OK, but our first try to make a .so
> > >falls over:
> > >
> > >ld: 0711-244 ERROR: No csects or exported symbols have been saved.
> > >../../../../../../src/Makefile.shlib:279: recipe for target 'cyrillic_and_mic.so' failed
> > >gmake[3]: *** [cyrillic_and_mic.so] Error 8
> > 
> > I'd tested that maybe two weeks ago, so I'm a bit surprised. I'll try to reproduce.
> 
> A basic build with xlc 16.1 still succeeds building world-bin. Including
> obviously cyrillic_and_mic.so
> 
> ../configure PERL=perl64 --cache ../config-ac-xlc.cache --with-perl CC=/opt/IBM/xlc/16.1.0/bin/xlc_r
CFLAGS="-qmaxmem=33554432-qsuppress=1500-010:1506-995
-qsuppress=1506-010:1506-416:1506-450:1506-480:1506-481:1506-492:1506-944:1506-1264
-qinfo=all:nocnd:noeff:noext:nogot:noini:noord:nopar:noppc:norea:nouni:nouse-qinfo=nounset"
 
> 
> with OBJECT_MODE=64 previously set.
> 
> I'll try a build closer to Noah's configure options. Most likely candidate
> seems --enable-debug.

Hm. In a new tree it doesn't work with HEAD. But it did previously survive a
gmake clean && gmake world-bin. I don't see why the configure cache or
existing buildtree should play a role here, given a make clean?

Either way, the symbol visibility patch from
https://postgr.es/m/20220901211935.k6v7mt3mjhnfbhnr%40awork3.anarazel.de
repairs the build, even with a new build tree.

Looking at that patch I don't like this bit overly much:
+if test -n "${CFLAGS_SL_MODULE}"; then
+  AC_DEFINE([HAVE_VISIBILITY_ATTRIBUTE], 1,
+            [Define to 1 if your compiler knows the visibility("hidden") attribute.])
+fi

Seems too fragile, somebody could test for another attribute to add to
CFLAGS_SL_MODULE and it'd break. I'm inclined to just set a
pgac_have_visibility_attr in the two branches and set it from
pgac_cv_prog_CC_cflags__fvisibility_hidden
pgac_cv_prog_CC_cflags__qvisibility_hidden
?

It seem worth applying the -qvisibility patch and seeing whether that fixes
the buildfarm? I guess alternatively we could revert the mkldexport patch,
apply the -qvisibility patch and then apply the mkldexport thing again
afterwards?

Greetings,

Andres Freund



В списке pgsql-committers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: aix: No need to use mkldexport when we want to export all symbol
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: aix: No need to use mkldexport when we want to export all symbol