Compilation error for MacOS X 10.9


#1

I downloaded v13.11 source and tried to compile it on my Mac OS X 10.9 and I ran into issues!

I fixed some minor issues with missing packages (installed using macports), missing time functions (created workarounds using #ifdefs) and some shared_ptr related issues but now I’m stuck! Below is the error that I’m getting and I cannot figure out how to proceed. Any help/pointer is highly appreciated! BTW, I searched the forums for “Mac OSX” and stumbled across github.com/tshead/scidb-osx-12.10-mountain-lion but it didn’t help much.

In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/src/util/FileIO.cpp:39:
In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/include/util/FileIO.h:65:
In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/include/util/Singleton.h:34:
In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/include/util/Mutex.h:38:
In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/include/system/Exceptions.h:35:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/mutex:284:22: error: use of undeclared identifier 'pthread_self'; did you mean 'scidb::pthread_self'?
    pthread_t __id = pthread_self();
                     ^
/usr/include/pthread.h:438:11: note: 'scidb::pthread_self' declared here
pthread_t pthread_self(void);
          ^
In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/src/util/FileIO.cpp:39:
In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/include/util/FileIO.h:65:
In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/include/util/Singleton.h:34:
In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/include/util/Mutex.h:38:
In file included from /Users/vijay/code/scidb/scidb-13.11.0.6669/include/system/Exceptions.h:35:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/mutex:286:9: error: use of undeclared identifier 'pthread_equal'; did you mean 'scidb::pthread_equal'?
    if (pthread_equal(__id, __id_))
        ^
/usr/include/pthread.h:317:5: note: 'scidb::pthread_equal' declared here
int pthread_equal(pthread_t, pthread_t);
    ^
2 errors generated.
make[2]: *** [src/util/CMakeFiles/util_lib.dir/FileIO.cpp.o] Error 1
make[1]: *** [src/util/CMakeFiles/util_lib.dir/all] Error 2
make: *** [all] Error 2

Thanks in advance,
Vijay.


#2

Porting to MaxOS is not something very high on our priority list, Vijay. Sorry. We were doing it, but we found we weren’t able to get it done with the kind of quality we want.

What you’re noticing is that the versions of compilers / libraries etc on MacOS is almost always a version or two behind what’s available on most Linux distros. Which is fair enough, from Apple’s point of view. They want high quality and so on.

Porting to Mac will require finding out all the places where system calls we make … like pthreads … aren’t supported, figure out how to support them, and them #ifdef around the changes.


#3

Thanks for your reply, plumber. I’m sorry for the late response. I’ll try your suggestion about #ifdefs and see if I can compile it. I’ll let you all know if I succeed at it.

Thanks.