You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/SPC/toolchain/ToolchainManager.php
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,10 @@
5
5
namespaceSPC\toolchain;
6
6
7
7
useSPC\builder\linux\SystemUtil;
8
+
useSPC\exception\RuntimeException;
8
9
useSPC\exception\WrongUsageException;
9
10
useSPC\util\GlobalEnvManager;
11
+
useSPC\util\SPCTarget;
10
12
11
13
class ToolchainManager
12
14
{
@@ -47,7 +49,13 @@ public static function initToolchain(): void
47
49
publicstaticfunctionafterInitToolchain(): void
48
50
{
49
51
if (!getenv('SPC_TOOLCHAIN')) {
50
-
thrownewWrongUsageException('SPC_TOOLCHAIN not set');
52
+
thrownewWrongUsageException('SPC_TOOLCHAIN was not properly set. Please contact the developers.');
53
+
}
54
+
if (SPCTarget::getLibc() === 'musl' && !SPCTarget::isStatic() && !file_exists('/lib/ld-musl-x86_64.so.1')) {
55
+
thrownewRuntimeException('You are linking against musl libc dynamically, but musl libc is not installed. Please install it with `sudo dnf install musl-libc` or `sudo apt install musl`');
56
+
}
57
+
if (SPCTarget::getLibc() === 'glibc' && SystemUtil::isMuslDist()) {
58
+
thrownewRuntimeException('You are linking against glibc libc dynamically, which is only supported on glibc distros.');
0 commit comments