Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: AIX-problem: the main module won't link statically



On Sat, 9 Jun 2001 12:52:29 +0400, "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author