itwood / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

mac compile with opencl - 3.04-rc1 #1479

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. configure --enable-opencl
2. using macport leptonica
3. maxos

What is the expected output? What do you see instead?
compile error over:

openclwrapper.cpp:2993:9: error: no matching function for call to 
'clock_get_time'
        clock_gettime( CLOCK_MONOTONIC, &time_funct_start );
        ^~~~~~~~~~~~~
./openclwrapper.h:75:23: note: expanded from macro 'clock_gettime'
#define clock_gettime clock_get_time
                      ^~~~~~~~~~~~~~
/usr/include/mach/clock.h:52:15: note: candidate function not viable: no known 
conversion from 'timespec *' to 'mach_timespec_t *' (aka 'mach_timespec *') for 
2nd argument
kern_return_t clock_get_time
              ^
openclwrapper.cpp:3003:9: error: no matching function for call to 
'clock_get_time'
        clock_gettime( CLOCK_MONOTONIC, &time_funct_end );
        ^~~~~~~~~~~~~

There were earlier errors about size_t and int, which I fixed as I found from 
other thread.
WHat is the equivalent function of clock_gettime on mac?

Original issue reported on code.google.com by mevi...@gmail.com on 30 May 2015 at 1:17

GoogleCodeExporter commented 9 years ago
Compiling got fixed after some patches for ON_APPLE.

Original comment by mevi...@gmail.com on 30 May 2015 at 2:39

GoogleCodeExporter commented 9 years ago
diff attached.

Original comment by mevi...@gmail.com on 30 May 2015 at 2:46

Attachments:

GoogleCodeExporter commented 9 years ago
make pull request on https://github.com/tesseract-ocr/tesseract

Original comment by zde...@gmail.com on 31 May 2015 at 9:53

GoogleCodeExporter commented 9 years ago
I committed it: 
https://github.com/tesseract-ocr/tesseract/commit/d00d833b9baee36abcae05f076f8ac
97b8662958

Original comment by zde...@gmail.com on 29 Jun 2015 at 10:41