installation problem

Asked by Giovanni

Hi,
I am trying to install Calchep on mac os 10.8.5. I download the file.tar, unpack it, enter the calchep folder and from terminal I type make. I get the following message:

 [Mon Feb 24, 14:45] ggrillidc~/Desktop/calchep3.4.6
 $ make
./getFlags
MAKE= make
UNIX Darwin
C compiler detected
: shared liblary generation OK
Trying to detect X11
search by xmkmf
      fails
search X11 according to list of possible distinations
X11 OK
X11 ok
Fortran compiler is detected
gfortran OK
FFLAGS OK
./sbin/setPath /Users/ggrillidc/Desktop/calchep3.4.6
make -C c_source/getmem
make[1]: Entering directory `/Users/ggrillidc/Desktop/calchep3.4.6/c_source/getmem'
gcc -g -fsigned-char -Iinclude -I../chep_crt/include -c -o getmem.o getmem.c
ar rv ../../lib/serv.a getmem.o
ar: creating archive ../../lib/serv.a
a - getmem.o
ranlib -c ../../lib/serv.a
make[1]: Leaving directory `/Users/ggrillidc/Desktop/calchep3.4.6/c_source/getmem'
make -C c_source/chep_crt
make[1]: Entering directory `/Users/ggrillidc/Desktop/calchep3.4.6/c_source/chep_crt'
make[1]: *** No rule to make target `tex_util.o)', needed by `../../lib/serv.a'. Stop.
make[1]: Leaving directory `/Users/ggrillidc/Desktop/calchep3.4.6/c_source/chep_crt'
make: *** [COMPILE] Error 2

The problem is in the fact that it doesn't create files tex_util.o) with the bracket. I don't know how to solve it… Is there anyone that can help me?
Thanks.

Best regards,
Giovanni

Question information

Language:
English Edit question
Status:
Solved
For:
CalcHEP Edit question
Assignee:
No assignee Edit question
Solved by:
Giovanni
Solved:
Last query:
Last reply:
Revision history for this message
Neil Christensen (neil-christensen-qft) said :
#1

Dear Giovanni,

I have a mac. Currently, it is version 10.9.1. I do not get the error you mention, even with the default compilers. I also did not get it when I had 10.8.x of the Mac OS. Is there anything else you can tell us that you think might be relevant? Are you using the default Mac compilers?

Best wishes,
Neil

Revision history for this message
Giovanni (ggrilli) said :
#2

Hi,

I have gcc (GCC) 4.9.0 and GNU Fortran (GCC) 4.9.0. I do not know what others informations could be relevant...

Best regards,
Giovanni

Revision history for this message
Neil Christensen (neil-christensen-qft) said :
#3

You are using the bleeding edge version of the gcc compilers. They are development right now and not even considered stable. I am using version 4.8.1 which is the stable version of the gcc compilers and I have no trouble compiling CalcHEP on my mac. I think we need to ask you to try with a stable gcc line. Let us know how it goes.
Best wishes,
Neil

Revision history for this message
Giovanni (ggrilli) said :
#4

Hi,
I installed gcc 4.8.1, however I get the same error… Do you have any other suggestion?
Sorry for disturbing again.

Best regards,
Giovanni

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

For sure it does not related to gcc /gfortra version. Here there is a problem with make.
It looks a little bit strange. Sometimes new versions of make work strange and it is difficult to understand a reason of it.
We had a problem on some platforms where make was sensitive to number of spaces. I can propose you to make some tests:

As I undersand your can reproduce your problem by the following way:

You can go to directory c_source/chep_crt and launch make ( or gmake). When you will see the error you write us about.

This error is generated somehow by line 16 of Makefile :
OBJ= $(subst .c,.o,$(wildcard *.c)) X11_crt0.o

which transforms names of *.c files into corresponding *.o attaching ')' to the last one.

BUT the same instruction in directory getmem/ worked without problems !!!!
OBJ= $(subst .c,.o,$(wildcard *.c))

I don't see what is a difference.
I guess if you correct Makefile in chep_crt/ writing

OBJ= crt.o crt_util.o edittab.o file_scr.o help.o pictures.o syst.o tex_util.o viewdir.o X11_crt0.o
then make in chep_crt will work, but in other directories you can meet the same problem.

So, ... write us when you'll find a reason or some get some ideas.
In principle I/you can rewrite all Makefiles without 'subst'. But it should be nice to test first that namely subst leads to the problem. Of course, 'subst' is a standard instruction widely used.

Best
   Alexander Pukhov

Revision history for this message
Giovanni (ggrilli) said :
#6

Hi,
I tried what you suggest, but it doesn't work. It gives me the same error, this time with "crt.o)". Obviously changing the order of file.o in

OBJ= crt.o crt_util.o edittab.o file_scr.o help.o pictures.o syst.o tex_util.o viewdir.o X11_crt0.o

I get different errors for the "file.o)"…

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

Does make work in directory getmem ?
According to your first main, yes. Please confinm. After
  touch getmem.c
  make
has to update library.
As well as you can try to lauch make in directories service2, polynom, ntools. Does it lead to the same problem?

What is version of make / gmake ? One can get it via
make -v

Revision history for this message
Giovanni (ggrilli) said :
#8

The command make works only in the directory getmem. Launching make in the other directories does not work: it always gives errors related to "file.o)" except in directory ntools where I get:
$ make
make: *** No rule to make target `/Users/ggrillidc/Documents/Research/PhD/PhD_Research/Software/calchep_3.4.6/lib/ntools.a(drandXX.o', needed by `/Users/ggrillidc/Documents/Research/PhD/PhD_Research/Software/calchep_3.4.6/lib/ntools.a'. Stop.

Concerning make I have

$ make --version
GNU Make 3.82
Built for x86_64-apple-darwin12.5.0
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

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

OK, getmem contains only one file. May be this is a reason why it works here.

I'll try to test 3.82

My computer works with 3.81

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

I see it indeed does not work with make 3.82.
I'll try to understand what is a reason.
For current solution I recommend you to

1) download
make-3.81.tar.gz
from
http://ftp.gnu.org/gnu/make

2) unpark it in your local directory

tar -xvzf make-3.81.tar.gz

3) Compile
   cd make-3.81
   ./configure
    make

after that you can use
      < full path to >/make-3.81/make
to compile CalcHEP

Revision history for this message
Giovanni (ggrilli) said :
#11

Thank you very much! This solve the problem!!!

Best regards,
Giovanni

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

It looks like 3.82 has a bug in C-code which is known and improved but not fixed in the current distribution.

http://blog.davidegrayson.com/2012/01/make-382-cant-handle-parentheses-in.html

There is a way to bypass it modifiing CalcHEP Makefiles.
Should we do it or not? Does buggy 3.82 is included in standard MAC distribution now?

Revision history for this message
Giovanni (ggrilli) said :
#13

I don't think that make 3.82 is included in standard mac distribution… but I am not sure. On my mac I installed it (my mistake, sob).