Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some compilation/setup issues #131

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,6 @@ cd tpch/tpch-dbgen
make
```

Notes:

- For MacOS, the above `make` command will result in an error while compiling like below,

```shell
bm_utils.c:71:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
^~~~~~~~~~
1 error generated.
make: *** [bm_utils.o] Error 1
```
To fix this, change the import statement `#include <malloc.h>` to `#include <sys/malloc.h>` in the files where error
is reported (`bm_utils.c` and `varsub.c`) and then re-run the command `make`.

### Execute

```shell
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export RUN_LOG_TIMINGS=1
export SCALE_FACTOR=1
export SCALE_FACTOR=1.0

echo run with cached IO
make tables
Expand Down
6 changes: 5 additions & 1 deletion tpch-dbgen/bm_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@
#include <ctype.h>
#include <math.h>
#ifndef _POSIX_SOURCE
#include <malloc.h>
#ifdef __APPLE__
#include <sys/malloc.h>
#else
#include <malloc.h>
#endif
#endif /* POSIX_SOURCE */
#include <fcntl.h>
#include <sys/types.h>
Expand Down
6 changes: 5 additions & 1 deletion tpch-dbgen/varsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
*/
#include <stdio.h>
#ifndef _POSIX_SOURCE
#include <malloc.h>
#ifdef __APPLE__
#include <sys/malloc.h>
#else
#include <malloc.h>
#endif
#endif /* POSIX_SOURCE */
#if (defined(_POSIX_)||!defined(WIN32))
#include <unistd.h>
Expand Down