-
Notifications
You must be signed in to change notification settings - Fork 120
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
How to build for FreeBSD 13.1? #55
Comments
Hi, can you please include the command lines you are using to build on FreeBSD? It looks like you are specifying a platform name with Here's what I do - should be all that is required for most Unix-like systems. Feel free to use another directory other than "build" if you would prefer, and start in the OpenCL-SDK directory you've cloned that has up-to-date submodules: $ mkdir build
$ cd build
$ cmake .. After the build files are generated and all dependencies have been fetched, simply build using "make". |
Thanks for your reply, yes I was using the "-A" option. I get the follow error after doing:
In the path:
Here is the CMakeOutput.log file:
Thanks |
Alright, I had to start over and did:
And now get a different error after doing "make":
Here is the output after doing "cmake":
Here is the cmakeoutput.log file:
Thanks. |
Thanks, this is helpful, and this looks like progress. Unfortunately, it also looks like we'll need some minor updates for the ICD loader and perhaps a few other parts of the SDK to work with FreeBSD. Here is where #if defined(__linux__) || defined(__APPLE__)
#define PATH_SEPARATOR ':'
#define DIRECTORY_SYMBOL '/'
// a bit more code here
#elif defined(_WIN32)
#define PATH_SEPARATOR ';'
#define DIRECTORY_SYMBOL '\\'
#endif Because FreeBSD meets none of these conditions A couple of things we can do to fix this:
It would also be nice to add a final Could you try making these changes to see if it will work for you? I don't have access to a FreeBSD system. Useful reference: https://stackoverflow.com/questions/142508/how-do-i-check-os-with-a-preprocessor-directive |
Thank You bashbaug, I will try these. |
The program have successfully built, Thank You. I simply modified Line 22 from: To: Then did a
As for adding an "else" check for the preprocessor directives in OS checking, this might work placed right above the first #endif directive:
It did compile but not sure how to trick the compiler to think I am using an OS that is not compatible. |
@bashbaug can this fix be submitted as a PR? That way I can grab the PR as a patch and apply it to the cross-compilation script. |
I mean, a PR to OpenCL-Headers + OpenCL-ICD-Loader, which is the core library we are trying to cross-compile, not the SDK as a whole. |
Yes - let's move discussion to the issue I just created, since we'll be making changes to the OpenCL ICD loader at least. KhronosGroup/OpenCL-ICD-Loader#184 I'll create a PR with @rajhlinux's changes. I don't have a FreeBSD system setup to easily test things right now (I can try setting up a VM), so I'll need a bit of help with the review, though. |
I get this error:
The text was updated successfully, but these errors were encountered: