build fails on Mac OS X 10.4.11 (Tiger)
Closed this issue · 3 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. configure && make
What is the expected output?
no errors
What do you see instead?
[...]
Making all in cutfield
make all-am
gcc -DHAVE_CONFIG_H -I. -I../../src/include -g -O2 -MT cutfield.o -MD
-MP -MF .deps/cutfield.Tpo -c -o cutfield.o cutfield.c
cutfield.c: In function ‘cutfield’:
cutfield.c:73: error: invalid lvalue in assignment
cutfield.c:118: error: invalid lvalue in assignment
make[3]: *** [cutfield.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
What version of the product are you using?
crush-2008-10.tar.gz
On what operating system?
Mac OS X 10.4.11
Please provide any additional information below.
The problem seems to be the reassignment to stdin (cutfield.c:73):
stdin = nextfile(argc, argv, &optind, "r");
Using a local variable should fix the problem.
Original issue reported on code.google.com by luismsgo...@gmail.com
on 9 Jan 2009 at 4:14
GoogleCodeExporter commented
I have fixed this problem. Sorry, I don't know how to generate a patch. Here's
the
diff output:
diff crush-2008-10{,_fix}/src/cutfield/cutfield.c
32c32
<
---
> FILE *in = stdin;
72,73c72,73
< fclose(stdin);
< stdin = nextfile(argc, argv, &optind, "r");
---
> fclose(in);
> in = nextfile(argc, argv, &optind, "r");
76c76
< while (stdin) {
---
> while (in) {
84c84
< while (getline(&in_buffer, &in_buffer_sz, stdin) > 0) {
---
> while (getline(&in_buffer, &in_buffer_sz, in) > 0) {
118c118
< stdin = nextfile(argc, argv, &optind, "r");
---
> in = nextfile(argc, argv, &optind, "r");
diff crush-2008-10{,_fix}/src/truncfield/truncfield.c
32c32
<
---
> FILE *in = stdin;
71,72c71,72
< fclose(stdin);
< stdin = nextfile(argc, argv, &optind, "r");
---
> fclose(in);
> in = nextfile(argc, argv, &optind, "r");
75c75
< while (stdin) {
---
> while (in) {
83c83
< while (getline(&in_buffer, &in_buffer_sz, stdin) > 0) {
---
> while (getline(&in_buffer, &in_buffer_sz, in) > 0) {
113c113
< stdin = nextfile(argc, argv, &optind, "r");
---
> in = nextfile(argc, argv, &optind, "r");
Original comment by luismsgo...@gmail.com
on 9 Jan 2009 at 4:23
GoogleCodeExporter commented
Thanks for reporting this and taking the time to investigate the cause. I'll
get my
hands on a Mac and verify the patch, and get it applied before the 2009-01
release.
Original comment by jeremy.h...@gmail.com
on 9 Jan 2009 at 6:39
GoogleCodeExporter commented
Upon closer inspection, it looks like the problem was already eliminated in
trunk as
a side-effect of some new feature work.
A 2009-01 release candidate should be posted to the discussion group
(http://groups.google.com/group/crush-tools/) in a few days. When that's
available,
if you'd like to pull it down and verify that it builds on Mac OS 10.4, that
would be
great.
Original comment by jeremy.h...@gmail.com
on 9 Jan 2009 at 9:26
- Changed state: Fixed