Missed Headers folder in OpenCl.framework Mac OS Mojave - macos

I am trying to stark work with OpenCl framework on my MacBook, and Mac OS has the framework installed, but there is no needed header cl.hpp I want to work with. I have downloaded the header from Khronos OpenCL Registry, but now I do not know where to paste it since there is no Headers folder in /System/Library/Frameworks/OpenCL.framework/, I've tried to find present headers (cl.h) with find in Terminal, but unsuccessful. What can I do?

Now I fixed the problem, I noticed that cmake finds OpenCL at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenCL.framework. There is folder Headers.

Related

how to compile a FMU on windows to be used in Mac?

I have generated one FMU on Windows, and imported the FMU on Mac using Matlab Simulink, and got the following error. I searched for the problem and get some clues from the answer here
https://tomlankhorst.nl/quick-fix-matlab-fmu-import-error/, it seems like FMU will be stored as different form when generated on Windows and Mac.
the question is: is it possible to generate a FMU on windows that still works on Mac.
In order to compile for MacOS, you need the C headers for the MacOS platform. These are only available in XCode which only runs on MacOS and the headers themselves are not allowed to be redistributed.
As such, it's pretty hard to cross-compile for MacOS. You can install XCode on your Mac, move the required headers to your system and compile a Darwin toolchain on your Windows machine (I believe), but it's very error-prone and annoying to update for newer MacOS versions.
The easiest way would be to run MacOS and cross-compile Windows+Linux binaries since these platforms are less closed.
Or like #matth commented, generate a source-code FMU and compile that using the native toolchain on any platform you need.

Mac OSX 10.10 AMD APP SDK Location

I have spent the past hour looking for the AMD APP SDK location for Mac OSX 10.10 and cannot find it for the life of me. I don't know the file name even so I can't just search for it and searching SDK doesn't work.
I know I have it because I'm on a Mac Pro with AMD cards.
I'm trying to set up an OpenCL version of Caffe and need a reference to my SDK for it to compile (https://github.com/amd/OpenCL-caffe/wiki). Because I'm not able to set the export AMDAPPSDKROOT=/opt/AMDAPPSDK-*/ I'm getting a compile error File /Users/mbahr/Downloads/OpenCL-caffe-stable/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */
I've looked in my usr and found nothing. I looked for this comment on where the openCL SDK would be and found nothing there, I don't even have a Developer folder as far as I can tell... much less a GPU Computing folder.
Help?
I know I have it because I'm on a Mac Pro with AMD cards.
If you are running OS X, you neither have nor need the AMD APP SDK.
I've just built OpenCL-Caffe from the GitHub repository on my own MacBook (10.11). The only configuration options I had to pass to CMake were to tell it where clBLAS was installed.
The only changes I needed to make to the source code were to replace #include <CL/...> with #include <OpenCL/...> in these files:
include/caffe/common.hpp
include/caffe/util/math_functions.hpp
and to remove #include <malloc.h> from src/caffe/device.cpp.

Where are the header files for the libiodbc included in Mac OS X 10.10?

Mac OS X 10.10.5 has /usr/lib/libiodbc.2.1.18.dylib and /usr/lib/libiodbcinst.2.1.18.dylib, and the same two libraries are also found under the MacOSX.10.10.sdk (e.g. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/libiodbc.2.1.18.dylib). Yet I cannot find the header files to go with it.
While I could grab some header files from the somewhere on the Internet, I'm concerned that whatever version I'd get might not match the version of the library that comes with Mac OS X. So which headers should I use?
As far as I can tell, the headers aren't among system headers or in the 10.10 SDK. The last SDK version that appears to have them is 10.8 and the functions are tagged DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER; this macro is the main difference between 10.8 and earlier SDKs, 10.6 and 10.7 (the only other difference is the inclusion of <objc/objc.h> in iodbcunix.h). The dynamic library in all cases (10.6-8, 10.10) has the same version, so differences between the headers should be minor.
Your options would be to get the iodbc headers from Apple's open source site (the versions in the 10.10 branches are identical to those in the 10.8 SDK) or copy them from the 10.7 or 10.8 SDK. From what I can find, the relevant files are:
bin:
iodbc-config
include:
iodbcext.h
iodbcinst.h
iodbcunix.h
isql.h
isqlext.h
isqltypes.h
odbcinst.h
sql.h
sqlext.h
sqltypes.h
sqlucode.h

Where is syscall_sw.h in Mac OS X?

Where is the file syscall_sw.h in Mac OS X?
I'm using it to program the classes found within in assembly, but I can only find the file on the Internet. I want to find it on my actual operating system filesystem. I've downloaded all of XCode and installed the Components and Documentation, but I still can't find the file.
It is not a public* header -- it can, however, be found in the kernel source code:
http://www.opensource.apple.com/source/xnu/xnu-2050.9.2/osfmk/kern/syscall_sw.h
*: Indicating that you should not need it unless you're working in the kernel.

SCTP missing include file on OSX?

I was messing around with sockets, and I wanted to test out using the SCTP protocol on my mac.
However, when I try to include the file netinet/sctp.h the compiler gives me a 'file not found' error.
So I did some digging, and sure enough, there is no include file for netinet/sctp.h on Mac OSX Lion. Why is that, when I can set up a socket with IPPROTO_SCTP, and it builds fine?
So, in summary, I have two questions:
Where are the headers for SCTP on Mac OSX?
Can I still set up a SCTP server without the proper headers? If so, how?
On Lion IPPROTO_SCTP is defined in netinet/in.h - that's why it worked just fine since you probably included netinet/in.h directly or indirectly. However, it is only present in Lion, not in any earlier OS X versions. (Note that netinet/sctp.h is not part of POSIX an I don't think it's portable)
Looks like you could do
brew install libusrsctp
And you will see the installed header here, although it is probably a different implementation with a different name:
cat /usr/local/Cellar/libusrsctp/0.9.5.0/include/usrsctp.h

Resources