libtool
[Top][All Lists]
Advanced

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

Re: forward porting UnixWare fixes to HEAD


From: Ralf Wildenhues
Subject: Re: forward porting UnixWare fixes to HEAD
Date: Thu, 29 Sep 2005 10:36:23 +0200
User-agent: Mutt/1.5.11

Hi Tim,

* Tim Rice wrote on Thu, Sep 29, 2005 at 06:21:45AM CEST:
> 
> I'm attempting to forward port the branch-1-5 UnixWare fixes
> to CVS HEAD. All of the old tests pass now but 2 of the new tests (18 & 19)
> fail. Pointers would be appreciated.

I had expected these tests to fail.  They try to use C++ templates
together with shared libraries; since Libtool support for this is
still very experimental (and has been made to work for a few
compilers only), there is some work to be done.

Basically, before creating a shared library or an executable, you
want to instruct the compiler to create one object per template
instantiation, and you want to add all those additional objects to
the link line.  One instantiation per object helps to avoid duplicate
symbols in case these templates are instantiated several times.

For creating programs, you may set prelink_cmds accordingly.  For
creating shared libraries, for now we have gone with extending
archive_cmds and archive_expsyms_cmds.  Note that more experience
with how compilers work here may lead us to a better partition of the
available information.

As example, you can look at the way linux/pgCC is handled.  Note that
not all compilers may allow the flexibility of these tests: source
files, objects and libraries in different subdirectories.  You may
have to shuffle or muck around with .ii files or the like.  More
hints in these threads:
http://lists.gnu.org/archive/html/libtool/2005-03/msg00020.html
http://lists.gnu.org/archive/html/libtool/2005-03/msg00029.html

Cheers,
Ralf

> ## ---------------------- ##
> ## Detailed failed tests. ##
> ## ---------------------- ##
> 
> 18. template.at:23: testing ...
*snip

> template.at:77: $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS -o 
> libalib.la -rpath /usr/local/lib alib.lo libaclib.la
> stderr:
> prelink: INFO: C++ prelinker: executing: CC  -c  -I.  -g  -KPIC  -DPIC  
> -o.libs/alib.o alib.cpp
> stdout:
> libtool: link: (cd .libs/libalib.lax/libaclib.a && ar x 
> /usr/local/src/gnu/libtool/build/tests/testsuite.dir/18/./.libs/libaclib.a)
> libtool: link: CC -G -h libalib.so.0 -o .libs/libalib.so.0.0.0  .libs/alib.o  
>  .libs/libalib.lax/libaclib.a/aclib.o     
> libtool: link: (cd ".libs" && rm -f "libalib.so.0" && ln -s 
> "libalib.so.0.0.0" "libalib.so.0")
> libtool: link: (cd ".libs" && rm -f "libalib.so" && ln -s "libalib.so.0.0.0" 
> "libalib.so")
> libtool: link: (cd .libs/libalib.lax/libaclib.a && ar x 
> /usr/local/src/gnu/libtool/build/tests/testsuite.dir/18/./.libs/libaclib.a)
> libtool: link: ar cru .libs/libalib.a  alib.o  
> .libs/libalib.lax/libaclib.a/aclib.o 
> libtool: link: : .libs/libalib.a
> libtool: link: rm -fr .libs/libalib.lax .libs/libalib.lax
> libtool: link: creating libalib.la
> libtool: link: ( cd ".libs" && rm -f "libalib.la" && ln -s "../libalib.la" 
> "libalib.la" )
> template.at:78: $CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp
> stderr:
> stdout:
> template.at:79: $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS -o 
> prog prog.$OBJEXT libalib.la
> stderr:
> Undefined                     first referenced
> symbol                            in file
> cq<T1>(T1) [with T1=int, return type=T1]               ./.libs/libalib.so
> UX:ld: ERROR: Symbol referencing errors. No output written to .libs/prog
> stdout:
> libtool: link: CC -g -o .libs/prog prog.o  ./.libs/libalib.so -R/usr/local/lib
> template.at:79: exit code was 1, expected 0
> 18. template.at:23: 18. simple template test (template.at:23): FAILED 
> (template.at:79)
> 
> 19. template.at:115: testing ...

*snip*
> template.at:213: $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS -o sub/main 
> $main_o lib2/libb.la lib/liba.la
> stderr:
> prelink: INFO: C++ prelinker: executing: CC  -c  -I../src/lib  -I../src/lib2  
> -g  -osub/main.o ../src/sub/main.cpp
> Undefined                     first referenced
> symbol                            in file
> b<T1>(T1 &) [with T1=bs, return type=unsigned int]              libb.a(b.o)
> UX:ld: ERROR: Symbol referencing errors. No output written to sub/main
> stdout:
> libtool: link: CC -g -o sub/main sub/main.o  lib2/.libs/libb.a 
> lib/.libs/liba.a
> template.at:214: ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
>          elif test "X$host" != "X$build" && \
>               { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
>          then (exit 77); else (exit $lt_status); fi
> 0a1
> > UX:ksh: ERROR: ./sub/main:  not found
> 19. template.at:115: 19. template test with subdirs (template.at:115): FAILED 
> (template.at:214)
> ............




reply via email to

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