FYI, this is with -lstdc++
On Wed, Mar 11, 2015 at 5:05 PM, Barry Smith <[email protected]> wrote: > > Satish, > > Please enhance > > def checkFortranLinkingCxx(self): > '''Check that Fortran can be linked against C++''' > link = 0 > cinc, cfunc, ffunc = self.manglerFuncs[self.fortranMangling] > cinc = 'extern "C" '+cinc+'\n' > > cxxCode = 'void foo(void){'+self.mangleFortranFunction('d1chk')+'();}' > cxxobj = os.path.join(self.tmpDir, 'cxxobj.o') > self.pushLanguage('Cxx') > if not self.checkCompile(cinc+cxxCode, None, cleanup = 0): > > >>> try again here with additional library. > > self.logPrint('Cannot compile Cxx function: '+cfunc, 3, 'compilers') > raise RuntimeError('Fortran could not successfully link C++ objects') > if not os.path.isfile(self.compilerObj): > self.logPrint('Cannot locate object file: > '+os.path.abspath(self.compilerObj), 3, 'compilers') > raise RuntimeError('Fortran could not successfully link C++ objects') > os.rename(self.compilerObj, cxxobj) > self.popLanguage() > > so that if the basic link fails it automatically tries again here after > adding the -lstdc++ library. > > Thanks > > Barry > > It is insane to expect users to know they have to add -lstdc++ themselves. > > > > > On Mar 11, 2015, at 5:10 PM, Satish Balay <[email protected]> wrote: > > > > A more suitable way to specify -lstdc++ would be via option LIBS > > [this way its used by clinker,cxxlinker,flinker - as required] > > > > LIBS="-lstdc++" > > > > Satish > > > > On Wed, 11 Mar 2015, Eric Bavier wrote: > > > >> It looks like you are building with the PGI compilers. Try adding: > >> > >> --CXX_LINKER_FLAGS="-Meh_frame -lstdc++" > >> > >> to your petsc configure flags. > >> > >> Hope that helps, > >> `~Eric Bavier, Scientific Libraries, Cray Inc. > >> ________________________________________ > >> From: [email protected] [[email protected]] on > behalf of Satish Balay [[email protected]] > >> Sent: Wednesday, March 11, 2015 16:55 > >> To: Mark Adams > >> Cc: For users of the development version of PETSc > >> Subject: Re: [petsc-dev] Configure problem on Titan > >> > >>>>>>>>>>> > >> Executing: ftn -o /tmp/scratch/petsc-5_JlCR/config.compilers/conftest > -mp -fast /tmp/scratch/petsc-5_JlCR/config.compilers/conftest.o > /tmp/scratch/petsc-5_JlCR/config.compilers/cxxobj.o > /tmp/scratch/petsc-5_JlCR/config.compilers/confc.o -ldl > >> Possible ERROR while running linker: exit code 512 > >> stderr: > >> /tmp/scratch/petsc-5_JlCR/config.compilers/cxxobj.o:(.eh_frame+0x12): > undefined reference to `__gxx_personality_v0' > >> /tmp/scratch/petsc-5_JlCR/config.compilers/confc.o:(.eh_frame+0x12): > undefined reference to `__gxx_personality_v0' > >> /usr/bin/ld: link errors found, deleting executable > `/tmp/scratch/petsc-5_JlCR/config.compilers/conftest' > >> <<<<<< > >> > >> Perhaps the compilers are not setup correctly after the update? > >> > >> If you don't need c++ - you can try building with --with-cxx=0 > configure option.. > >> > >> satish > >> > >> On Wed, 11 Mar 2015, Mark Adams wrote: > >> > >>> I am getting this error on Titan. They just had a big PM and it was > >>> recommended that we rebuild everything > >>> > >> > >> > > > >
configure.log
Description: Binary data
