Skip to content
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

Error on bootstrapping : Empty search path given via '-L' (solaris) #97260

Closed
gco opened this issue May 21, 2022 · 3 comments · Fixed by #98081
Closed

Error on bootstrapping : Empty search path given via '-L' (solaris) #97260

gco opened this issue May 21, 2022 · 3 comments · Fixed by #98081

Comments

@gco
Copy link
Contributor

gco commented May 21, 2022

As in issue #97138, Solaris builds fail with Empty search path given via '-L' starting with 1.61.0.

This patch addressed the issue for me.

--- rustc-1.61.0-src/src/bootstrap/native.rs.orig       2022-05-19 21:16:18.998566618 -0700
+++ rustc-1.61.0-src/src/bootstrap/native.rs   2022-05-19 21:17:39.024869741 -0700
@@ -568,7 +568,7 @@
     // For distribution we want the LLVM tools to be *statically* linked to libstdc++.
     // We also do this if the user explicitly requested static libstdc++.
     if builder.config.llvm_static_stdcpp {
-        if !target.contains("msvc") && !target.contains("netbsd") {
+        if !target.contains("msvc") && !target.contains("netbsd") && !target.contains("solaris") {
             if target.contains("apple") || target.contains("windows") {
                 ldflags.push_all("-static-libstdc++");
             } else {
--- rustc-1.61.0-src/src/bootstrap/compile.rs.orig      2022-05-20 22:03:54.595228695 -0700
+++ rustc-1.61.0-src/src/bootstrap/compile.rs  2022-05-20 22:03:36.719735568 -0700
@@ -727,6 +727,7 @@
             && !target.contains("freebsd")
             && !target.contains("msvc")
             && !target.contains("apple")
+            && !target.contains("solaris")
         {
             let file = compiler_file(
                 builder,

@psumbera
Copy link
Contributor

Thank you! I can confirm that this really helps. Maybe you should turn it into pull request straightaway.

gco added a commit to gco/rust-solaris that referenced this issue Jun 14, 2022
Fixes: Error on bootstrapping : Empty search path given via '-L' (solaris) rust-lang#97260
@sundeep-kokkonda
Copy link
Contributor

sundeep-kokkonda commented Jun 15, 2022

What is the reason for disabling the static linking of libstdc++ on Solaris instead of building a static libstdc++? Is it a working around or a fix for the issue?

@gco
Copy link
Contributor Author

gco commented Jun 15, 2022

Solaris generally prefers dynamic linking and does not ship system libraries in static form. There are no first-party packages to install to get a static libstdc++, only shared objects are provided.

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 a pull request may close this issue.

3 participants