Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

C: ctype_base.h errors with gcc 4

  1. May 25, 2007 #1
    Hi all,
    I was wondering if anyone has ever run into ctype_base.h errors
    like:
    '<anonymous enum>' is/uses anonymous type.'
    error: trying to instantiate 'template<class T> void operator|(PUP::er&, T&)'

    some sites that i have visited
    say its an error with gcc4

    GUI-mandriva
    sfwr-charm++ for Nchilada


    NC
     
    Last edited: May 25, 2007
  2. jcsd
  3. May 26, 2007 #2
    I haven't run into any problems with that header, though I've never explicitly included it. Can you post an example that reproduces the problem?
     
  4. May 27, 2007 #3

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Try enabling concept checks to get a better diagnostic if there's an error in your code.
     
  5. May 27, 2007 #4
    I'm trying to build a released software called
    ChaNGa(astrophysics N-body sim) that uses charm++ as its parallel framework. Thus i haven't actuallly coded anything on my own.
    ----------------------------
    /1/home/kongw/_Code/API/charm-mpi/mpi-linux/bin/charmc -O3 -I../structures -I../ParallelGravity -DCACHE_TREE -I.. -c -o Reductions.o Reductions.cpp
    /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/../../../../include/c++/4.0.1/i586-mandriva-linux-gnu/bits/ctype_base.h:58: error: '<anonymous enum>' is/uses anonymous type
    /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/../../../../include/c++/4.0.1/i586-mandriva-linux-gnu/bits/ctype_base.h:58: error: trying to instantiate 'template<class T> void operator|(PUP::er&, T&)'
    /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/../../../../include/c++/4.0.1/i586-mandriva-linux-gnu/bits/ctype_base.h:58: error: '<anonymous enum>' is/uses anonymous type
    /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/../../../../include/c++/4.0.1/i586-mandriva-linux-gnu/bits/ctype_base.h:58: error: trying to instantiate 'template<class T> void operator|(PUP::er&, T&)'
    /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/../../../../include/c++/4.0.1/i586-mandriva-linux-gnu/bits/ctype_base.h:61: error: '<anonymous enum>' is/uses anonymous type
    /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/../../../../include/c++/4.0.1/i586-mandriva-linux-gnu/bits/ctype_base.h:61: error: trying to instantiate 'template<class T> void operator|(PUP::er&, T&)'
    Fatal Error by charmc in directory /home/kongw/_Code/API2/ChaNGa/changa
    Command mpicxx -I/1/home/kongw/_Code/API/charm-mpi/mpi-linux/bin/../include -D__CHARMC__=1 -I../structures -I../ParallelGravity -DCACHE_TREE -I.. -O3 -I/usr/include -c Reductions.cpp -o Reductions.o returned error code 1
    charmc exiting...
    make: *** [Reductions.o] Error 1
    ----------------------------

    The error builds pointing to the parallel language Charm++...
    and technically you don't include this header it is included by other system headers.


    Hurkyl:"Try enabling concept checks to get a better diagnostic if there's an error in your code." How do you do this, i'm not a native linux programmer.
     
  6. May 27, 2007 #5

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    It's one of gcc's comand line options. I forget the exact command, but you should be able to find it in the man page, or in the online documentation.
     
  7. May 28, 2007 #6
    Given that you were building in changa when the error occurred, I would first look in changa, specifically Reductions.cpp. It looks like they're trying to instantiate a function with inadequate type information. See if you can take their mpicxx command and pump up the verbosity. gcc points me to the site at which the instantiation was attempted in these situations, makes it easier to locate the problem. Try -Wall.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: C: ctype_base.h errors with gcc 4
  1. Issues with C++ errors? (Replies: 13)

Loading...