Working on getting initial build to work #2
Replies: 3 comments 2 replies
-
|
The code checks for _MSC_VER (Microsoft Visual C++) and uses _aligned_malloc for Windows. MinGW defines MINGW64 but not _MSC_VER. A patch to the build script should check for MinGW and make the adjustment. # Patch or-tools aligned_memory header for MinGW compatibility
$ortools_aligned_header = Join-Path $BuildDirAbsolute "_deps\or-tools-src\ortools\util\aligned_memory_internal.h"
if (Test-Path $ortools_aligned_header) {
Write-Host "`n Patching or-tools aligned_memory_internal.h for MinGW..." -ForegroundColor Gray
$content = Get-Content $ortools_aligned_header -Raw
if ($content -notmatch '__MINGW64__') {
$content = $content -replace '(#if !defined\(_MSC_VER\))', '#if !defined(_MSC_VER) && !defined(__MINGW64__)'
$content = $content -replace '(#else\s+_aligned_malloc)', '#elif defined(_MSC_VER) || defined(__MINGW64__)${1}'
Set-Content -Path $ortools_aligned_header -Value $content -NoNewline
Write-Host " Applied MinGW aligned_alloc patch" -ForegroundColor Green
}
} |
Beta Was this translation helpful? Give feedback.
-
|
This is an issue with a dependency in the 12th tutorial on "or-tools"
So I'm going to work on either simply putting the one algo it needs in place or simply getting rid of the dependency entirely. |
Beta Was this translation helpful? Give feedback.
-
|
Have to bail on MINGW64 and use CLANG64 "for reasons" (having to do with linker param/object order) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Trying to run build-windows.ps1 and getting issues that are going back to the default version of GCC being "too new" (15.1) so I'm going back to 14.2 and trying to get that to make it end to end.
I'm trying to avoid making wild changes to the code (to match the latest tools/APIs) because that would trigger a cascade of updates to the tutorials. Wish me luck!
Beta Was this translation helpful? Give feedback.
All reactions