After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 161502 - access error in adaptors/lambda/lambda.cc on Tru64
access error in adaptors/lambda/lambda.cc on Tru64
Status: RESOLVED FIXED
Product: libsigc++
Classification: Bindings
Component: build
2.0
Other OSF/1
: Normal normal
: ---
Assigned To: Martin Schulze
Martin Schulze
Depends on:
Blocks:
 
 
Reported: 2004-12-17 00:12 UTC by Tim Mooney
Modified: 2005-01-19 21:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim Mooney 2004-12-17 00:12:28 UTC
Tru64 UNIX 5.1b, vendor C and C++ compilers.

(Note: this is a completely different issue from bug #113529)

Compiling sigc++ 2.0.6 with CXXFLAGS set to

   CXX=cxx
   CXXFLAGS="-std strict_ansi -model ansi -O2 -g3 -readonly_strings"

eventually results in the compile failing in adaptors/lambda/lambda.cc:

 cxx -DHAVE_CONFIG_H -I.. -I.. -std strict_ansi -model ansi -O2 -g3
-readonly_strings -c -MD adaptors/lambda/lambda.cc  -DPIC -o .libs/lambda.o
cxx: Error: ../sigc++/type_traits.h, line 103: class
          "sigc::is_base_and_derived<T_base, T_derived>::big [with
          T_base=sigc::lambda_base, T_derived=sigc::internal::lambda_select1]"
          is inaccessible
          detected during:
            instantiation of class "sigc::is_base_and_derived<T_base,
                      T_derived>::test [with T_base=sigc::lambda_base,
                      T_derived=sigc::internal::lambda_select1]" at line 109
            instantiation of class "sigc::is_base_and_derived<T_base,
                      T_derived> [with T_base=sigc::lambda_base,
                      T_derived=sigc::internal::lambda_select1]" at line 50 of
                      "../sigc++/adaptors/lambda/base.h"
            processing of template argument list for
                      "sigc::internal::lambda_core" based on template argument
                      <sigc::internal::lambda_select1> at line 316 of
                      "../sigc++/adaptors/lambda/base.h"
            instantiation of class "sigc::lambda<T_type> [with
                      T_type=sigc::internal::lambda_select1]" at line 7 of
                      "adaptors/lambda/lambda.cc"
    static big  is_base_class_(...);
-----------^
cxx: Error: ../sigc++/type_traits.h, line 103: class
          "sigc::is_base_and_derived<T_base, T_derived>::big [with
          T_base=sigc::lambda_base, T_derived=sigc::internal::lambda_select2]"
          is inaccessible
          detected during:
            instantiation of class "sigc::is_base_and_derived<T_base,
                      T_derived>::test [with T_base=sigc::lambda_base,
                      T_derived=sigc::internal::lambda_select2]" at line 109
            instantiation of class "sigc::is_base_and_derived<T_base,
                      T_derived> [with T_base=sigc::lambda_base,
                      T_derived=sigc::internal::lambda_select2]" at line 50 of
                      "../sigc++/adaptors/lambda/base.h"
            processing of template argument list for
                      "sigc::internal::lambda_core" based on template argument
                      <sigc::internal::lambda_select2> at line 316 of
                      "../sigc++/adaptors/lambda/base.h"
            instantiation of class "sigc::lambda<T_type> [with
                      T_type=sigc::internal::lambda_select2]" at line 8 of
                      "adaptors/lambda/lambda.cc"
    static big  is_base_class_(...);
-----------^
cxx: Error: ../sigc++/type_traits.h, line 103: class
          "sigc::is_base_and_derived<T_base, T_derived>::big [with
          T_base=sigc::lambda_base, T_derived=sigc::internal::lambda_select3]"
          is inaccessible
          detected during:
            instantiation of class "sigc::is_base_and_derived<T_base,
                      T_derived>::test [with T_base=sigc::lambda_base,
                      T_derived=sigc::internal::lambda_select3]" at line 109
            instantiation of class "sigc::is_base_and_derived<T_base,
                      T_derived> [with T_base=sigc::lambda_base,
                      T_derived=sigc::internal::lambda_select3]" at line 50 of
                      "../sigc++/adaptors/lambda/base.h"
            processing of template argument list for
                      "sigc::internal::lambda_core" based on template argument
                      <sigc::internal::lambda_select3> at line 316 of
                      "../sigc++/adaptors/lambda/base.h"
            instantiation of class "sigc::lambda<T_type> [with
                      T_type=sigc::internal::lambda_select3]" at line 9 of
                      "adaptors/lambda/lambda.cc"
    static big  is_base_class_(...);
-----------^
cxx: Error: ../sigc++/type_traits.h, line 103: class
          "sigc::is_base_and_derived<T_base, T_derived>::big [with
          T_base=sigc::lambda_base, T_derived=sigc::internal::lambda_select4]"
          is inaccessible
          detected during:
            instantiation of class "sigc::is_base_and_derived<T_base,
                      T_derived>::test [with T_base=sigc::lambda_base,
                      T_derived=sigc::internal::lambda_select4]" at line 109
            instantiation of class "sigc::is_base_and_derived<T_base,
                      T_derived> [with T_base=sigc::lambda_base,
                      T_derived=sigc::internal::lambda_select4]" at line 50 of
                      "../sigc++/adaptors/lambda/base.h"
            processing of template argument list for
                      "sigc::internal::lambda_core" based on template argument
                      <sigc::internal::lambda_select4> at line 316 of
                      "../sigc++/adaptors/lambda/base.h"
            instantiation of class "sigc::lambda<T_type> [with
                      T_type=sigc::internal::lambda_select4]" at line 10 of
                      "adaptors/lambda/lambda.cc"
    static big  is_base_class_(...);
-----------^


I'm pretty weak in C++, but my understanding is that `private' members cannot be
accessed by derived classes, which seems to be what the compiler is complaining
about.

I tried changing the "private:" to "protected:", but it didn't seem to make a
difference.
Comment 1 Murray Cumming 2005-01-19 19:01:12 UTC
Note: The build is now successful (with the version in cvs) without the extra
CXXFLAGS.
Comment 2 Tim Mooney 2005-01-19 19:55:53 UTC
That's great news!  How does a

  make check

do?  With some contortions I could get it to build before, but
as I reported in bug #161503, all the tests segfaulted in the __fini
section.
Comment 3 Murray Cumming 2005-01-19 20:36:04 UTC
It doesn't seem to core dump when not built with "std strict_ansi -model ansi",
but it does with it.

This fixed the compile error:

//Allow the test inner class to access the other (big) inner class.
  //The Tru64 compiler needs this. murrayc.
  struct test;
  friend struct test;


That, and other things for the Tru64 build, are fixed in cvs.
Comment 4 Tim Mooney 2005-01-19 21:33:40 UTC
It's good that it will build without `-std strict_ansi'.  I'm hopefull that it
will build and not coredump whether or not the separate `-model ansi' is used.
That may be required by other packages that link against libsigc++.

In any case, thanks for your work on this!