Skip to content

Conversation

ShortDevelopment
Copy link
Contributor

palinternal.h defines a fallback for the min and max macros in case the compiler does not:

// do not change the location of the definitions below.
// these defs should be always at the end
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif

finite.cpp imports palinternal.h before <math> so we end up with two conflicting definitions of min and max:

#include "pal/palinternal.h"
#include "pal/dbgmsg.h"
#include <math.h>


@rhuanjl This is the first in a stack of PRs that will hopefully fix MacOS ci.
Until then, MacOS builds will fail...

@ShortDevelopment ShortDevelopment marked this pull request as ready for review October 4, 2025 12:09
@ShortDevelopment
Copy link
Contributor Author

ShortDevelopment commented Oct 4, 2025

As expected

  • the MacOS build fails due to an out-of-date minimum CMake version
    See fix: MacOS build #7040
  • Linux builds pass now

Strangely, one win-x86 test fails.
Maybe due to "Out of Memory"?

for (i = 0; i < 1000; i++) {
var a = new ArrayBuffer(10000000);
for (j = 0; j < 20; j++) {
var b = new Object();
}
}
WScript.Echo("pass");

@ShortDevelopment ShortDevelopment changed the title chore: fix linux build fix: linux build Oct 4, 2025
@rhuanjl rhuanjl merged commit 22f1619 into chakra-core:master Oct 4, 2025
14 of 24 checks passed
@rhuanjl
Copy link
Collaborator

rhuanjl commented Oct 4, 2025

As expected

  • the MacOS build fails due to an out-of-date minimum CMake version

    See fix: MacOS build #7040

  • Linux builds pass now

Strangely, one win-x86 test fails.

Maybe due to "Out of Memory"?

for (i = 0; i < 1000; i++) {
var a = new ArrayBuffer(10000000);
for (j = 0; j < 20; j++) {
var b = new Object();
}
}
WScript.Echo("pass");

That win x86 test has been flakey for a long time - sometimes passes, sometimes hits out of memory.

@ShortDevelopment
Copy link
Contributor Author

ShortDevelopment commented Oct 4, 2025

Hey, thank you for the quick merge!
Next in the stack is #7040 but I still have some strange issues with byte-code regen on linux...

@ShortDevelopment ShortDevelopment deleted the bugfix/linux-build branch October 4, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants