[Gate-users] 回复:Re: error install lmf

袁波 gogenbyts at sina.com
Sun Dec 23 07:47:42 CET 2018


dear David Boersma:
   thanks for your email. i fell i am very Idiot for can't do such a simple work.

 i did  as your suggestion.but some new error occer.
i use root 6.06.06
gcc 5.4.0
here is the error:




src/oneList_BonusKit.c: In function ‘print_list’:
src/oneList_BonusKit.c:221:14: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘u64 {aka long unsigned int}’ [-Wformat=]
       printf("list[%d]\t time = %llu nanos\t\t\t %llu picos\n",
              ^
src/oneList_BonusKit.c:221:14: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘u64 {aka long unsigned int}’ [-Wformat=]
gcc -I./includes/ -D_FILE_OFFSET_BITS=64 -fPIC -D_64 -std=c99 -c -o obj/calculatesizeevent.o src/calculatesizeevent.c
gcc -I./includes/ -D_FILE_OFFSET_BITS=64 -fPIC -D_64 -std=c99 -c -o obj/makeid.o src/makeid.c
gcc -I./includes/ -D_FILE_OFFSET_BITS=64 -fPIC -D_64 -std=c++98 -c -o obj/Gaussian.o src/Gaussian.cc
gcc -I./includes/ -D_FILE_OFFSET_BITS=64 -fPIC -D_64 -std=c++98 -c -o obj/Sigmoid.o src/Sigmoid.cc
gcc -I./includes/ -D_FILE_OFFSET_BITS=64 -fPIC -D_64  -std=c++98 -c -o obj/outputRootMgr.o src/outputRootMgr.cc
src/outputRootMgr.cc:30:19: fatal error: TFile.h: No such file or directory
compilation terminated.
makefile:50: recipe for target 'obj/outputRootMgr.o' failed
make: *** [obj/outputRootMgr.o] Error 1
yuanbo at yuanbo:~/gate/lmf/lmf_v3.0 $ 


--------------------------------

From Yuan Bo
Zhengzhou University
No.100 Science Avenue,Zhengzhou City, Henan Province P.R.China
TEL:15263308323
来自袁波
郑州大学物理工程学院C楼4层核医学仪器实验室
河南省郑州市中原区科学大道100号
电话:15263308323


----- 原始邮件 -----
发件人:David Boersma <david.boersma at acmit.at>
收件人:gate-users <gate-users at lists.opengatecollaboration.org>
主题:Re: [Gate-users] error install lmf
日期:2018年12月21日 19点48分

Dear Yuan Bo,
The LMF code is very old and is incompatible with modern compilers. But if you tell the compiler that it should use an old standard, then you will not get these errors. You can do this by adding "-std=c99" to the compiler flags for for *.c files, and "-std=c++98" for *.cc files. Lines 30-37 of the makefile would then look like this:
obj/%.o : src/%.c
        gcc $(CFLAGS) -std=c99 -c -o $@ $<
obj/outputRootMgr.o : src/outputRootMgr.cc
        gcc $(CFLAGS) $(ROOTCFLAGS) -std=c++98 -c -o $@ $<
obj/%.o : src/%.cc
        gcc $(CFLAGS) -std=c++98 -c -o $@ $<
(Our mail programs are probably distorting the layout of this text. Please make sure that lines with "obj" are starting at the very beginning of the line, and lines starting with "gcc" should start with a TAB, and definitely not with normal spaces. Yes, the "make" grammar is a bit peculiar.)
With ROOT 5 and gcc version 7.3.0 this compiles on my machine. I did not try any other versions.
I hope that this helps you a little bit. Note that all this comes with VERY BIG DISCLAIMERS: I am not at all an LMF expert, and even though we provide the lmf tarball on our website, we do not officially support this. So I am not guaranteeing anything about whether the above will work. And even if it compiles, it may still run incorrectly: I did not test it... :-)
Good luck,
David Boersma
________________________________________
Von: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> im Auftrag von 袁波 <gogenbyts at sina.com>
Gesendet: Freitag, 21. Dezember 2018 10:17:27
An: gate-users
Betreff: [Gate-users] error install lmf
dear gate user:
          me again. the picture lost ,so i write the error as follow:
[-Wformat=]
       printf("\nThis %llu", tTail);
              ^
src/oneList_flowchart.c:149:14: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64 {aka long unsigned int}’ [-Wformat=]
       printf("\nis too old with this new  %llu \n",
              ^
gcc -I./includes/ -D_FILE_OFFSET_BITS=64 -fPIC -D_64 -c -o obj/testField.o src/testField.c
src/testField.c: In function ‘testField’:
src/testField.c:53:12: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
       if (*gets(reply) == 'y') {
            ^
src/testField.c:53:11: error: invalid type argument of unary ‘*’ (have ‘int’)
       if (*gets(reply) == 'y') {
           ^
src/testField.c:89:6: error: invalid type argument of unary ‘*’ (have ‘int’)
  if (*gets(reply) == 'y') {
      ^
makefile:31: recipe for target 'obj/testField.o' failed
make: *** [obj/testField.o] Error 1
yuanbo at yuanbo:~/gate/lmf/lmf_v3.0$
--------------------------------
From Yuan Bo
Zhengzhou University
No.100 Science Avenue,Zhengzhou City, Henan Province P.R.China
TEL:15263308323
来自袁波
郑州大学物理工程学院C楼4层核医学仪器实验室
河南省郑州市中原区科学大道100号
电话:15263308323
_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20181223/fbd3aa58/attachment.html>


More information about the Gate-users mailing list