hive-testbench icon indicating copy to clipboard operation
hive-testbench copied to clipboard

values.h should be limits.h

Open harschware opened this issue 10 years ago • 3 comments

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

harschware avatar Jun 19 '14 00:06 harschware

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

harschware avatar Jun 19 '14 00:06 harschware

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

gregrahn avatar Oct 05 '14 20:10 gregrahn

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

saurabhmishra avatar Jun 12 '17 20:06 saurabhmishra