-no-undefined broken for HEAD

Allan Sandfeld Jensen snowwolf at one2one-networks.com
Tue Aug 13 10:49:01 BST 2002

On Tuesday 13 August 2002 11:34, Martijn Klingens wrote:
> On Tue, 13 Aug 2002, Allan Sandfeld Jensen wrote:
> > Yes, the HEAD version of libtool we use havent implemented -no-undefined
> > for the gcc target. I did some experiments with it, but it seems adding
> > support makes it impossible to build KDE since -no-undefined also
> > disallows shared libraries that depend on other shared libraries, which
> > is used extensively in KDE. (Apparently in ELF terms, symbols in an
> > extern shared library are considered undefined)
> Strange... works fine here with my 3.0 branch. What is changed in libtool
> then that no longer makes this possible for HEAD?

What is possible in the 3.0 branch? 
Both use the same version of libtool, using diff only shows support for x86-64 
has been added.

Grep shows no support for the gnu linker:
% grep no_undefined_flag libtool.m4.in
_LT_AC_TAGVAR(no_undefined_flag, $1)=
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'

OTOH I am not sure exactly what you use this flag for, I just looked into it 
because it broke compilation with the Sun Workshop 6.4 C-compiler. When 
adding the equivalent of '-zdefs' to g++ ('-Wl,-no-undefined') while 
compiling libkdecore or libkdeui, linking broke in exactly the same way: The 
linker complained that the library depended on other shared libraries.


More information about the kde-core-devel mailing list