-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
x86_64-darwin: fix packages that won’t build #180931
base: master
Are you sure you want to change the base?
Changes from all commits
a051cd4
adc00b5
59b1e6f
fa9c94f
dca1027
1c3209c
f6fe769
a37f655
b6f49f8
aba4ef7
db2bf11
c2d49c2
e1849f9
e408f09
73a2a1c
325b3a6
b6b8106
8127f5e
aa9b1ac
d5b70be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/MaxSatSolver.cc b/src/MaxSatSolver.cc | ||
index 9e32dac..261032d 100644 | ||
--- a/src/MaxSatSolver.cc | ||
+++ b/src/MaxSatSolver.cc | ||
@@ -277,7 +277,7 @@ void MaxSatSolver::bce() { | ||
else { | ||
for(int j = 0; j < softLiterals.size(); j++) { | ||
if(var(softLiterals[j]) == i) { | ||
- if(occ[i][sign(softLiterals[j])] > 0) { | ||
+ if(occ[i][sign(softLiterals[j])] > (unsigned int *)0) { | ||
// cout << "Pure literal: " << mkLit(i, occ[i][1].size() == 0) << endl; | ||
addClause(mkLit(i, occ[i][1].size() == 0)); | ||
weights[i] = 0; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/src/Bullet3Common/b3Vector3.h b/src/Bullet3Common/b3Vector3.h | ||
index 50504c7f7..dee61c400 100644 | ||
--- a/src/Bullet3Common/b3Vector3.h | ||
+++ b/src/Bullet3Common/b3Vector3.h | ||
@@ -39,7 +39,7 @@ subject to the following restrictions: | ||
#endif | ||
|
||
|
||
-#define B3_SHUFFLE(x,y,z,w) ((w)<<6 | (z)<<4 | (y)<<2 | (x)) | ||
+#define B3_SHUFFLE(x, y, z, w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff) | ||
//#define b3_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) ) | ||
#define b3_pshufd_ps( _a, _mask ) _mm_shuffle_ps((_a), (_a), (_mask) ) | ||
#define b3_splat3_ps( _a, _i ) b3_pshufd_ps((_a), B3_SHUFFLE(_i,_i,_i, 3) ) | ||
diff --git a/src/LinearMath/btVector3.h b/src/LinearMath/btVector3.h | ||
index 8d0b73f88..f3be485da 100644 | ||
--- a/src/LinearMath/btVector3.h | ||
+++ b/src/LinearMath/btVector3.h | ||
@@ -39,7 +39,7 @@ subject to the following restrictions: | ||
#endif | ||
|
||
|
||
-#define BT_SHUFFLE(x,y,z,w) ((w)<<6 | (z)<<4 | (y)<<2 | (x)) | ||
+#define BT_SHUFFLE(x, y, z, w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff) | ||
//#define bt_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) ) | ||
#define bt_pshufd_ps( _a, _mask ) _mm_shuffle_ps((_a), (_a), (_mask) ) | ||
#define bt_splat3_ps( _a, _i ) bt_pshufd_ps((_a), BT_SHUFFLE(_i,_i,_i, 3) ) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ stdenvNoCC, fetchurl, newScope, lib, pkgs | ||
{ stdenvNoCC, fetchurl, newScope, lib, pkgs, buildPackages, targetPackages | ||
, stdenv, overrideCC | ||
, xar, cpio, python3, pbzx }: | ||
|
||
|
@@ -46,7 +46,7 @@ let | |
inherit MacOSX-SDK; | ||
|
||
Libsystem = callPackage ./libSystem.nix {}; | ||
LibsystemCross = pkgs.darwin.Libsystem; | ||
LibsystemCross = packages.Libsystem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we sure this is fine? I feel like it'd have been defined as an alias before if that was the case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I follow. Aren’t aliases for deprecated names? This change was to correct what I believe was a mistake in the previous patch. The 11.0 SDK originally assumed that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I meant with an alias was I'm really not sure how cross works in Nix. But I do suspect There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah. It’s not currently different on aarch64-darwin, so I propagated that here. I assume it works because Apple’s SDK is naturally cross-capable. |
||
libcharset = callPackage ./libcharset.nix {}; | ||
libunwind = callPackage ./libunwind.nix {}; | ||
libnetwork = callPackage ./libnetwork.nix {}; | ||
|
@@ -55,35 +55,8 @@ let | |
# questionable aliases | ||
configd = pkgs.darwin.apple_sdk.frameworks.SystemConfiguration; | ||
IOKit = pkgs.darwin.apple_sdk.frameworks.IOKit; | ||
|
||
callPackage = newScope (lib.optionalAttrs stdenv.isDarwin rec { | ||
inherit (pkgs.darwin.apple_sdk_11_0) stdenv; | ||
darwin = pkgs.darwin.overrideScope (_: prev: { | ||
inherit (prev.darwin.apple_sdk_11_0) Libsystem LibsystemCross libcharset libunwind objc4 configd IOKit Security; | ||
apple_sdk = prev.darwin.apple_sdk_11_0; | ||
CF = prev.darwin.apple_sdk_11_0.CoreFoundation; | ||
}); | ||
xcodebuild = pkgs.xcbuild.override { | ||
inherit (pkgs.darwin.apple_sdk_11_0.frameworks) CoreServices CoreGraphics ImageIO; | ||
inherit stdenv; | ||
}; | ||
xcbuild = xcodebuild; | ||
}); | ||
|
||
stdenv = | ||
let | ||
clang = stdenv.cc.override { | ||
bintools = stdenv.cc.bintools.override { libc = packages.Libsystem; }; | ||
libc = packages.Libsystem; | ||
}; | ||
in | ||
if stdenv.isAarch64 then stdenv | ||
else | ||
(overrideCC stdenv clang).override { | ||
targetPlatform = stdenv.targetPlatform // { | ||
darwinMinVersion = "10.12"; | ||
darwinSdkVersion = "11.0"; | ||
}; | ||
}; | ||
} // import ./pkg-compatibility.nix { | ||
inherit lib pkgs stdenv; | ||
darwinPackages = packages; | ||
}; | ||
in packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can leave a TODO here to switch back away from the SDK when stdenv gets bumped to 10.13, if that is enough?