[AOCL-Utils] Add recipe for AOCL-Utils (Get Windows work?)
I am trying to build AOCL-Utils, a component of AOCL used to detect the CPU information that is required by multiple components of AOCL.
I managed to get the Linux build to work through. But, I have no idea how to fix the Windows build. The build system seems to assume that the build process happens on Windows.
I removed FreeBSD from the platform list, because it seems that too many changes are required for FreeBSD that is not supported by AOCL.
@giordano Hi! After some attempts with the help of ChatGPT, I conclude that the amount of changes required for the build to succeed on Mingw32 is too much. I keep getting new error messages every time I make some small move ahead. The developers of AOCL simply didn't take into account the possibility of cross-compilation from Linux for Windows. Do you think it is fine to just proceed with Linux without Windows until someone who is interested in Windows get the compilation work for Windows? (There are a couple of other components of AOCL that I am interested in. It's very likely that they are not cross-compilation friendly either.)
This recipe looks plausible. I think it's fine to exclude e.g. macOS if you can't manage to build it there. Though I'd recommend to insert a brief comment that indicates what roughly the problem is. This way, if someone needs to enable this in the future, at least they know if they are still running into the same issue as you or into something different.
That said, if you forgot in the meantime what the precise problems were, then just leave it.
There is a build failure on Windows, though. First there is a warning that sounds concerning to me.
[21:47:27] -- Check for working C compiler: /opt/bin/x86_64-w64-mingw32-libgfortran5-cxx11/cc
[21:47:27] -- Check for working C compiler: /opt/bin/x86_64-w64-mingw32-libgfortran5-cxx11/cc - works
[21:47:27] -- Detecting C compile features
[21:47:27] -- Detecting C compile features - done
[21:47:27] CMake Warning (dev) at /workspace/x86_64-linux-musl-cxx11/artifacts/db67336af9bf24e2b9519fcc67d9b934e5647add/share/cmake-3.31/Modules/GNUInstallDirs.cmake:253 (message):
[21:47:27] Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
[21:47:27] target architecture is known. Please enable at least one language before
[21:47:27] including GNUInstallDirs.
[21:47:27] Call Stack (most recent call first):
[21:47:27] CMake/au_project.cmake:28 (include)
[21:47:27] CMakeLists.txt:75 (include)
[21:47:27] This warning is for project developers. Use -Wno-dev to suppress it.
...
Then an actual error that seems really strange:
[21:47:27] -- Check size of unsigned short
[21:47:28] CMake Error at /workspace/x86_64-linux-musl-cxx11/artifacts/db67336af9bf24e2b9519fcc67d9b934e5647add/share/cmake-3.31/Modules/CheckTypeSize.cmake:156 (try_compile):
[21:47:28] Cannot copy output executable
[21:47:28]
[21:47:28] ''
[21:47:28]
[21:47:28] to destination specified by COPY_FILE:
[21:47:28]
[21:47:28] '/workspace/srcdir/aocl-utils/default/CMakeFiles/CheckTypeSize/CMAKE_SIZEOF_UNSIGNED_SHORT.bin'
[21:47:28]
[21:47:28] because:
[21:47:28]
[21:47:28] No such file or directory (input)
[21:47:28]
[21:47:28] Recorded try_compile output location doesn't exist:
[21:47:28]
[21:47:28] /workspace/srcdir/aocl-utils/default/CMakeFiles/CMakeScratch/TryCompile-heKjjA/cmTC_2ce15