Bake does not build on Mac OSX
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bake |
Triaged
|
Medium
|
Unassigned |
Bug Description
I'm not sure this is a bug with bake but it would be fantastic if there was a workaround that could be implemented to allow bake to be built on Mac OS X.
I get these errors when I build the codebase:
```
$ make
valac -o bake-template --pkg=posix src/bake-
/Users/
g_type_init ();
^
/usr/local/
void g_type_init (void);
1 warning generated.
valac -o bake-test --pkg=posix src/bake-test.vala
/Users/
g_type_init ();
^
/usr/local/
void g_type_init (void);
1 warning generated.
valac -o bake-bootstrap --pkg=glib-2.0 --pkg=gio-2.0 --pkg=posix --Xcc='
/Users/
g_type_init ();
^
/usr/local/
void g_type_init (void);
1 warning generated.
/Users/
/Users/
/Users/
/Users/
4 errors generated.
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
make: *** [bake-bootstrap] Error 1
```
I'm building the codebase with Vala 0.20.1 on Mac OSX 10.8.4.
The best blog post I can find on the error message is:
http://
Hope this helps.
Related branches
Changed in bake: | |
status: | New → Triaged |
importance: | Undecided → Low |
importance: | Low → Medium |
Ok,
So I did a little more digging... I ran the build process with the compiler's `--ccode` flag to inspect the generated C code.
I inspected the output as follows:
```
$ ack -i st_mtim
src/fixes.vapi
5: public Posix.timespec st_mtim;
src/rule.c
277: _tmp12_ = _tmp11_.st_mtim;
291: _tmp17_ = _tmp16_.st_mtim;
402: _tmp50_ = _tmp49_.st_mtim;
416: _tmp55_ = _tmp54_.st_mtim;
src/rule.vala
42: if (Posix.S_ISREG (file_info.st_mode) && timespec_cmp (file_info.st_mtim, max_input_time) > 0)
44: max_input_time = file_info.st_mtim;
75: if (Posix.S_ISREG (file_info.st_mode) && timespec_cmp (file_info.st_mtim, max_output_time) > 0)
77: max_output_time = file_info.st_mtim;
tests/bake/ touch.vala
40: times[1] = info.st_mtim;
```
It looks like you're making use of a field in the stat struct that does not exist in the "stat.h" on Darwin systems:
``` sys/stat. h OSREFERENCE_ LICENSE_ HEADER_ START@ www.opensource. apple.com/ apsl/ and read it before using this file. OSREFERENCE_ LICENSE_ HEADER_ END@
$ cat /usr/include/
/*
* Copyright (c) 2000-2008 Apple Inc. All rights reserved.
*
* @APPLE_
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_
*/
/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
* to the University of California by American Telephone and Telegraph
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
* the permission of UNIX System Laboratories, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditio...