Skip to content

"./configure --libdir=/usr/lib64 ; make" fails to build correctly (and install) #32261

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

Closed
shlomif opened this issue Mar 15, 2016 · 5 comments
Closed

Comments

@shlomif
Copy link

shlomif commented Mar 15, 2016

Hi all!

Running ./configure --libdir=/usr/lib64 and make fails to build rustc-1.7.0-src correctly (and I need to do that and other parameters for build Mageia x86-64 v6 RPMs). The following tentative patch fixes the problem.

--- rustc-1.7.0/mk/main.mk.fix-rel-lib  2016-03-01 21:18:54.000000000 +0200
+++ rustc-1.7.0/mk/main.mk  2016-03-15 14:13:30.741991672 +0200
@@ -389,17 +389,17 @@
 HLIB_RELATIVE$(1)_H_$(3) = bin
 TROOT$(1)_T_$(2)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)/rustlib/$(2)
 # Remove the next 3 lines after a snapshot
-ifeq ($(1),0)
-RUSTFLAGS_STAGE0 += -L $$(TROOT$(1)_T_$(2)_H_$(3))/lib
-endif
+#ifeq ($(1),0)
+#RUSTFLAGS_STAGE0 += -L $$(TROOT$(1)_T_$(2)_H_$(3))/lib
+#endif

 else

-ifeq ($(1),0)
-HLIB_RELATIVE$(1)_H_$(3) = lib
-else
+#ifeq ($(1),0)
+#HLIB_RELATIVE$(1)_H_$(3) = lib
+#else
 HLIB_RELATIVE$(1)_H_$(3) = $$(CFG_LIBDIR_RELATIVE)
-endif
+#endif
 TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)

 endif

Thanks to eddyb on #rust-internals on irc.mozilla.org for some diagnosis and help.

@alexcrichton
Copy link
Member

@shlomif can you gist what errors you were seeing as part of the build? I just checked out master, ran ./configure --libdir=/usr/lib64 --prefix=/usr, and the build succeeded.

@eddyb
Copy link
Member

eddyb commented Mar 15, 2016

Specifically, this shows that the snapshot compiler is looking in lib64/rustlib but it finds only 2 entries (. and .., presumably):

14191 open("/home/shlomif/Download/unpack/Mageia/TO_DEL/rust/BUILD/rustc-1.7.0/x86_64-unknown-linux-gnu/stage0/lib64/rustlib/x86_64-unknown-linux-gnu/lib", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
14191 fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
14191 getdents(3, /* 2 entries */, 32768) = 48
14191 getdents(3, /* 0 entries */, 32768) = 0
14191 close(3)                          = 0

@alexcrichton
Copy link
Member

That looks like a previous bug where the lib64 directory in the snapshot directory should not exist, but the configure script created it by accident. That was fixed in #31074 and looks like it may have not made it out to a release yet

@alexcrichton
Copy link
Member

Ah I meant to close this as I think it's a dupe of #27254, but feel free to reopen if it happens on nightly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants