Basic_istream::ignore() not found during compile (MacOS)

I’m trying to compile root from source on OS X 10.4.4, gcc 4.0.1 (I have XCode 2.2.1 installed) on a PPC G4 machine, but am continually running into a problem with std::basic_istream::ignore() not defined while compiling the CINT library. Does anyone have any suggestions for what I need to do to resolve this?

Thanks for any help,

Running build/unix/
g++ -O2 -bind_at_load -o cint/main/cint_tmp cint/main/cppmain.o
cint/src/g__cfunc.o cint/main/G__setup.o cint/src/Api.o cint/src/Apiif.o cint/src/BaseCls.o cint/src/CallFunc.o cint/src/Class.o cint/src/DataMbr.o cint/src/Method.o cint/src/MethodAr.o cint/src/Shadow.o cint/src/Token.o cint/src/Type.o cint/src/Typedf.o cint/src/bc_assign.o cint/src/bc_autoobj.o cint/src/bc_cfunc.o cint/src/bc_debug.o cint/src/bc_eh.o cint/src/bc_exec.o cint/src/bc_inst.o cint/src/bc_item.o cint/src/bc_parse.o cint/src/bc_reader.o cint/src/bc_type.o cint/src/bc_vtbl.o cint/src/rflx_gendict.o cint/src/rflx_gensrc.o cint/src/rflx_tools.o cint/src/v6_auxu.o cint/src/v6_cast.o cint/src/v6_debug.o cint/src/v6_decl.o cint/src/v6_disp.o cint/src/v6_dump.o cint/src/v6_end.o cint/src/v6_error.o cint/src/v6_expr.o cint/src/v6_fread.o cint/src/v6_func.o cint/src/v6_gcoll.o cint/src/v6_global1.o cint/src/v6_global2.o cint/src/v6_ifunc.o cint/src/v6_inherit.o cint/src/v6_init.o cint/src/v6_input.o cint/src/v6_intrpt.o cint/src/v6_loadfile_tmp.o cint/src/v6_macro.o cint/src/v6_malloc.o cint/src/v6_memtest.o cint/src/v6_new.o cint/src/v6_newlink.o cint/src/v6_oldlink.o cint/src/v6_opr.o cint/src/v6_parse.o cint/src/v6_pause.o cint/src/v6_pcode.o cint/src/v6_pragma.o cint/src/v6_quote.o cint/src/v6_scrupto.o cint/src/v6_shl.o cint/src/v6_sizeof.o cint/src/v6_stdstrct.o cint/src/v6_struct.o cint/src/v6_stub.o cint/src/v6_tmplt.o cint/src/v6_typedef.o cint/src/v6_val2a.o cint/src/v6_value.o cint/src/v6_var.o cint/src/gcc3strm.o cint/src/longif3.o -lm -L/sw/lib -ldl
/usr/bin/ld: Undefined symbols:
std::basic_istream<char, std::char_traits >::ignore(int)
std::basic_istream<char, std::char_traits >::ignore()
collect2: ld returned 1 exit status
make: *** [cint/main/cint_tmp] Error 1

Not sure why, but compiling for the umpteenth time actually spat out a little more info:

ld: Undefined symbols:
__ZNSi6ignoreEi referenced from libCint expected to be defined in libstdc++
__ZNSi6ignoreEv referenced from libCint expected to be defined in libstdc++
/usr/bin/libtool: internal link edit command failed
ln -fs libPyROOT.dylib lib/
==> lib/libPyROOT.dylib done
g++ -O2 -bind_at_load -o bin/root.exe main/src/rmain.o
-Llib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix -lRint -lm -lpthread -ldl
/usr/bin/ld: Undefined symbols:
std::basic_istream<char, std::char_traits >::ignore(int)referenced from libCint expected to be defined in libstdc++
std::basic_istream<char, std::char_traits >::ignore()referenced from libCint expected to be defined in libstdc++
collect2: ld returned 1 exit status
make: *** [bin/root.exe] Error 1

I found that libstdc++.dylib exists for gcc 4.0.1 on my computer, but not libstdc++.a. Oddly, both libs exist for gcc 3.3 which I also have installed from XCode. So, I tried compiling anew with gcc 3.3, and all in life is well again. All of root compiles. I’m not sure if it is the existence of the libstdc++.a library or not. But here’s what I found inside…

cd /usr/lib
find . -name “libstdc*” -print
nm gcc/darwin/3.3/libstdc++.a | grep ignore
00007a98 S
0000825c S
00001de0 T __ZNSi6ignoreEii
00004e24 T __ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEii
nm gcc/powerpc-apple-darwin8/4.0.1/libstdc++.dylib | grep ignore
8f97dd6c T __ZNSi6ignoreEii
8f9d5fec S
8f9805f0 T __ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEii
8f9d6614 S

So it appears that the symbols the linker complained about (__ZNSi6ignoreEi and __ZNSi6ignoreEv) indeed are not in the 4.0.1 library. And I guess that when one compiles under 3.3, the symbols all match up properly. Oh well. If someone else really understands why gcc 4.0.1 isn’t working, let me know.


Hi Gene,

it almost looks like there are object files hanging around from a previous build with a different compiler. You do properly “make distclean” before trying to build?

I’ve not problems with gcc 4.0.1 on my G5 Tiger machine and have also Xcode 2.2 installed.

Cheers, Fons.

Thanks for your response, Fons. I do even better: a completely clean cvs checkout in a new directory. But I can imagine somewhere outside of the ROOT software on my computer there is some “old” library with the wrong symbols for linking. Maybe in my cernlib? Not sure how I’d determine this.

Have you installed XCode 2.2.1? Maybe something in the minor update from 2.2 is an issue.



No problems with XCode 2.2.1 on MacOSX 10.4.4 with 5.08 and CVS
head .

Check with you are loading with “otool -L”, see