hive-testbench
hive-testbench copied to clipboard
values.h should be limits.h
Trying to build on Mac OSX and got the error below: Some googling showed that values.h is deprecated in ANSI C and should be limits.h instead. If it is changed in file porting.h, then build proceeds.
In file included from mkheader.c:37: ./porting.h:46:10: fatal error: 'values.h' file not found
include <values.h>
^
1 error generated. make[1]: *** [mkheader.o] Error 1
And if you use limits.h instead of values.h, in porting.h, you will get the following error: use of undeclared identifier 'MAXINT' in genrand.c and nulls.c you can fix by changing them to INT_MAX, or #define MAXINT INT_MAX
If you are looking for OS X ports/fixes of the data generators for TPC-H and TPC-DS these may help you out: https://github.com/grahn/tpch-kit https://github.com/grahn/tpcds-kit
To build this in OS X, use already built exists https://github.com/saurabhmishra/hive-testbenchmacos or fix below
vi tpcds-gen/target/tools/porting.h replace values.h with limits.h vi tpcds-gen/target/tools/date.c Include <stdlib.h> instead of <malloc.h> vi tpcds-gen/target/tools/dist.c Include <stdlib.h> instead of <malloc.h>. vi tpcds-gen/target/tools/genrand.c #define MAXINT INT_MAX vi tpcds-gen/target/tools/misc.c Include <stdlib.h> instead of <malloc.h>. vi tpcds-gen/target/tools/nulls.c #define MAXINT INT_MAX