Boost logo

Boost Users :

From: Adalbert Perbandt (adalbert.perbandt_at_[hidden])
Date: 2002-07-19 12:16:13


Hi there,

while trying to setup the BGL for use in my environment I'm facing a
strange behavior when I try to put a C++ object file which contains
instanciations of BGL templates into an object library.

My environment:

- Sun SPARC machine with Solaris 2.7 (SunOS 5.7)
- gcc 2.95.2

The problem shows up when I try to put an .o file into a library
file. I can reproduce the error with the file adjacency_list.cpp from
the BGL's examples directory:

$ pwd
/home/perbandt/boost_1_28_0/libs/graph/example

$ g++ --version
2.95.2

$ g++ -g -I../../../../boost_1_28_0 -c adjacency_list.cpp

$ ls -l adjacency_list.o
-rw-r--r-- 1 perbandt relman 3367052 Jul 19 18:40 adjacency_list.o

$ which ar
/usr/ccs/bin/ar

$ ar rv libtest.a adjacency_list.o
a - adjacency_list.o
Bus error

When I try a .a file with already one or more .o files in it I get a
segmentation fault.

With another file that contains instantiations of BGL templates the
problem does appear only when it was compiled with the -g option
given.

Is this a known problem? Seems to me as if ar would have trouble
handling the very long symbol names in the .o file.

Or is something wrong with my environment?

Thanks,

Adalbert Perbandt.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net