This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14869] count of external relocation entries does not match


------- Additional Comments From rwgk at yahoo dot com  2004-04-08 17:36 -------
A large (11MB) but self-contained reproducer is available at this location:

http://cci.lbl.gov/~rwgk/bugs/gcc350/dbg_gcc350_20040406.tar.gz

Requirements:
  Mac OS 10.3 (we are using 10.3.2)
  Xcode Tools (we are using v1.1)

Xcode Tools is required because this installs the Python include files.

I've spent some time narrowing down the issue a little bit. The problem appears 
to be related to the number of recursive uses of chaining. E.g. a simplified 
version of typical Boost.Python bindings:

  class_<some_type>("some_type")
    .def("member_function_1", &some_type::member_function_1)
    .def("member_function_2", &some_type::member_function_2)
    //...
    .def("member_function_n", &some_type::member_function_n)
  ;

The link error occurs only if there are too many .def()'s.

I've set up two demos, demo_ok.csh and demo_fail.csh:

gunzip -c dbg_gcc350_20040406.tar.gz | tar xf -
cd dbg_gcc350_20040406
./demo_ok.csh # this will take a few minutes and there should be no errors
./demo_fail.csh # this should take less than a minute and end with an error

The outputs that I got here are in log_ok and log_fail in the tar file.

The only difference between the two demos is a define at the top of the file:

cctbx/crystal/boost_python/direct_space_asu.cpp

(Depending on the demo script used, the file is a copy of 
direct_space_asu_ok.cpp or direct_space_asu_fail.cpp in the same directory).

The define leads to one additional .def() being compiled via demo_fail.csh. 
I've done simple replacement experiments indicating that it doesn't matter 
which of the disabled .def()'s is added. I guess any additional .def() leads to 
the link error.

The exact same source code compiles and links fine with Apple's compiler (gcc 
version 3.3 20030304 (Apple Computer, Inc. build 1495)).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14869


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]