I'm trying to compile on mac 10.9
1st problem:
mqueue.c:264:2: error: use of undeclared identifier 'ulong'
ulong timeleft = ((ulong)pgstrom_mqueue_timeout) * 1000000UL;
^
mqueue.c:285:12: error: use of undeclared identifier 'timeleft'
else if (timeleft == 0)
^
...
I solve it by adding line in top of mqueue.c:
typedef unsigned long ulong;
Next problem was:
opencl_entry.c:20:10: fatal error: 'CL/cl.h' file not found
#include <CL/cl.h>
Solution:
// in opencl_entry.c:20,
// replace #include "CL/cl.h" with following.
#ifdef __APPLE__
#include "OpenCL/opencl.h"
#else
#include "CL/cl.h"
#endif
Next when I start postgres it says:
FATAL: could not open OpenCL library: dlopen(libOpenCL.so, 6): image not found
I change opencl_entry.c:
// replace
dlopen("libOpenCL.so", RTLD_NOW | RTLD_LOCAL);
// with
dlopen("/System/Library/Frameworks/OpenCL.framework/Versions/Current/OpenCL", RTLD_NOW | RTLD_LOCAL);
Compile again run it and get segfault:
% postgres -D ./example_db
LOG: registering background worker "PG-Strom OpenCL Server"
LOG: starting background worker process "PG-Strom OpenCL Server"
LOG: database system was shut down at 2015-01-23 02:10:16 WIB
LOG: PG-Strom: [0] OpenCL Platform: Apple
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
LOG: OpenCL device has to support cl_khr_fp64 extension
LOG: worker process: PG-Strom OpenCL Server (PID 68338) was terminated by signal 11: Segmentation fault
LOG: terminating any other active server processes
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
LOG: all server processes terminated; reinitializing
FATAL: attempt to redefine parameter "pg_strom.enabled_global"
How to solve it?
I'm trying to compile on mac 10.9
1st problem:
I solve it by adding line in top of
mqueue.c:Next problem was:
Solution:
Next when I start postgres it says:
I change
opencl_entry.c:Compile again run it and get segfault:
How to solve it?