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

Bug#287466: g++-3.4 is confused by -L/usr/lib



unreproducible.

what is the -op option supposed to do? Or do you mean -o p?

kronos@kronoz.cjb.net writes:
> Package: g++-3.4
> Version: 3.4.3-6
> Severity: normal
> 
> 
> g++-3.4 seems to be confused by -L/usr/lib and is unable to locate part
> of the standard library.
> I discovered the problem while working with libxml2 (-L/usr/lib comes
> from xml2-config --libs).
> 
> This is a minimal test case:
> 
> --- p.cc ---
> #include <list>
> 
> int main(void) {
> 	std::list<int> l;
> 
> 	l.push_back(1);	/* KO */
> }
> ----
> 
> Works:
> kronos:/tmp$ g++-3.4 -Wall -op p.cc
> 
> Fails:
> kronos:/tmp$ g++-3.4 -L/usr/lib -Wall -op p.cc
> /tmp/ccoZVXoN.o(.gnu.linkonce.t._ZNSt4listIiSaIiEE9_M_insertESt14_List_iteratorIiERKi+0x24): In function `std::list<int, std::allocator<int> >::_M_insert(std::_List_iterator<int>, int const&)':
> : undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
> collect2: ld returned 1 exit status
> 
> The error doesn't happen with other -L flags (eg. -L/usr/local/lib).
> 
> Note that I've another gcc installed:
> 
> ii  gcc                        3.3.5-1                    The GNU C compiler
> ii  g++                        3.3.5-1                    The GNU C++ compiler
> ii  libstdc++5-3.3-dev         3.3.5-5                    The GNU Standard C++ Library v3 (development files)
> 
> and this one works:
> 
> kronos:/tmp$ g++-3.3 -L/usr/lib -Wall -op p.cc
> 
> I've also tested other containers (vector, deque, stack) and AFAICS only
> std::list is affected.
> 
> 
> -- System Information:
> Debian Release: 3.1
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: i386 (i686)
> Kernel: Linux 2.6.10-rc3
> Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)
> 
> Versions of packages g++-3.4 depends on:
> ii  gcc-3.4                     3.4.3-6      The GNU C compiler
> ii  gcc-3.4-base                3.4.3-6      The GNU Compiler Collection (base 
> ii  libc6                       2.3.2.ds1-19 GNU C Library: Shared libraries an
> ii  libstdc++6-dev              3.4.3-6      The GNU Standard C++ Library v3 (d
> 
> -- no debconf information
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: