Experience with g++ 4.8 and -frepo?

David Kastrup dak@gnu.org
Wed Aug 27 10:22:00 GMT 2014


Hi, I've tried compiling a larger application with the -frepo option on
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
with matching libstdc++-4.8-dev and when configuring/compiling with
-frepo I get (after collect repeatedly recompiling and relinking)

collect: relinking
./out/../../flower/out/library.a(file-path.o): In function `_M_insert_dispatch<__gnu_cxx::__normal_iterator<const std::basic_string<char>*, std::vector<std::basic_string<char> > > >':
/usr/include/c++/4.8/bits/stl_vector.h:1291: undefined reference to `void std::vector<std::string, std::allocator<std::string> >::_M_range_insert<__gnu_cxx::__normal_iterator<std::string const*, std::vector<std::string, std::allocator<std::string> > > >(__gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator<std::string> > >, __gnu_cxx::__normal_iterator<std::string const*, std::vector<std::string, std::allocator<std::string> > >, __gnu_cxx::__normal_iterator<std::string const*, std::vector<std::string, std::allocator<std::string> > >, std::forward_iterator_tag)'
./out/../../flower/out/library.a(polynomial.o): In function `__unguarded_partition_pivot<__gnu_cxx::__normal_iterator<double*, std::vector<double> >, std::less<double> >':
/usr/include/c++/4.8/bits/stl_algo.h:2294: undefined reference to `void std::__move_median_to_first<__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, std::less<double> >(__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, std::less<double>)'
./out/../../flower/out/library.a(polynomial.o): In function `make_heap<__gnu_cxx::__normal_iterator<double*, std::vector<double> >, std::less<double> >':
/usr/include/c++/4.8/bits/stl_heap.h:447: undefined reference to `void std::__adjust_heap<__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, int, double, std::less<double> >(__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, int, int, double, std::less<double>)'
./out/../../flower/out/library.a(polynomial.o): In function `__pop_heap<__gnu_cxx::__normal_iterator<double*, std::vector<double> >, std::less<double> >':
/usr/include/c++/4.8/bits/stl_heap.h:341: undefined reference to `void std::__adjust_heap<__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, int, double, std::less<double> >(__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, int, int, double, std::less<double>)'
collect2: error: ld returned 1 exit status
make[1]: *** [out/lilypond] Error 1
make[1]: Leaving directory `/usr/local/tmp/lilypond/lily'
make: *** [all] Error 2

To my untrained eye that looks like the link exclusively fails on
libstdc++ with everything in the application getting resolved.
Obviously libstdc++-dev is installed in non-user-writable directories.

Are there known issue with that kind of setup?  If -frepo supposed to
work?  This is actually a rather big application, so it is an actually
small number of problems for a broken feature, but still the problems
are non-zero.

Now -frepo is probably a non-starter here because of its impact on
compile time.  It conceivably helps code size, however, and it _does_
make a difference regarding some problems with template specializations.

At any rate, does the above error trail ring a bell to anybody?

-- 
David Kastrup



More information about the Libstdc++ mailing list