Error during compiling

Asked by Muhammad Danish Aslam

When I compiled calchep using make command i got following error,

dynamic_cs.c: In function ‘HiggsLambdas’:
dynamic_cs.c:614:6: warning: implicit declaration of function ‘trim’; did you mean ‘fdim’? [-Wimplicit-function-declaration]
      trim(Xp); trim(Xm);
      ^~~~
      fdim
kin4.c: In function ‘kinematic_1_4’:
kin4.c:223:73: warning: format ‘%E’ expects argument of type ‘double’, but argument 4 has type ‘long double’ [-Wformat=]
     if(fabs(m-pmass[i])>pmass[0]*1.E-5) { printf("wrong mass %d (%E != %E) \n",i,m,pmass[i]); exit(33);}
                                                                        ~^ ~~~~~~~~
                                                                        %LE
kin4.c: In function ‘slhaDecayPrint’:
kin4.c:1083:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
    fprintf(f,"DECAY %d %E # %s\n",PDG,pWidth(name,&all),name);
                     ~^
                     %ld
ar rv ../../lib/dynamic_me.a vp.o
ar: creating ../../lib/dynamic_me.a
a - vp.o
ar rv ../../lib/dynamic_me.a VVdecay.o
a - VVdecay.o
make[2]: Warning: Archive '../../lib/dynamic_me.a' seems to have been created in deterministic mode. 'vp.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
make[2]: Warning: Archive '../../lib/dynamic_me.a' seems to have been created in deterministic mode. 'VVdecay.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
ar rv ../../lib/dynamic_vp.a vp_dynam.o
ar: creating ../../lib/dynamic_vp.a
a - vp_dynam.o
make[2]: Warning: Archive '../../lib/dynamic_vp.a' seems to have been created in deterministic mode. 'vp_dynam.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
ranlib ../../lib/dynamic_vp.a
ar rv ../../lib/dynamic_me.a dynamic_cs.o
ar: dynamic_cs.o: No such file or directory
<builtin>: recipe for target '../../lib/dynamic_me.a(dynamic_cs.o)' failed
make[2]: *** [../../lib/dynamic_me.a(dynamic_cs.o)] Error 1
make[2]: *** Waiting for unfinished jobs....
rm kin4.o vp_dynam.o
make[2]: Leaving directory '/home/danish/compiler/analysis/calchep_3.7.5/c_source/dynamicME'
Makefile:4: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/danish/compiler/analysis/calchep_3.7.5/c_source'
Makefile:30: recipe for target 'COMPILE' failed
make: *** [COMPILE] Error 2

How to fix it?

Question information

Language:
English Edit question
Status:
Solved
For:
CalcHEP Edit question
Assignee:
No assignee Edit question
Solved by:
Muhammad Danish Aslam
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Alexander Pukhov (pukhov) said :
#1

Could you try to use gmake?

Best

    Alexander Pukhov

On 22.04.2020 12:50, Muhammad Danish Aslam wrote:
> New question #690110 on CalcHEP:
> https://answers.launchpad.net/calchep/+question/690110
>
> When I compiled calchep using make command i got following error,
>
> dynamic_cs.c: In function ‘HiggsLambdas’:
> dynamic_cs.c:614:6: warning: implicit declaration of function ‘trim’; did you mean ‘fdim’? [-Wimplicit-function-declaration]
> trim(Xp); trim(Xm);
> ^~~~
> fdim
> kin4.c: In function ‘kinematic_1_4’:
> kin4.c:223:73: warning: format ‘%E’ expects argument of type ‘double’, but argument 4 has type ‘long double’ [-Wformat=]
> if(fabs(m-pmass[i])>pmass[0]*1.E-5) { printf("wrong mass %d (%E != %E) \n",i,m,pmass[i]); exit(33);}
> ~^ ~~~~~~~~
> %LE
> kin4.c: In function ‘slhaDecayPrint’:
> kin4.c:1083:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
> fprintf(f,"DECAY %d %E # %s\n",PDG,pWidth(name,&all),name);
> ~^
> %ld
> ar rv ../../lib/dynamic_me.a vp.o
> ar: creating ../../lib/dynamic_me.a
> a - vp.o
> ar rv ../../lib/dynamic_me.a VVdecay.o
> a - VVdecay.o
> make[2]: Warning: Archive '../../lib/dynamic_me.a' seems to have been created in deterministic mode. 'vp.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
> make[2]: Warning: Archive '../../lib/dynamic_me.a' seems to have been created in deterministic mode. 'VVdecay.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
> ar rv ../../lib/dynamic_vp.a vp_dynam.o
> ar: creating ../../lib/dynamic_vp.a
> a - vp_dynam.o
> make[2]: Warning: Archive '../../lib/dynamic_vp.a' seems to have been created in deterministic mode. 'vp_dynam.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
> ranlib ../../lib/dynamic_vp.a
> ar rv ../../lib/dynamic_me.a dynamic_cs.o
> ar: dynamic_cs.o: No such file or directory
> <builtin>: recipe for target '../../lib/dynamic_me.a(dynamic_cs.o)' failed
> make[2]: *** [../../lib/dynamic_me.a(dynamic_cs.o)] Error 1
> make[2]: *** Waiting for unfinished jobs....
> rm kin4.o vp_dynam.o
> make[2]: Leaving directory '/home/danish/compiler/analysis/calchep_3.7.5/c_source/dynamicME'
> Makefile:4: recipe for target 'all' failed
> make[1]: *** [all] Error 2
> make[1]: Leaving directory '/home/danish/compiler/analysis/calchep_3.7.5/c_source'
> Makefile:30: recipe for target 'COMPILE' failed
> make: *** [COMPILE] Error 2
>
> How to fix it?
>

Revision history for this message
Muhammad Danish Aslam (00786danish) said :
#2

yes. I tried, but gmake was not found

Revision history for this message
Muhammad Danish Aslam (00786danish) said :
#3

Yes i tried but gmake not found

Revision history for this message
Muhammad Danish Aslam (00786danish) said :
#4

I was trying with make -j4 and cause error. If try with make then problem solved.

Revision history for this message
Alexander Pukhov (pukhov) said :
#5

OK. Also

On 22.04.2020 12:50, Muhammad Danish Aslam wrote:
> New question #690110 on CalcHEP:
> https://answers.launchpad.net/calchep/+question/690110
>
> When I compiled calchep using make command i got following error,
>
> dynamic_cs.c: In function ‘HiggsLambdas’:
> dynamic_cs.c:614:6: warning: implicit declaration of function ‘trim’; did you mean ‘fdim’? [-Wimplicit-function-declaration]
> trim(Xp); trim(Xm);
> ^~~~
> fdim
> kin4.c: In function ‘kinematic_1_4’:
> kin4.c:223:73: warning: format ‘%E’ expects argument of type ‘double’, but argument 4 has type ‘long double’ [-Wformat=]
> if(fabs(m-pmass[i])>pmass[0]*1.E-5) { printf("wrong mass %d (%E != %E) \n",i,m,pmass[i]); exit(33);}
> ~^ ~~~~~~~~
> %LE
> kin4.c: In function ‘slhaDecayPrint’:
> kin4.c:1083:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
> fprintf(f,"DECAY %d %E # %s\n",PDG,pWidth(name,&all),name);
> ~^
> %ld

1)   These warnings can not appear in last version calchep_3.8.3
(updated 25.03.2020)

       Copy updated version.

> ar rv ../../lib/dynamic_me.a vp.o
> ar: creating ../../lib/dynamic_me.a
> a - vp.o
> ar rv ../../lib/dynamic_me.a VVdecay.o
> a - VVdecay.o
> make[2]: Warning: Archive '../../lib/dynamic_me.a' seems to have been created in deterministic mode. 'vp.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
> make[2]: Warning: Archive '../../lib/dynamic_me.a' seems to have been created in deterministic mode. 'VVdecay.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
> ar rv ../../lib/dynamic_vp.a vp_dynam.o
> ar: creating ../../lib/dynamic_vp.a
> a - vp_dynam.o
> make[2]: Warning: Archive '../../lib/dynamic_vp.a' seems to have been created in deterministic mode. 'vp_dynam.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
> ranlib ../../lib/dynamic_vp.a

2)  These problem is caused by version of  your make.  It uses ar which
needs U flags, but does not substitute it.  Internet recommend  to
define environment variable

      export ARFLAGS=rvU

     may be it can help.

> ar rv ../../lib/dynamic_me.a dynamic_cs.o
> ar: dynamic_cs.o: No such file or directory
> <builtin>: recipe for target '../../lib/dynamic_me.a(dynamic_cs.o)' failed
> make[2]: *** [../../lib/dynamic_me.a(dynamic_cs.o)] Error 1
> make[2]: *** Waiting for unfinished jobs....
> rm kin4.o vp_dynam.o
> make[2]: Leaving directory '/home/danish/compiler/analysis/calchep_3.7.5/c_source/dynamicME'
> Makefile:4: recipe for target 'all' failed
> make[1]: *** [all] Error 2
> make[1]: Leaving directory '/home/danish/compiler/analysis/calchep_3.7.5/c_source'
> Makefile:30: recipe for target 'COMPILE' failed
> make: *** [COMPILE] Error 2

It looks warning in compilation is reated as error. No ideas what to do
with it.

I happy to hear that you have found solution for all this problems.

Best

    Alexander Pukhov

Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#6

Do you still have a problem?

On 22/04/2020 16:07, Alexander Pukhov wrote:
> Question #690110 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/690110
>
> Alexander Pukhov posted a new comment:
> OK. Also
>
> On 22.04.2020 12:50, Muhammad Danish Aslam wrote:
>> New question #690110 on CalcHEP:
>> https://answers.launchpad.net/calchep/+question/690110
>>
>> When I compiled calchep using make command i got following error,
>>
>> dynamic_cs.c: In function ‘HiggsLambdas’:
>> dynamic_cs.c:614:6: warning: implicit declaration of function ‘trim’; did you mean ‘fdim’? [-Wimplicit-function-declaration]
>> trim(Xp); trim(Xm);
>> ^~~~
>> fdim
>> kin4.c: In function ‘kinematic_1_4’:
>> kin4.c:223:73: warning: format ‘%E’ expects argument of type ‘double’, but argument 4 has type ‘long double’ [-Wformat=]
>> if(fabs(m-pmass[i])>pmass[0]*1.E-5) { printf("wrong mass %d (%E != %E) \n",i,m,pmass[i]); exit(33);}
>> ~^ ~~~~~~~~
>> %LE
>> kin4.c: In function ‘slhaDecayPrint’:
>> kin4.c:1083:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
>> fprintf(f,"DECAY %d %E # %s\n",PDG,pWidth(name,&all),name);
>> ~^
>> %ld
> 1)   These warnings can not appear in last version calchep_3.8.3
> (updated 25.03.2020)
>
>       Copy updated version.
>
>> ar rv ../../lib/dynamic_me.a vp.o
>> ar: creating ../../lib/dynamic_me.a
>> a - vp.o
>> ar rv ../../lib/dynamic_me.a VVdecay.o
>> a - VVdecay.o
>> make[2]: Warning: Archive '../../lib/dynamic_me.a' seems to have been created in deterministic mode. 'vp.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
>> make[2]: Warning: Archive '../../lib/dynamic_me.a' seems to have been created in deterministic mode. 'VVdecay.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
>> ar rv ../../lib/dynamic_vp.a vp_dynam.o
>> ar: creating ../../lib/dynamic_vp.a
>> a - vp_dynam.o
>> make[2]: Warning: Archive '../../lib/dynamic_vp.a' seems to have been created in deterministic mode. 'vp_dynam.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
>> ranlib ../../lib/dynamic_vp.a
> 2)  These problem is caused by version of  your make.  It uses ar which
> needs U flags, but does not substitute it.  Internet recommend  to
> define environment variable
>
>      export ARFLAGS=rvU
>
>     may be it can help.
>
>> ar rv ../../lib/dynamic_me.a dynamic_cs.o
>> ar: dynamic_cs.o: No such file or directory
>> <builtin>: recipe for target '../../lib/dynamic_me.a(dynamic_cs.o)' failed
>> make[2]: *** [../../lib/dynamic_me.a(dynamic_cs.o)] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> rm kin4.o vp_dynam.o
>> make[2]: Leaving directory '/home/danish/compiler/analysis/calchep_3.7.5/c_source/dynamicME'
>> Makefile:4: recipe for target 'all' failed
>> make[1]: *** [all] Error 2
>> make[1]: Leaving directory '/home/danish/compiler/analysis/calchep_3.7.5/c_source'
>> Makefile:30: recipe for target 'COMPILE' failed
>> make: *** [COMPILE] Error 2
> It looks warning in compilation is reated as error. No ideas what to do
> with it.
>
> I happy to hear that you have found solution for all this problems.
>
> Best
>
>    Alexander Pukhov
>
--
______________________________________________________________________
Prof. Alexander S Belyaev (<email address hidden>)
https://www.hep.phys.soton.ac.uk/content/alexander-belyaev

School of Physics & Astronomy, University of Southampton
Office 5047, SO17 1BJ, TEL: +44 23805 98509, FAX: +44 23805 93910
.....................................................................
Particle Physics Department, Rutherford Appleton Laboratory
Didcot, OX11 0QX, TEL: +44 12354 45562, FAX: +44 12354 46733
.....................................................................
CERN, CH-1211 Geneva 23, Switzerland
Office 40/1-B20, Mailbox: E27910, TEL: +41 2276 71642
______________________________________________________________________

Revision history for this message
Muhammad Danish Aslam (00786danish) said :
#7

No, its solved