shoes / shoes-deprecated

Former repo for Shoes... see README for up to date locations!
http://shoesrb.com/
Other
1.15k stars 167 forks source link

Building on 10.8 #216

Open ragekit opened 12 years ago

ragekit commented 12 years ago

Hi ! I've tried building on 10.8, with a non llvm gcc as stated in an other issue, and by tweaking a bit the rakefile to fetch the correct sdk in the correct place.

BUT

it still won't compile.

Here's the beginning of the error report (it's really long)

new-host-2:shoes benjamingattet$ rake gcc -I. -c -o shoes/app.o -Wall -I/usr/local/include -I/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.0.0 -I/usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1 -I/usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1/x86_64-darwin12.0.0 -O -DRUBY_1_9 -DSHOES_QUARTZ -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fpascal-strings -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.8 -fno-common -x objective-c -fobjc-exceptions -isysroot /Developer/SDKs/MacOSX10.8.sdk -arch x86_64 shoes/app.c shoes/app.c:5:18: error: glib.h: No such file or directory In file included from shoes/app.c:6: ./shoes/app.h:13:19: error: cairo.h: No such file or directory In file included from /usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1/ruby.h:32, from ./shoes/app.h:14, from shoes/app.c:6: /usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:48:21: error: string.h: No such file or directory /usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:58:21: error: stdint.h: No such file or directory /usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:61:23: error: inttypes.h: No such file or directory /usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:64:20: error: stdarg.h: No such file or directory /usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:65:19: error: stdio.h: No such file or directory In file included from /usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:67, from /usr/local/Cellar/ruby/1.9.3-p194/include/ruby-1.9.1/ruby.h:32, from ./shoes/app.h:14,

steveklabnik commented 12 years ago

Uh oh! I haven't gotten 10.8 yet.

Do you have cairo and glib installed?

ragekit commented 12 years ago

Brew say : glib is installed here /usr/local/Cellar/glib/2.30.2

But cairo doesn't seem to be installed, il check with it

ragekit commented 12 years ago

(btw, it also crashes, but differently, with gcc 4.7, something about -fpascal-strings)

ragekit commented 12 years ago

Yup, same error with cairo, it can't find the 2 headers, i've followed instructions for 10.7 on the wiki. Must be a path problem somewhere.

heartpunk commented 11 years ago

I have 10.8, I'll try to reproduce this.

heartpunk commented 11 years ago

@RageKit how'd you get this to use a non llvm gcc? I could look it up, but then I might end up breaking it a different way than what you encountered.

heartpunk commented 11 years ago

Alright, I get it breaking a different way. For now, I'll attempt to forge a path through to it working on 10.8, rather than getting bogged down too much on reproducing the way it broke for @RageKit. Hopefully we'll be there soon!

heartpunk commented 11 years ago

Accidentally replicated @RageKit's error. Happened for me after I'd uninstalled all the dependencies and tried to do the build, having forgot about uninstalling them all.

More information coming soon, I suspect, but I'm still hunting the rest of it down.

PragTob commented 11 years ago

wehuuu thank you for your work @tehgeekmeister !

heartpunk commented 11 years ago

Okay, I don't know what to make of this, but it seems that gcc-4.2 (or whatever else might be locating headers to include – I'm not too familiar with C build processes) isn't able to find it's own header files. It's complaining about things like stddef.h, which, on my box, is located at (among other places):

/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/lib/gcc/i686-apple-darwin11/4.2.1/include/stddef.h

Which is confusing, because:

Ezekiels-MacBook-Pro:/Users/tehgeekmeister/code/shoes| which gcc-4.2
/usr/local/bin/gcc-4.2
Ezekiels-MacBook-Pro:/Users/tehgeekmeister/code/shoes| ls -l `which gcc-4.2`
lrwxr-xr-x  1 tehgeekmeister  admin  46 Dec 29 01:04 /usr/local/bin/gcc-4.2 -> ../Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2

and

Ezekiels-MacBook-Pro:/Users/tehgeekmeister/code/shoes| rake
/usr/local/bin/gcc-4.2 -I. -c -o shoes/app.o -Wall -I/usr/local/include -I/usr/local/Cellar/cairo/1.10.2/include/cairo -D_REENTRANT -I/usr/local/Cellar/pango/1.28.4/include/pango-1.0 -I/usr/local/Cellar/glib/2.30.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.30.2/lib/glib-2.0/include -I/usr/local/Cellar/gettext/0.18.1.1/include -I/usr/local/Cellar/glib/2.30.2/include -I/Users/tehgeekmeister/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/x86_64-darwin12.2.1 -I/Users/tehgeekmeister/.rvm/rubies/ruby-1.9.3-p327/include/ruby-1.9.1 -I/Users/tehgeekmeister/.rvm/rubies/ruby-1.9.3-p327/include/ruby-1.9.1/x86_64-darwin12.2.1 -O  -DRUBY_1_9 -DSHOES_QUARTZ -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fpascal-strings -O3 -fno-common -pipe -x objective-c -fobjc-exceptions -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64 shoes/app.c
In file included from /usr/local/Cellar/glib/2.30.2/lib/glib-2.0/include/glibconfig.h:9,
                 from /usr/local/Cellar/glib/2.30.2/include/glib-2.0/glib/gtypes.h:34,
                 from /usr/local/Cellar/glib/2.30.2/include/glib-2.0/glib/galloca.h:34,
                 from /usr/local/Cellar/glib/2.30.2/include/glib-2.0/glib.h:32,
                 from shoes/app.c:5:
/usr/local/Cellar/glib/2.30.2/include/glib-2.0/glib/gmacros.h:40:20: error: stddef.h: No such file or directory

( ^== truncated for everyone's sanity...)

In other words, as I said at the beginning, gcc-4.2 is not finding its own headers. :persevere:

PragTob commented 11 years ago

Hm that's weird maybe some kind of issues with relocated libs etc? Dunno I'm not familiar with OSX... however gcc 4.2 is kind of very old. I'm currently running gcc-4.7.

heartpunk commented 11 years ago

gcc-4.2 is the de facto standard non llvm gcc on OSX (it's the one that homebrew works with, basically), so that's why I'm using it. Making a stackoverflow post to see what I can find over there.

heartpunk commented 11 years ago

My post on stackoverflow.

heartpunk commented 11 years ago

Oh, re relocated libs, I doubt it because I did a fresh install of this gcc at a certain point, and the errors didn't change.

heartpunk commented 11 years ago

According to the answer on stack overflow, it should be able to find its own headers, so, we have a truly strange situation. I need to sleep for now, so I'll get another stack overflow question going tomorrow about what could be causing the larger problem, or do some more investigation myself, if I think it'll go anywhere.

ragekit commented 11 years ago

I don't really remember how i got this error, never figure out how to resolve it either. Good thing you've managed to reproduce it. thanks for looking into it !

heartpunk commented 11 years ago

Now that I know shoes4 is a thing, I won't be looking into this further. Hopefully it can solve everyone's build problems!

ragekit commented 11 years ago

Indeed ! I close the issue ?

steveklabnik commented 11 years ago

If it doesn't build, we should leave it open.