在 ubuntu 32 位桌面系统上编译我的程序时出现此错误。我认为这可能是图书馆问题。谁能告诉我正确答案…………
问题是......
/usr/bin/ld: errno: TLS definition in /lib/i386-linux-gnu/libc.so.6 section .tbss mismatches non-TLS reference in /media/9C2C3AB22C3A8774/tez/Ahmadfiles/cern_mohammad/cern/pro/lib/libpacklib.a(remote.o)
/lib/i386-linux-gnu/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
生成文件:
C = .c
F = .f
O = .o
output = geant_elastic_135
paw2root = h2root
datadisk = /home/bayat/
.SUFFIXES: $(C) $(F)
SRCS = draw_i$(F) scint_geo$(F) mwpc_geo$(F) gutrev$(F) \
gukine$(F) gustep$(F) material$(F) carb_del_geo$(F)\
uginit$(F) uglast$(F) pipe$(F) function$(F) \
ugeom$(F) guout$(F) ntuple$(F) target$(F)\
pbal_geo$(F) gcalor_unix$(F) guphad$(F)\
guhadr$(F)
OBJS = draw_i$(O) scint_geo$(O) mwpc_geo$(O) gutrev$(O)\
gukine$(O) gustep$(O) material$(O) carb_del_geo$(O)\
uginit$(O) uglast$(O) pipe$(O) function$(O) \
ugeom$(O) guout$(O) ntuple$(O) target$(O) \
pbal_geo$(O) gcalor_unix$(O) guphad$(O)\
guhadr$(O)
CERNLIB = -L/media/9C2C3AB22C3A8774/tez/Ahmadfiles/cern_mohammad/cern/pro/lib
CERNOPT = -L/media/9C2C3AB22C3A8774/tez/Ahmadfiles/cern_mohammad/cern/pro/lib
CERNINCL = -I/media/9C2C3AB22C3A8774/tez/Ahmadfiles/cern_mohammad/cern/pro/include
LIBS = -L/usr/X11R6/lib
LINKLIB = -lgeant321 -lkernlib -lpawlib -lgraflib -lgrafX11 -lX11 -lm \
-lpacklib -lmathlib -lphtools -lg2c -lcrypt -ldl -lnsl -llapack3 \
-lblas
FORTOPT = -x f77-cpp-input -Wall
.c.o:
gcc -c $(CERNINCL) $<
.f.o:
g77 -Wall -c $(FORTOPT) $(CERNOPT) $(CERNINCL) $<
default: $(OBJS)
g77 -Wall main.f -o gbat.exe $(OBJS) $(CERNLIB) $(LIBS) \
$(LINKLIB) $(LINKLIB)
i :$(OBJS)
g77 -Wall gxint321.f -o gint.exe $(OBJS) $(CERNLIB) $(LIBS) \
$(LINKLIB) $(LINKLIB)
t:
$(paw2root) $(output).hbook $(output).root
ls -sh $(output).*
mv $(output).* $(datadisk)
@echo "$(output) transfered to $(datadisk)"
clean:
rm *.o *~ gbat.exe gint.exe
这是 main.f :
PROGRAM POLARIMETER
*
* Main program for polarimeter detector
*
* Declaration
IMPLICIT NONE
INTEGER NGBANK, NWPAWC, MAX_TIME
PARAMETER(NGBANK=60000000,NWPAWC=5000000, MAX_TIME=3000000)
REAL H(NGBANK), Q(NWPAWC)
REAL t
COMMON/GCBANK/H
COMMON/PAWC/Q
*
* Begining of the main program
CALL TIMEST(24.*3600.)
call timel(t)
print *,t
*
* initialize GEANT and HBOOK memory
CALL GZEBRA(NGBANK)
CALL HLIMIT(-NWPAWC)
*
* Open graphics system
* CALL HPLINT(0)
* CALL IGMETA(8,0)
* GEANT initialization
CALL UGINIT
* Event processing
CALL GRUN
* End of run
CALL UGLAST
END
最佳答案
你需要:
#include <errno.h>
不能将其作为外部整数。
关于c++ - "/usr/bin/ld: errno: TLS definition in/lib/libc.so.6"在编译一个 fortran 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29206365/