Opened 6 years ago

Closed 6 years ago

#11035 closed enhancement (wontfix)

rustc seems to require libssh2 static library

Reported by: Bruce Dubbs Owned by: blfs-book
Priority: normal Milestone: 8.3
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

At least I can't run DESTDIR=${PWD}/install ./x.py install without it.

When I remove --disable-static from the libssh2 instructions, rust continues.

Change History (4)

comment:1 by ken@…, 6 years ago

Not confirmed. Did you record any messages from the failed install ('install' gets mentioned several times in my log, at different places.

From my libssh2 build

checking if gcc static flag -static works... no
...
checking whether to build shared libraries... yes
checking whether to build static libraries... no

and from my list on installed files for libssh2

/usr/include/libssh2_sftp.h
/usr/lib/libssh2.la.hidden
/usr/lib/libssh2.so
/usr/lib/libssh2.so.1
/usr/lib/libssh2.so.1.0.1
/usr/lib/pkgconfig/libssh2.pc

and in my log for rustc-1.25.0 there are exactly two references to libssh2:

   Compiling url v1.7.0
   Compiling libgit2-sys v0.6.19
   Compiling libssh2-sys v0.2.6
   Compiling synstructure v0.6.1
...
   Compiling regex v0.2.5
   Compiling libssh2-sys v0.2.6
   Compiling libgit2-sys v0.6.19
   Compiling idna v0.1.4

For clarification (since everyone knows I often build and install as root) my rustc script has

chown -R lfs:users ../${KM_DIRECTORY}
...
su lfs -c 'export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" &&
           ./x.py build
...
su lfs -c 'DESTDIR=${PWD}/install ./x.py install'

in reply to:  1 comment:2 by Bruce Dubbs, 6 years ago

Replying to ken@…:

Not confirmed. Did you record any messages from the failed install ('install' gets mentioned several times in my log, at different places.

No, sorry I did not log the problem. I had a typo in my script so the 'DESTDIR=${PWD}/install ./x.py install' failed immediately (./py not found). I then ran the command by hand and it failed mentioning that the static library for libssh2 was not found. I rebuilt ssh2 and restarted the install which proceeded past the problem. It did run into another problem so at that point I restarted the full rustc build.

The full rustc build then worked. I note in that log the only mention of ssh2 is 'Compiling libssh2-sys v0.2.6' and that is BEFORE the install phase. For some reason the procedure when I ran the install by hand wanted to rebuild a lot of things.

This is my script:

DIR=`pwd`
VER=1.25.0
...
cat << EOF > config.toml
...
EOF

export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" &&

./x.py build  &&

echo "BLFS Start CHECK"  &&
#date > $DIR/rustc-$VER-testlog &&
#(./x.py test --verbose --no-fail-fast 2>&1 >> $DIR/rustc-$VER-testlog || true ) &&
#date >> $DIR/rustc-$VER-testlog &&

echo "BLFS Start INSTALL"  &&
DESTDIR=${PWD}/install ./x.py install &&   # <--- My typo was here

sudo chown -R root:root install &&
sudo cp -a install/* /

comment:3 by ken@…, 6 years ago

I've seen the 'rebuilding a lot of things' when manually building as a user and then manually installing as root.

OTOH, I've seen enough weird problems in rustc (I blame python ;-) to be willing to accept that there might be other issues lurking around.

I'll also note that when I last looked at a reproducible builds website (for debian etc) they had not managed to build rustc in their (jenkins?) environment because of its need for network access. Given my previous experience with the tests (in earlier verions they seemed to run in random order) I can believe that some random difference in build order might give different results.

comment:4 by Bruce Dubbs, 6 years ago

Resolution: wontfix
Status: newclosed

OK, I'll mark this as wontfix to close the ticket. I don't want to rebuild rust without the static libssh2 library and my initial build that identified the problem was bad. It has worked in the past and nothing in 8.3 would make it look for a library that it didn't use before.

It could be as simple as not running ldconfig after an abortive attempt to build.

Note: See TracTickets for help on using tickets.