On Sep 7, 2011, at 12:32 PM, Ian Lance Taylor wrote: > Bruce Hoglund <bhoglund@xxxxxxx> writes: > >> configure:5790: gcc -o conftest -g -fkeep-inline-functions conftest.c >&5 >> Undefined symbols for architecture x86_64: >> "___builtin___stpncpy_chk", referenced from: >> ___inline_stpncpy_chk in ccL1VweA.o >> ld: symbol(s) not found for architecture x86_64 > > There is some sort of mismatch between the compiler being run as "gcc" > and your system header files. Your system header files appear to assume > that the compiler defines ___builtin___stpncpy_chk. Your compiler > appears to not define that function. > > gcc as normally distributed does not define any sort of > ___builtin___stpncpy_chk function. However, evidently the OS X 10.7 > header files expect it to. > > What program are you running as "gcc"? Is it possible that it is out of > date with respect to the header files? > > For any other ideas, you are going to have to ask somebody familiar with > Darwin. > > Ian I installed gcc via MacPorts (port), which installs in /opt/local/bin. I created a Symbolic Link from gcc to: /opt/local/bin/x86_64-apple-darwin11-gcc-mp-4.5 It reports this version: gcc --version gcc (GCC) 4.5.3 Where does it get the system's header files from? My real goal for all of this is to be able to complile a Fortran program (MCNPX) using either g95 or gfortran, which is also failing for what seem to me similar reasons: " Snipped of Terminal output prior to compiling failure: ar: creating archive hexs.a Build of hexs.a complete f90 -l gfortran -lcrt1.10.5.o -L/usr/local/lib/gcc/x86_64-apple-darwin11.0.0/4.6.1 -L/usr/local/lib/gcc/x86_64-apple-darwin11.0.0/4.6.1/../../.. -lgfortran -lSystem -lgcc_ext.10.5 -lquadmath -lm -lm -o mcnpx f77main/f77main.o mcnpf.a mcnpf/GLOBAL1_zc.o mcnpf/GLOBAL2_vv.o mcnpf/GLOBAL3_st.o mcnpf/GLOBAL4_cg.o mcnpf/GLOBAL4_mb.o mcnpf/GLOBAL4_lk.o mcnpf/GLOBAL5_cm.o mcnpf/GLOBAL6_ht.o mcnpf/IMCN_jc.o mcnpf/GKSSIM_gs.o mcnpf/LAMBDA_lm.o mcnpf/LAMBDA_lt.o mcnpf/MCPLOT_mp.o mcnpf/PLOT_pc.o mcnpf/GLOBAL6_mc.o mcnpf/cemmod.o mcnpf/laqmod31.o mcnpc.a gvaviv.a lcs.a lcs/btbd.o lcs/cabd.o lcs/e0bd.o lcs/elbd.o lcs/h1bd.o lcs/hebd.o lcs/inbd.o lcs/isbd.o lcs/phbd.o lcs/pqbd.o dedx.a dedx/atmdat.o meshtal.a histp.a spabi.a spabi/bdincl1.o spabi/bdincl2.o fluka89.a fluka89/bdnopt.o fluka89/blkdt1.o fluka89/blkdt2.o fluka89/blkdt3.o fluka89/blkdt4.o fluka89/blkdt5.o fluka89/blkdt6.o fluka89/blkdt7.o fluka89/f2bd.o hexs.a hexs/nebd.o hexs/xsbd.o -L/usr/X11/lib -lX11 Undefined symbols for architecture x86_64: "_iargc_", referenced from: _getexm_ in mcnpf.a(getexm.o) "operator delete(void*)", referenced from: _genspfissevt_ in mcnpc.a(LLNLFission.o) _genfissevt_ in mcnpc.a(LLNLFission.o) _genphotofissevt_ in mcnpc.a(LLNLFission.o) "operator new(unsigned long)", referenced from: _genspfissevt_ in mcnpc.a(LLNLFission.o) _genfissevt_ in mcnpc.a(LLNLFission.o) _genphotofissevt_ in mcnpc.a(LLNLFission.o) "std::allocator<char>::allocator()", referenced from: fissionEvent::SmpSpWatt(int) in mcnpc.a(LLNLFission.o) fissionEvent::SmpTerrell(double) in mcnpc.a(LLNLFission.o) fissionEvent::SmpWatt(double, int) in mcnpc.a(LLNLFission.o) itoa(int const&) in mcnpc.a(LLNLFission.o) fissionEvent::getNSepEng(int) in mcnpc.a(LLNLFission.o) fissionEvent::getNubarg(int, double, double, bool) in mcnpc.a(LLNLFission.o) fissionEvent::getTotEngNEnergyCons(double, int) in mcnpc.a(LLNLFission.o) ... "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)", referenced from: fissionEvent::SmpSpWatt(int) in mcnpc.a(LLNLFission.o) fissionEvent::SmpTerrell(double) in mcnpc.a(LLNLFission.o) fissionEvent::SmpWatt(double, int) in mcnpc.a(LLNLFission.o) itoa(int const&) in mcnpc.a(LLNLFission.o) fissionEvent::getNSepEng(int) in mcnpc.a(LLNLFission.o) fissionEvent::getNubarg(int, double, double, bool) in mcnpc.a(LLNLFission.o) fissionEvent::getTotEngNEnergyCons(double, int) in mcnpc.a(LLNLFission.o) ... "std::allocator<char>::~allocator()", referenced from: fissionEvent::SmpSpWatt(int) in mcnpc.a(LLNLFission.o) fissionEvent::SmpTerrell(double) in mcnpc.a(LLNLFission.o) fissionEvent::SmpWatt(double, int) in mcnpc.a(LLNLFission.o) itoa(int const&) in mcnpc.a(LLNLFission.o) fissionEvent::getNSepEng(int) in mcnpc.a(LLNLFission.o) fissionEvent::getNubarg(int, double, double, bool) in mcnpc.a(LLNLFission.o) fissionEvent::getTotEngNEnergyCons(double, int) in mcnpc.a(LLNLFission.o) ... "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from: fissionEvent::SmpSpWatt(int) in mcnpc.a(LLNLFission.o) fissionEvent::SmpWatt(double, int) in mcnpc.a(LLNLFission.o) fissionEvent::getNSepEng(int) in mcnpc.a(LLNLFission.o) fissionEvent::getNubarg(int, double, double, bool) in mcnpc.a(LLNLFission.o) fissionEvent::getTotEngNEnergyCons(double, int) in mcnpc.a(LLNLFission.o) fissionEvent::getTotEngNEnergyConsAllActinides(double, int) in mcnpc.a(LLNLFission.o) fissionEvent::getTotEngPEnergyCons(double, int) in mcnpc.a(LLNLFission.o) ... "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()", referenced from: fissionEvent::SmpSpWatt(int) in mcnpc.a(LLNLFission.o) fissionEvent::SmpTerrell(double) in mcnpc.a(LLNLFission.o) fissionEvent::SmpWatt(double, int) in mcnpc.a(LLNLFission.o) fissionEvent::fissionerr(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in mcnpc.a(LLNLFission.o) fissionEvent::getNSepEng(int) in mcnpc.a(LLNLFission.o) fissionEvent::getNubarg(int, double, double, bool) in mcnpc.a(LLNLFission.o) fissionEvent::getTotEngNEnergyCons(double, int) in mcnpc.a(LLNLFission.o) ... "operator new[](unsigned long)", referenced from: fissionEvent::allocateMem(int, int) in mcnpc.a(LLNLFission.o) "operator delete[](void*)", referenced from: fissionEvent::~fissionEvent() in mcnpc.a(LLNLFission.o) fissionEvent::~fissionEvent() in mcnpc.a(LLNLFission.o) "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()", referenced from: fissionEvent::fissionerr(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in mcnpc.a(LLNLFission.o) std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in mcnpc.a(LLNLFission.o) "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from: fissionEvent::fissionerr(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in mcnpc.a(LLNLFission.o) "std::cerr", referenced from: fissionEvent::fissionerr(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in mcnpc.a(LLNLFission.o) "std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from: fissionEvent::fissionerr(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in mcnpc.a(LLNLFission.o) "std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from: fissionEvent::fissionerr(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in mcnpc.a(LLNLFission.o) "std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)", referenced from: fissionEvent::fissionerr(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in mcnpc.a(LLNLFission.o) "std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))", referenced from: fissionEvent::fissionerr(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in mcnpc.a(LLNLFission.o) "std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)", referenced from: itoa(int const&) in mcnpc.a(LLNLFission.o) "std::basic_ostream<char, std::char_traits<char> >::operator<<(int)", referenced from: itoa(int const&) in mcnpc.a(LLNLFission.o) "std::basic_ios<char, std::char_traits<char> >::operator!() const", referenced from: itoa(int const&) in mcnpc.a(LLNLFission.o) "std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const", referenced from: itoa(int const&) in mcnpc.a(LLNLFission.o) "std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()", referenced from: itoa(int const&) in mcnpc.a(LLNLFission.o) "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const", referenced from: std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in mcnpc.a(LLNLFission.o) "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long)", referenced from: std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in mcnpc.a(LLNLFission.o) "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned long)", referenced from: std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in mcnpc.a(LLNLFission.o) "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from: std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in mcnpc.a(LLNLFission.o) std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in mcnpc.a(LLNLFission.o) "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)", referenced from: std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*) in mcnpc.a(LLNLFission.o) "std::ios_base::Init::Init()", referenced from: __static_initialization_and_destruction_0(int, int) in mcnpc.a(LLNLFission.o) "std::ios_base::Init::~Init()", referenced from: __static_initialization_and_destruction_0(int, int) in mcnpc.a(LLNLFission.o) "___gxx_personality_v0", referenced from: Dwarf Exception Unwind Info (__eh_frame) in mcnpc.a(LLNLFission.o) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: *** [mcnpx] Error 1 " Bruce