Subject: libtool problems with Sun Studio 11
To: None <>
From: Klaus Heinz <>
List: tech-pkg
Date: 12/20/2005 17:37:10

I am seeing the following two problems with libtool on Solaris 10 with
the SunStudio 11 compiler and I suspect that both may be related to an
incorrectly working libtool:

  $ cd graphics/glu
  $ bmake
  ===> Building for glu-6.2.1nb1
  cd /var/tmp/ &&
  /usr/bin/rm -fr src/mesa src/glut src/glw progs 
  (cd configs && rm -f current && ln -s sunos5 current)
  /opt/studio/pkg-current32/bin/bmake default
  Making sources for sunos5
  libtool  --mode=compile  cc -c -I../../../include -Iinclude -Iinternals
  -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess -KPIC -Xa
  -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DNDEBUG
  -DLIBRARYBUILD libutil/error.c -o libutil/error.o
  libtool: compile: unable to infer tagged configuration
  libtool: compile: specify a tag with `--tag'
  *** Error code 1


I haven't got any idea what this option "--tag" is supposed to do, I
could not found it in the info pages about libtool 1.5.18.

  $ cd graphics/tiff
  $ bmake
  $ bmake install
  /bin/ksh ../libtool --mode=install /usr/ucb/install -c -o root -g root 'libtif' '/opt/studio/pkg-current32/lib/'
  libtool: install: warning: relinking `'
   (cd /var/tmp/;
  /bin/ksh /opt/studio/pkg-current32/bin/libtool --tag=CXX --mode=relink g++ -O
  -Wl,-R/opt/studio/pkg-current32/lib -o -rpath /opt/studio/pkg-current32/lib
  -no-undefined -version-number 3:7:4 tif_stream.lo -L../libtiff/.libs
  ../libtiff/ -L../port/.libs ../port/ -ljpeg -lz -lm -lc )
  rm -fr .libs/libtiffxx.lax
  mkdir .libs/libtiffxx.lax
  rm -fr .libs/libtiffxx.lax/libport.a
  mkdir .libs/libtiffxx.lax/libport.a
  (cd .libs/libtiffxx.lax/libport.a && ar x
  mv: cannot access
  libtool: install: error: relink `' with the above command
  before installing it
  *** Error code 1


The library does not exist. The output of the build
log shows:

  /bin/ksh ../libtool --tag=CXX --mode=link g++ -O
-I/opt/studio/pkg-current32/include  -L/opt/studio/pkg-current32/lib
-Wl,-R/opt/studio/pkg-current32/lib -o -rpath
/opt/studio/pkg-current32/lib -no-undefined -version-number 3:7:4
tif_stream.lo ../libtiff/ ../port/ -ljpeg -lz -lm -lc

but I can see no command that does the actual linking.

The corresponding line in .work.log shows:

  <*> /var/tmp/
--tag=CXX --mode=link g++ -O -I/opt/studio/pkg-current32/include
-L/opt/studio/pkg-current32/lib -Wl,-R/opt/studio/pkg-current32/lib
-o -rpath /opt/studio /pkg-current32/lib -no-undefined
-version-number 3:7:4 tif_stream.lo ../libtiff/
../port/ -ljpeg -lz -lm -lc
  <.> /opt/studio/pkg-current32/bin/libtool --tag=CXX --mode=link g++ -O
-I/var/tm p/
-Wl,-R/opt/studio/pkg-current32/lib -o -rpath
/opt/studio/pkg-current32/lib -no-undefined -version-number 3:7:4
tif_stream.lo ../libtiff/ ../port/ -ljpeg -lz -lm -lc

Can anyone aquainted with libtool tell whether this could be related to
the skipped/failed tests of libtool-base?
  SKIP: demo-nopic.test
  FAIL: tagdemo-make.test
  SKIP: tagdemo-exec.test
  PASS: tagdemo-shared.test
  FAIL: tagdemo-make.test
  SKIP: tagdemo-exec.test

  [ the Fortran tests failed or skipped as well but that happens with
    GCC as well and can be explained by the missing Fortran compiler ]