Build issues (hopefully) fixed

80 views
Skip to first unread message

Rasmus Andersson

unread,
Dec 27, 2010, 12:56:20 PM12/27/10
to kod...@googlegroups.com
Hi everyone,

Just spent two good hours with help from @aristidesfl, @rickw and
@robert (IRC) fixing the build issues.


a) If you are alright with cloning the kod repo from scratch, this is
the easiest option:

$ git clone --recursive https://github.com/rsms/kod.git


b) If you have a repo clone already checked out with local commits,
this gets just a little bit trickier:

$ git pull origin
$ rm -rf deps/libcss
$ git submodule update --init


Finally, open kod.xcodeproj and build.


Details:

The upstream libcss & its deps. was broken and had changed. We updated
the build scripts, configured them for explicit upstream revisions and
patched libcss. Also, the most important patch we provided (rgba
support) has been merged upstream so we no longer need to house a copy
of the patched source tree (providing two small patches is
sufficient).

Also, the kod Xcode project contained some relics and
mis-configurations which where local to my environment.


--
Rasmus Andersson

Ryan Spaulding

unread,
Dec 27, 2010, 1:20:01 PM12/27/10
to Kod.app
I just tired option 'a' (i moved my old directory out of the way) and
the build failed with 122 errors. It looks like it cannot find 'CSS/
CSS.h'. Is there something I need to change in my xcode env to find
it? Below is a find command of the kod directory after the build:

Fizzy:kod ryans$ find . -name 'CSS.h'
./build/Debug/Kod.app/Contents/Frameworks/CSS.framework/Versions/A/
Headers/CSS.h
./deps/libcss/cocoa-framework/build/Debug/CSS.framework/Versions/A/
Headers/CSS.h
./deps/libcss/cocoa-framework/CSS.h


On Dec 27, 9:56 am, Rasmus Andersson <ras...@notion.se> wrote:
> Hi everyone,someth
>
> Just spent two good hours with help from @aristidesfl, @rickw and
> @robert (IRC) fixing the build issues.
>
> a) If you are alright with cloning the kod repo from scratch, this is
> the easiest option:
>
> $ git clone --recursivehttps://github.com/rsms/kod.git

Swizec Teller

unread,
Dec 27, 2010, 1:25:59 PM12/27/10
to Kod.app
Hey,

it's a lot better now, only 116 errors remaining :)

Here's the earliest error:
ld: in ../../lib/libcss.a, archive has no table of contents
collect2: ld returned 1 exit status
Command /bin/sh failed with exit code 1


Which probably causes:

ld: in /Users/Swizec/Documents/opensauce/kod/deps/libcss/lib/
libcss.a, archive has no table of contents
Command /Developer/usr/bin/clang failed with exit code 1

Then the next error is in building Kod itself:

/Users/Swizec/Documents/opensauce/kod/resources/BrowserWindow.xib:
0:0 Unable to resolve plug-in dependency for "BrowserWindow.xib".

And then in building KAppDelegate.mm
/Users/Swizec/Documents/opensauce/kod/src/KStyle.h:5:0 /Users/
Swizec/Documents/opensauce/kod/src/KStyle.h:5:20: error: CSS/CSS.h: No
such file or directory
/Users/Swizec/Documents/opensauce/kod/src/KAppDelegate.mm:18:0 /
Users/Swizec/Documents/opensauce/kod/src/KAppDelegate.mm:18:28: error:
FScript/FScript.h: No such file or directory
/Users/Swizec/Documents/opensauce/kod/src/KStyle.h:15:0 /Users/
Swizec/Documents/opensauce/kod/src/KStyle.h:15: error: ISO C++ forbids
declaration of ‘CSSContext’ with no type


And then a lot more like that.

I went the completely clean repository route.


Can't wait to start hacking,
~Swizec




On Dec 27, 6:56 pm, Rasmus Andersson <ras...@notion.se> wrote:
> Hi everyone,
>
> Just spent two good hours with help from @aristidesfl, @rickw and
> @robert (IRC) fixing the build issues.
>
> a) If you are alright with cloning the kod repo from scratch, this is
> the easiest option:
>
> $ git clone --recursivehttps://github.com/rsms/kod.git

rsms

unread,
Dec 27, 2010, 1:55:01 PM12/27/10
to Kod.app
It's interesting that many people can build kod w/o any errors and you
get 100+ errors.

A few Qs:

1. Are you using a recent version of MacPorts? port selfupdate is your
friend. (for errors related to source-highlight)

2. Are you using Xcode 3.5 or _older_ (Xcode 4 is still not
recommended for production use by Apple and is currently not supported
by Kod)

3. Did you build kod from scratch or did you update an old clone or
the repository?

Ryan Spaulding

unread,
Dec 27, 2010, 4:13:10 PM12/27/10
to Kod.app


On Dec 27, 10:55 am, rsms <ras...@notion.se> wrote:
> It's interesting that many people can build kod w/o any errors and you
> get 100+ errors.
>
> A few Qs:
>
> 1. Are you using a recent version of MacPorts? port selfupdate is your
> friend. (for errors related to source-highlight)

I did not get any errors during the build of source-highlight. I am
running port selfupdate now.

>
> 2. Are you using Xcode 3.5 or _older_ (Xcode 4 is still not
> recommended for production use by Apple and is currently not supported
> by Kod)

xcode version is 3.2.3

>
> 3. Did you build kod from scratch or did you update an old clone or
> the repository?

I switched over to the new one from scratch.

Ryan Spaulding

unread,
Dec 27, 2010, 5:42:38 PM12/27/10
to Kod.app
currently downloading xcode 3.5. Can we add this to the README.md.
There could be other people like me that have not used or updated
xcode in a while.

August Joki

unread,
Dec 27, 2010, 5:55:53 PM12/27/10
to kod...@googlegroups.com
3.2.5, I hope you mean. :)

-- 
August Joki

Ryan Spaulding

unread,
Dec 27, 2010, 6:05:41 PM12/27/10
to Kod.app
LOL, yep 3.2.5 sorry :)

Cody Krieger

unread,
Dec 27, 2010, 6:06:15 PM12/27/10
to kod...@googlegroups.com
When you say you went the clean repository route, did you still go back and build node/libcss and import the lang files for source-highlight as the readme says to do?

By the way, Rasmus, thanks a TON for making Homebrew an option for source-highlight - I hate MacPorts. :)

David Evans

unread,
Dec 27, 2010, 6:07:06 PM12/27/10
to Kod.app
+1 on the "no table of contents" error

love the integrated build tho :)

David Evans

unread,
Dec 27, 2010, 6:10:56 PM12/27/10
to Kod.app
I take that back, i ran ranlib on the libraries in libcss/lib and now
I'm at a loss for CSS.h

This is a clean checkout of the repo with XCode 3.2.5

Swizec Teller

unread,
Dec 27, 2010, 6:37:13 PM12/27/10
to kod...@googlegroups.com
Just followed the latest build instructions to the letter with a clean repo 
(with xcode 3.2.5, homebrew and macports from yesterday in case that means anything).
I used the instructions for homebrew.

The error I keep getting is that libcss.a doesn't have a table of contents.

And then that there is no CSS/CSS.h despite a green tick next to "Copying CSS.h" earlier on.

David Evans

unread,
Dec 27, 2010, 6:47:16 PM12/27/10
to Kod.app
If you run ranlib on the libraries in libcss/lib, it will add the TOC.
Can't help you with the framework problems tho I have them too.

I am noticing a trend, @Swizec, we seem to have similar problems in
the build - whats up buddy? ;)



On Dec 27, 6:37 pm, Swizec Teller <swi...@gmail.com> wrote:
> Just followed the latest build instructions to the letter with a clean repo
> (with xcode 3.2.5, homebrew and macports from yesterday in case that means
> anything).
> I used the instructions for homebrew.
>
> The error I keep getting is that libcss.a doesn't have a table of contents.
>
> And then that there is no CSS/CSS.h despite a green tick next to "Copying
> CSS.h" earlier on.
>

bernie estavillo

unread,
Dec 27, 2010, 6:51:34 PM12/27/10
to Kod.app
I saw the exact same thing with the debug configuration. The Release
configuration builds fine for me..

--bernie

Cody Krieger

unread,
Dec 27, 2010, 6:56:17 PM12/27/10
to kod...@googlegroups.com
Good call Bernie - Release builds fine, but Debug does not. Builds with around 30 warnings, but no errors.

Swizec Teller

unread,
Dec 27, 2010, 7:11:47 PM12/27/10
to kod...@googlegroups.com
This might sound a bit silly, but I'm new to Mac dev ... how do I do the ranlib thingy? :P

~Swizec

Cody Krieger

unread,
Dec 27, 2010, 7:19:12 PM12/27/10
to kod...@googlegroups.com
I just did one of these: ranlib deps/libcss/lib/lib*

Swizec Teller

unread,
Dec 27, 2010, 7:58:02 PM12/27/10
to kod...@googlegroups.com
Running ranlib seems to have resolved my issues. It builds and with only 1 warning.

\o/

~Swizec

David Evans

unread,
Dec 27, 2010, 8:54:02 PM12/27/10
to Kod.app
Same! Must have had my directories borked.

Thanks for the help all!



On Dec 27, 7:58 pm, Swizec Teller <swi...@gmail.com> wrote:
> Running ranlib seems to have resolved my issues. It builds and with only 1
> warning.
>
> \o/
>
> ~Swizec
>

Rasmus Andersson

unread,
Dec 27, 2010, 9:04:36 PM12/27/10
to kod...@googlegroups.com
Everyone, we have made a lot of progress on the build setup today.
Please see http://groups.google.com/group/kod-app/t/1d4bd3e62ae3c39
for details.

--
Rasmus Andersson

David Keegan

unread,
Dec 27, 2010, 9:57:11 PM12/27/10
to kod...@googlegroups.com
I did a fresh checkout and got the following errors:

ld: in /Users/dkeegan/dev/git/Kod/deps/libcss/lib/libcss.a, archive has no table of contents
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Command /Developer/usr/bin/clang failed with exit code 1

/opt/local/include/srchilite/highlightstatebuilder.h:39: error: 'branches' does not name a type
/opt/local/include/srchilite/highlightstatebuilder.h:41: error: expected `)' before '*' token
/opt/local/include/srchilite/highlightstatebuilder.h:42: error: expected `)' before '*' token
/opt/local/include/srchilite/highlightstatebuilder.h:43: error: expected `)' before '*' token
/opt/local/include/srchilite/highlightstatebuilder.h:44: error: expected `)' before '*' token
/opt/local/include/srchilite/highlightstatebuilder.h:45: error: ISO C++ forbids declaration of 'endbranches' with no type
/opt/local/include/srchilite/highlightstatebuilder.h:46: error: expected ';' before '}' token
/opt/local/include/srchilite/highlightstatebuilder.h:46: error: expected `;' before '}' token

/Users/dkeegan/dev/git/Kod/deps/node/build/default: No such file or directory
Command /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp failed with exit code 1

Cody Krieger

unread,
Dec 27, 2010, 11:27:05 PM12/27/10
to kod...@googlegroups.com
First, you need to run ranlib:

ranlib deps/libcss/lib/lib*

Then try this again:

deps/srchilight/import-from-macports.sh

Then build and see what happens.

David Keegan

unread,
Dec 27, 2010, 11:54:02 PM12/27/10
to kod...@googlegroups.com
Cool thanks, that got be down to 1 error. I also had to run:

deps/node-build.sh

I can build Kod now! thanks everyone!

--
You received this message because you are subscribed to the Google
Groups "Kod.app" group. To unsubscribe from this group, send email to
kod-app+u...@googlegroups.com (More info at http://groups.google.com/group/kod-app)

Ryan Spaulding

unread,
Dec 28, 2010, 12:50:07 AM12/28/10
to Kod.app


On Dec 27, 3:06 pm, Cody Krieger <cody.krie...@gmail.com> wrote:
> When you say you went the clean repository route, did you still go back and
> build node/libcss and import the lang files for source-highlight as the
> readme says to do?

I got everything to build just now. Below is what I did:

1) updated xcode to 3.2.5
2) port selfupdate
3) port upgrade outdated (this rebuilt source-highlight which I built
before with the older process from 12/25)
4) then I followed the steps from https://github.com/rsms/kod/blob/master/README.md
under 'Development' (building node, libcss, etc)

After that both 'Release' and 'Debug' built with no errors or
warnings.

Thanks for all the help!

Agos

unread,
Dec 28, 2010, 5:06:35 PM12/28/10
to kod...@googlegroups.com
Aaaand now it builds (on my machine, at least :P). Shall this step be added to the readme?

Rasmus Andersson

unread,
Dec 29, 2010, 5:53:47 AM12/29/10
to kod...@googlegroups.com
On Tuesday, December 28, 2010, Agos <ara...@gmail.com> wrote:
> Aaaand now it builds (on my machine, at least :P). Shall this step be added to the readme?

What step?

>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Kod.app" group. To unsubscribe from this group, send email to
> kod-app+u...@googlegroups.com (More info at http://groups.google.com/group/kod-app)
>

--
Rasmus Andersson

Agos

unread,
Dec 29, 2010, 6:42:52 AM12/29/10
to kod...@googlegroups.com
the ranlib thing

Rasmus Andersson

unread,
Dec 29, 2010, 6:47:41 AM12/29/10
to kod...@googlegroups.com
On Wed, Dec 29, 2010 at 12:42, Agos <ara...@gmail.com> wrote:
> the ranlib thing

Ah. It's already in there:
https://github.com/rsms/libcss-osx/commit/51708b7237699b5d4e85d7c1d928b4b81df955d6

Agos

unread,
Dec 29, 2010, 11:38:50 AM12/29/10
to kod...@googlegroups.com
oh, ok, great :)
Reply all
Reply to author
Forward
0 new messages