Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#139 Makefile issues

Bug
closed-fixed
nobody
None
5
2013-08-22
2013-08-21
Chris Petrik
No

When compiling I get:

Script started on Wed Aug 21 20:28:35 2013
sudo make
Password:
===> Building for cil-1.7.3
ocamlbuild -build-dir _build -no-links -classic-display src/cil.cma
make -C .. _build/machdep.ml
+ make -C .. _build/machdep.ml
"Makefile", line 39: Need an operator
"Makefile", line 41: Need an operator
"Makefile", line 42: Need an operator
"Makefile", line 47: Need an operator
"Makefile", line 49: Need an operator
"Makefile", line 58: Missing dependency operator
"Makefile", line 61: Need an operator
"Makefile", line 63: Need an operator
"Makefile", line 96: Missing dependency operator
"Makefile", line 99: Need an operator
"Makefile", line 200: Need an operator
"Makefile", line 201: warning: duplicate script for target "ifdef" ignored
"Makefile", line 202: Need an operator
"Makefile", line 203: Need an operator
"Makefile", line 204: warning: duplicate script for target "ifdef" ignored
"Makefile", line 205: Need an operator
"Makefile", line 206: Need an operator
"Makefile", line 207: warning: duplicate script for target "ifdef" ignored
"Makefile", line 208: Need an operator
"Makefile", line 209: Need an operator
"Makefile", line 210: warning: duplicate script for target "ifdef" ignored
"Makefile", line 211: Need an operator
"Makefile", line 212: Need an operator
"Makefile", line 213: warning: duplicate script for target "ifdef" ignored
"Makefile", line 214: Need an operator
make: fatal errors encountered -- cannot continue
Command exited with code 1.
gmake: [_build/src/cil.cma] Error 10
[do-build] Error code 1

Stop in /usr/home/chris/freebsd-ports/devel/cil.
*** [build] Error code 1

Stop in /usr/home/chris/freebsd-ports/devel/cil.

Script done on Wed Aug 21 20:28:40 2013

Discussion

  • Interesting, thanks for the report. I suppose the problem is the following:
    - you are using freebsd,
    - the default make on freebsd is not gnu make,
    - the makefile is careful to call itself recursively with $(MAKE) rather than make,
    - but myocamlbuild.ml is not so careful.

    If this explanation looks correct, could you try to edit myocamlbuild.ml to replace [ A "make"; (on line 35) by [ A "whatever-gnu-make-is-called"; ?

    If it works around the problem, we'll then need a way to pass that parameter from make to ocamlbuild (probably through an environment variable).

    By the way, are you using cil-1.7.3 or the git "develop" branch?

     
  • Here is a quick patch attempt to this effect. It shouldn't hurt in any case, but I don't know if it will solve your issue.

     
    Attachments
  • Chris Petrik
    Chris Petrik
    2013-08-21

    Hi I will hack this for the time being using sed '35 s|make|gmake|g' and wait for the new version to fix it. I am the Maintainer of cil and I don't wish to add in a patch when you can fix it using sed etc.. However I appreciate greatly the fast response to my ticket.

     
  • Chris Petrik
    Chris Petrik
    2013-08-21

    Patch seems to fix the issue, but I will wait for the new release to actually fix it. etc..

     
  • Great, thanks for having tested it. The next release will (again) change a number of things from a build point-of-view, but I hope it will iron out everything this time. Contrary to the previous releases, I'll probably make a beta release in early september to get more feedback and would appreciate your testing if you have some time to try it.

     
    • status: open --> closed-fixed
     
  • Chris Petrik
    Chris Petrik
    2013-08-21

    I can create an account for you to test cil on FreeBSD if you wish.