Closed GoogleCodeExporter closed 8 years ago
A sample of the header errors are:
./s3backer.h:157:45: error: unknown type name 'u_char'; did you mean 'char'?
./s3backer.h:164:87: error: unknown type name 'u_int'
These happened multiple times for at least two files (block_cache.h and
s3backer.h)
Original comment by ejsteig...@gmail.com
on 4 Nov 2013 at 4:21
Thanks.
Re: compiler warning: fixed in r499.
Re: /usr/local - this is normal with FreeBSD. Typically it is handled when a
package is built as part of the ports system. When building manually you have
to add the flags you mentioned.
Re: header errors. Not sure I understand.. the first lines of "s3backer.h" are:
#include "config.h"
#include <sys/types.h>
So this should define u_int, etc. prior to any use.
Can you help me understand why that doesn't work? I don't have a FreeBSD system
handy to test with myself.
Original comment by archie.c...@gmail.com
on 4 Nov 2013 at 2:41
If I swap the order of those two lines then everything compiles fine. I'm not
sure how config.h is being generated and causing it to fail to include
sys/types.h.
Attached is the config.h and configure output generated with:
CC=gcc LDFLAGS=-L/usr/lib CPPFLAGS=-I/usr/local/include ./configure
--prefix=/usr/local
Let me know how else I can debug this.
Original comment by ejsteig...@gmail.com
on 5 Nov 2013 at 2:48
Attachments:
Must be the feature macros at the bottom of config.h. Looks like __BSD_VISIBLE
is not being set to a non-zero value in <sys/cdefs.h> as it should be (on line
731).
But I don't see how it can be happening unless your environment has one of
these set: _ANSI_SOURCE, _C99_SOURCE, or _C11_SOURCE.
What does the output of "grep _SOURCE config.log" say?
Please try the following tests by editing "config.h" (after running
./configure). These are just guesses.
1. Change _XOPEN_SOURCE from 500 to 700
2. Comment out #define _BSD_SOURCE 1
3. Comment out #define _DARWIN_C_SOURCE 1
4. Comment out #define _GNU_SOURCE 1
5. Comment out #define _XOPEN_SOURCE 500
Original comment by archie.c...@gmail.com
on 5 Nov 2013 at 3:22
Original comment by archie.c...@gmail.com
on 5 Nov 2013 at 3:26
None of those environmental variables are being set, unless configure is doing
it at some point.
Attached is the grep output.
If I commented out #define _XOPEN_SOURCE 500 then it compiles fine with no
errors. So that seems to be the issue.
Original comment by ejsteig...@gmail.com
on 6 Nov 2013 at 5:51
Attachments:
OK thanks.
The _XOPEN_SOURCE definition is obsolete. I've removed it in r500.
Original comment by archie.c...@gmail.com
on 6 Nov 2013 at 2:13
Original issue reported on code.google.com by
ejsteig...@gmail.com
on 4 Nov 2013 at 3:12