关于libpthread.a静态链接缺少依赖问题


在交叉编译一个项目,链接了uClibc库中的libpthread.a,出现了undefined reference to  `_Unwind_Resume',符号缺失问题。添加-lgcc_eh这个库就能够解决。


pgf77 -o ../gamess.01.x -Bstatic -i8 -i8storage -fastsse -Mipa=fast,safe -Mprof=func gamess.o unport.o zunix.o aldeci.o algnci.o basccn.o basecp.o basext.o bashuz.o bashz2.o basn21.o basn31.o baspcn.o bassto.o ccaux.o ccqaux.o ccquad.o ccsdt.o chgpen.o cisgrd.o cosmo.o cphf.o cpmchf.o cprohf.o ddilib.o delocl.o demrpt.o dft.o dftaux.o dftexc.o dftfun.o dftgrd.o dftint.o dgeev.o dgesvd.o dmulti.o drc.o ecp.o ecpder.o ecplib.o ecppot.o efchtr.o efdrvr.o efgrda.o efgrdb.o efgrdc.o efgrd2.o efinp.o efinta.o efintb.o efelec.o efpaul.o efpcm.o efpcov.o eigen.o eomcc.o ffield.o fmo.o fmogrd.o fmoint.o fmoio.o fmolib.o fmoprp.o frfmt.o fsodci.o globop.o gradex.o guess.o grd1.o grd2a.o grd2b.o grd2c.o gugdga.o gugdgb.o gugdm.o gugdm2.o gugdrt.o gugem.o gugsrt.o gvb.o hess.o hss1a.o hss1b.o hss2a.o hss2b.o inputa.o inputb.o inputc.o int1.o int2a.o int2b.o int2c.o int2d.o int2f.o int2g.o int2r.o int2s.o int2t.o int2u.o int2v.o int2w.o int2x.o iolib.o lagran.o local.o loccd.o locpol.o mcpinp.o mcpint.o mcplib.o mccas.o mcjac.o mcqdpt.o mcqdwt.o mcqud.o mcscf.o mctwo.o mm23.o mp2.o mp2ddi.o mp2grd.o mpcdat.o mpcgrd.o mpcint.o mpcmol.o mpcmsc.o morokm.o mthlib.o nameio.o nmr.o ordint.o ormas1.o parley.o pcm.o pcmcav.o pcmcv2.o pcmder.o pcmdis.o pcmief.o pcmpol.o pcmvch.o prpel.o prplib.o prppop.o qeigen.o qfmm.o qmfm.o qrel.o raman.o rhfuhf.o rxncrd.o ryspol.o scflib.o scfmi.o scrf.o sobrt.o soffac.o solib.o sozeff.o statpt.o surf.o svpchg.o svpinp.o svpleb.o symorb.o symslc.o tdhf.o tdx.o tdxio.o tdxitr.o tdxni.o tdxprp.o trans.o trfdm2.o trnstn.o trudge.o umpddi.o vibanl.o vscf.o zapddi.o zheev.o zmatrx.o qmmm.o vbdum.o ../ddi/libddi.a -lpthread -lacml 

IPA: no IPA optimizations for 178 source files 
../ddi/libddi.a(std_system.o)(.text+0x75): In function `Gethostbyname': 
std_system.c: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking 
/usr/lib64/libpthread.a(pthread_once.o)(.text+0x92): In function `clear_once_control': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libpthread.a(pthread_once.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libpthread.a(unwind.o)(.text+0x8b): In function `unwind_stop': 
: undefined reference to `_Unwind_GetCFA' 
/usr/lib64/libpthread.a(unwind.o)(.text+0xb5): In function `unwind_stop': 
: undefined reference to `_Unwind_GetCFA' 
/usr/lib64/libpthread.a(unwind.o)(.text+0x18a): In function `__pthread_unwind': 
: undefined reference to `_Unwind_ForcedUnwind' 
/usr/lib64/libpthread.a(unwind.o)(.text+0x1d8): In function `__pthread_unwind_next': 
: undefined reference to `_Unwind_ForcedUnwind' 
/usr/lib64/libc.a(iofclose.o)(.text+0x206): In function `fclose': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(iofclose.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(iofflush.o)(.text+0xf0): In function `fflush': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(iofflush.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(iofputs.o)(.text+0x135): In function `fputs': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(iofputs.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(iofread.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(ioftell.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(iofwrite.o)(.text+0x15e): In function `fwrite': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(iofwrite.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(ioputs.o)(.text+0x185): In function `puts': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(ioputs.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(ioseekoff.o)(.text+0x1ed): In function `_IO_seekoff': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(ioseekoff.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(ioungetc.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(wfileops.o)(.text+0x59e): In function `_IO_wfile_underflow': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(wfileops.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(fputc.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(fseek.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(getc.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(fileops.o)(.text+0x3de): In function `_IO_new_file_underflow': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(fileops.o)(.text+0x233d): In function `_IO_file_fopen': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(fileops.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(syslog.o)(.text+0x222): In function `closelog': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(syslog.o)(.text+0x2a7): In function `openlog': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(syslog.o)(.text+0x82a): In function `vsyslog': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(syslog.o)(.text+0x842): In function `vsyslog': 
: undefined reference to `_Unwind_Resume' 
/usr/lib64/libc.a(syslog.o)(.eh_frame+0x12): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(backtrace.o)(.text+0x26): In function `backtrace_helper': 
: undefined reference to `_Unwind_GetIP' 
/usr/lib64/libc.a(backtrace.o)(.text+0x84): In function `backtrace': 
: undefined reference to `_Unwind_Backtrace' 
/usr/lib64/libc.a(iogetdelim.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(putchar.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(getchar.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
/usr/lib64/libc.a(putc.o)(.eh_frame+0x11): undefined reference to `__gcc_personality_v0' 
child process exit status 1: /usr/bin/ld 

你可能感兴趣的:(linux开源移植)