From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28387 invoked from network); 11 Jun 2001 16:34:21 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Jun 2001 16:34:21 -0000 Received: (qmail 12368 invoked by alias); 11 Jun 2001 16:33:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14847 Received: (qmail 12357 invoked from network); 11 Jun 2001 16:33:41 -0000 To: "Andrej Borsenkow" Cc: , Subject: Re: AIX-problem: the main module won't link statically References: <001d01c0f0c1$83ed8670$21c9ca95@mow.siemens.ru> From: Timothy Miller Date: 11 Jun 2001 12:29:04 -0400 In-Reply-To: "Andrej Borsenkow"'s message of "Sat, 9 Jun 2001 12:52:29 +0400" Message-ID: User-Agent: Gnus/5.0802 (Gnus v5.8.2) XEmacs/21.1 (Big Bend) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sat, 9 Jun 2001 12:52:29 +0400, "Andrej Borsenkow" wrote: > > Andrej Borsenkow wrote: > > > > > > My guess is that AIX 4.3 has dl* functions and hence AIXDYNAMIC > > is not used. > > > But something goes wrong with dlopen() & Co. > > > > That sounds quite plausible. I expect that it has retained the old calls > > though so it might be a good idea to make it use AIXDYNAMIC on AIX even > > if the dl* functions are found. What might be worth trying is to use a > > contrived config.cache which indicates that the dl* functions are not > > there. > > > > Something like this? We already fiddle way too much with cache variables. > > To Timo, Timothy - could you test it? If you are not building off CVS you > have to patch configure.in. Stock 4.0.1 won't work with autoconf-2.50; CVS > version will. > > -andrej > > Index: zshconfig.ac > =================================================================== > RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v > retrieving revision 1.5 > diff -u -r1.5 zshconfig.ac > --- zshconfig.ac 2001/06/08 18:34:53 1.5 > +++ zshconfig.ac 2001/06/09 08:47:50 > @@ -1497,28 +1497,29 @@ > MOD_IMPORT_FUNCTION= > aixdynamic=no > hpuxdynamic=no > -if test "$ac_cv_func_dlopen" != yes || > - test "$ac_cv_func_dlsym" != yes || > - test "$ac_cv_func_dlerror" != yes; then > - if test "$ac_cv_func_load" != yes || > - test "$ac_cv_func_unload" != yes || > - test "$ac_cv_func_loadbind" != yes || > - test "$ac_cv_func_loadquery" != yes; then > - if test "$ac_cv_func_shl_load" != yes || > - test "$ac_cv_func_shl_unload" != yes || > - test "$ac_cv_func_shl_findsym" != yes; then > - dynamic=no > - elif test "x$dynamic" = xyes; then > - hpuxdynamic=yes > - DL_EXT="${DL_EXT=sl}" > - dnl autoheader won't allow us to define anything which isn't > - dnl going into a header, and we can't undefine anything, so > - dnl just define this anyway and rely on the later tests to > - dnl define DYNAMIC or not. > - AC_DEFINE(HPUXDYNAMIC)dnl > - fi > - elif test "x$dynamic" = xyes; then > +if test "$ac_cv_func_load" = yes && > + test "$ac_cv_func_unload" = yes && > + test "$ac_cv_func_loadbind" = yes && > + test "$ac_cv_func_loadquery" = yes; then > + dnl Force AIXDYNAMIC even on newer versions that have dl family > + if test "x$dynamic" = xyes; then > aixdynamic=yes > + fi > +elif test "$ac_cv_func_dlopen" != yes || > + test "$ac_cv_func_dlsym" != yes || > + test "$ac_cv_func_dlerror" != yes; then > + if test "$ac_cv_func_shl_load" != yes || > + test "$ac_cv_func_shl_unload" != yes || > + test "$ac_cv_func_shl_findsym" != yes; then > + dynamic=no > + elif test "x$dynamic" = xyes; then > + hpuxdynamic=yes > + DL_EXT="${DL_EXT=sl}" > + dnl autoheader won't allow us to define anything which isn't > + dnl going into a header, and we can't undefine anything, so > + dnl just define this anyway and rely on the later tests to > + dnl define DYNAMIC or not. > + AC_DEFINE(HPUXDYNAMIC)dnl > fi > fi There's no zshconfig.ac in the zsh-4.0.1 source I have so I presume that's what you meant about needing to patch configure.in directly. However, I was unsure about what was meant about autoconf (the currently installed version is either 2.14.1 or 2.13), so I patched configure directly (substituting AC_DEFINE and dnl the way they were done in configure). On doing plain configure (which uses gcc), it compiles ok up until: Updated `stamp-modobjs'. rm -f libzsh-4.0.1.so gcc -s -o libzsh-4.0.1.so `cat stamp-modobjs` -ldl -lcurses -lm -lc ld: 0711-317 ERROR: Undefined symbol: .main ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status gmake[1]: *** [libzsh-4.0.1.so] Error 1 gmake[1]: Leaving directory `/cs/src/zsh/zsh-4.0.1/Src' gmake: *** [all] Error 1 On doing a "CC=cc ./configure --prefix=/cs" it compiles and runs the tests, failing A04 and C02 as before, and now also Y0[123] (with failure to load module zsh/zpty). Apparently the modules aren't built separately? And I can't load zsh/zftp, so something is wrong. It looks like a bunch of modules are specified in config.modules as link=no auto=yes but they don't appear to be built, installed, or loadable from zsh. Tim