jayduhon / inferno-os

Automatically exported from code.google.com/p/inferno-os
2 stars 0 forks source link

can't build tip (20110516-2327) on freebsd 7.3-stable #264

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download and unpack inferno-20100120.tgz followed by hg pull -u
2. set SYSHOST=FreeBSD, OBJTYPE=386 in mkconfig
3. ./makemk.sh
4. env PATH=/usr/inferno/FreeBSD/386/bin:$PATH mk nuke
5. env PATH=/usr/inferno/FreeBSD/386/bin:$PATH mk install

What is the expected output? What do you see instead?

It compiles a bunch of stuff okay, but dies at

(cd 5a; mk  install)
mk: 'install' is up to date
(cd 5c; mk  install)
cc -c -g -O -Wno-deprecated-declarations -Wuninitialized -Wunused -Wreturn-type 
-Wimplicit -I/usr/inferno/FreeBSD/386/include -I/usr/inferno/include 
-I/usr/local/include -I/usr/X11R6/include -DFREEBSD_386 -I. ../cc/pgen.c
../cc/pgen.c:4: error: expected ')' before '*' token
../cc/pgen.c:87: error: expected ')' before '*' token
../cc/pgen.c:109: error: expected ')' before '*' token
../cc/pgen.c:510: error: expected ')' before '*' token
../cc/pgen.c:532: error: expected ')' before '*' token
mk: cc -c -g ...  : exit status=exit(1)
mk: for j in ...  : exit status=exit(1)
mk: for j in ...  : exit status=exit(1)

Which operating system are you using?

FreeBSD 7.3-STABLE, from Thu May 13 13:51:03 PDT 2010

Please provide any additional information below.

gcc version 4.2.1 20070719

Original issue reported on code.google.com by far...@gmail.com on 23 May 2011 at 8:57

GoogleCodeExporter commented 9 years ago
I *think* I stumbled on the same issue: boehm-gc's gc.h is found when 
./utils/*c/gc.h should (was installed on my system via pkgsrc - DragonFlyBSD 
host - could it be so in your case ?).

The dirty fix was to update utils/[58kqv]c/mkfile as such:

--- a/utils/5c/mkfile   Tue Mar 22 09:30:40 2011 +0100
+++ b/utils/5c/mkfile   Wed May 25 09:54:46 2011 +0200
@@ -32,7 +32,7 @@
        mk $MKFLAGS clean

 %.$O: ../cc/%.c
-       $CC $CFLAGS -I. ../cc/$stem.c
+       $CC -I. $CFLAGS ../cc/$stem.c

 #enam.c:       5.out.h
 #      rc mkenam

I didn't bother fixing it in a better way.

Hth,
-- 
Francis

Original comment by fgudin@gmail.com on 25 May 2011 at 7:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
That fix worked for me.  Thanks!

Original comment by far...@gmail.com on 25 May 2011 at 10:42

GoogleCodeExporter commented 9 years ago
all the host mkfiles (in /mkfile) should force -I. before anything else, except 
perhaps on Nt. as it is, things like /usr/local/include (amongst others) will 
be used before the current directory, which seems wrong to me. i'm only 
surprised it has taken so long to get a clash.

Original comment by Charles....@gmail.com on 25 May 2011 at 10:57

GoogleCodeExporter commented 9 years ago
changeset:   513:dba25f6c6dc9

i changed the relevant ?c/mkfile
it might have been better to change mkone-* or mkfiles/mkfile-* but this 
smaller change seems adequate.

Original comment by Charles....@gmail.com on 25 May 2011 at 1:37