libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tests on AIX 5


From: Ralf Wildenhues
Subject: tests on AIX 5
Date: Mon, 15 Nov 2004 17:36:23 +0100
User-agent: Mutt/1.4.1i

Testing branch-2-0 on AIX 5.2 without and with runtime linking, without
and with a proposed patch:

-- TEST I --
powerpc-ibm-aix5.2.0.0: 7 of 98 tests failed (16 tests were not run)
with gcc/g++/xlf, and

powerpc-ibm-aix5.2.0.0: 7 of 102 tests failed (12 tests were not run)
with xlc/xlC/xlf.  The Fortran stuff all passes here!  Yay!

Issue 1:
several mdemo* build failures:  convenience libraries are not linked in,
especially libltdlc.a, causing failed symbols in libmlib.la.  The patch
at the end "fixes" that in the sense that compilation succeeds, but I
don't know if that is the intended way to fix this (seems to me some
unrelated change in ltmain.m4sh broke this, but I didn't track it down).
Without it, libltdlc.la simply is not present in the link command line
libtool creates.


-- TEST II --
With the patch:
powerpc-ibm-aix5.2.0.0: 4 of 109 tests failed (5 tests were not run)
with gcc/g++/xlf, and

powerpc-ibm-aix5.2.0.0: 4 of 113 tests failed (1 tests were not run)
with xlc/xlC/xlf.


Issue 2:
mdemo*-exec.test all fail, because they can lt_dlopen(NULL), but not
lt_dlsym() a symbol from the main program (the libraries are opened and
used fine).

A cursory search/test showed that it is possible to dlsym() symbols from
the main program by doing one of
- adding -bexpall to the program link line (probably bad)
or
- adding -bE:program.exp to the program link line, with program.exp
  containing `#!' in the first line, and then one to-be-exported symbol
  per line.
Should we consider adding this somewhere?
(LT_SYS_DLOPEN_SELF must probably be adapted as well).


Issue 3:
mdemo2-exec fails in all cases on both ./mdemo and ./mdemo_static with:
| can't open the module mdemo/foo1.la!
| error was: file not found
| can't open the module mdemo/libfoo2.la!
| error was: file not found

I don't know yet why.  After mdemo-conf and mdemo-shared, mdemo-inst
fails to open the modules as well (the installed libs are .a containing
pic in these cases).  Need to adjust permissions somewhere?


Issue 4 (less important):
- with using GNU compilers:  mixing gcc and xlf leads to weird failures:
(I won't pursue this further, but maybe I can convince someone else to :)

| /bin/sh ./libtool --tag=F77 --mode=link f77  -g   -o libfoo2.la -rpath 
/tmp/build/tests/_inst/lib -no-undefined foof2.lo
| libtool: link: generating symbol list for `libfoo2.la'
| /usr/bin/nm -B -BCpg  .libs/foof2.o    | awk '{ if ((($2 == "T") || ($2 == 
"D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > 
.libs/libfoo2.exp
| f77 -shared -o .libs/libfoo2.so.0  .libs/foof2.o    -lc  
-Wl,-bE:.libs/libfoo2.exp -Wl,-bnoentry -Wl,-bernotok
| ld: 0706-012 The -h flag is not recognized.
| ld: 0706-012 The -a flag is not recognized.


-- TEST III --
Using runtime linking:

CC=xlc CXX=xlC F77=xlf LDFLAGS=-brtl:  3 of 113 tests failed (1 not run)
with patch below included (did not bother to test without).
Here, only the mdemo-exec.test invocations fail, for the same reason and
with the same remedies as in Issue 2.


I don't know what this change does to other AIX systems, I cannot test
older AIX releases or other systems.  Is there someone who can test?  Is
this patch OK?

Regards,
Ralf


2004-11-15  Ralf Wildenhues <address@hidden>

        * m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
        [aix4/aix5 !ia64]: Set whole_archive_flag_spec to $convenience
        so the convenience libs are really added to the link cmdline.


Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.125.2.6
diff -u -r1.125.2.6 libtool.m4
--- m4/libtool.m4       1 Nov 2004 15:05:23 -0000       1.125.2.6
+++ m4/libtool.m4       7 Nov 2004 18:53:37 -0000
@@ -3778,7 +3778,7 @@
          # -bexpall does not export symbols beginning with underscore (_)
          _LT_TAGVAR(always_export_symbols, $1)=yes
          # Exported symbols can be pulled into shared objects from archives
-         _LT_TAGVAR(whole_archive_flag_spec, $1)=' '
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
          # This is similar to how AIX traditionally builds it's shared 
libraries.
          _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o 
$output_objdir/$soname $libobjs $deplibs $compiler_flags 
${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS 
$output_objdir/$libname$release.a $output_objdir/$soname'
@@ -4733,7 +4733,7 @@
            # -bexpall does not export symbols beginning with underscore (_)
            _LT_TAGVAR(always_export_symbols, $1)=yes
            # Exported symbols can be pulled into shared objects from archives
-           _LT_TAGVAR(whole_archive_flag_spec, $1)=' '
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
            # This is similar to how AIX traditionally builds it's shared
            # libraries.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]