Skip to content

Commit 6ab44c3

Browse files
sbc100Commit bot
authored and
Commit bot
committed
Add libssl1.0.0:i386 to install-build-deps.sh for naclports
Previously we were installing and using libssl0.9.8:i386 which was actually a miss-match with the 1.0.0 headers installed by libssl-dev. TEST=local (remove links and run install-build-deps.sh) Review URL: https://codereview.chromium.org/913183004 Cr-Commit-Position: refs/heads/master@{#316319}
1 parent cf84e6e commit 6ab44c3

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

build/install-build-deps.sh

+26-8
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ nacl_list="g++-mingw-w64-i686 lib32z1-dev
155155
libfontconfig1:i386 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386
156156
libgtk2.0-0:i386 libncurses5:i386 lib32ncurses5-dev
157157
libnss3:i386 libpango1.0-0:i386
158-
libssl0.9.8:i386 libtinfo-dev libtinfo-dev:i386 libtool
158+
libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool
159159
libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386
160160
libxrandr2:i386 libxss1:i386 libxtst6:i386 texinfo xvfb
161161
${naclports_list}"
@@ -352,7 +352,7 @@ if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then
352352
sudo dpkg --add-architecture i386
353353
fi
354354
fi
355-
sudo apt-get update
355+
#sudo apt-get update
356356

357357
# We initially run "apt-get" with the --reinstall option and parse its output.
358358
# This way, we can find all the packages that need to be newly installed
@@ -416,14 +416,32 @@ else
416416
echo "Skipping installation of Chrome OS fonts."
417417
fi
418418

419-
if test "$do_inst_nacl" = "1"; then
420-
echo "Installing symbolic links for NaCl."
421-
if [ ! -r /usr/lib/i386-linux-gnu/libcrypto.so ]; then
422-
sudo ln -fs libcrypto.so.0.9.8 /usr/lib/i386-linux-gnu/libcrypto.so
419+
# $1 - target name
420+
# $2 - link name
421+
create_library_symlink() {
422+
target=$1
423+
linkname=$2
424+
if [ -L $linkname ]; then
425+
if [ "$(basename $(readlink $linkname))" != "$(basename $target)" ]; then
426+
sudo rm $linkname
427+
fi
423428
fi
424-
if [ ! -r /usr/lib/i386-linux-gnu/libssl.so ]; then
425-
sudo ln -fs libssl.so.0.9.8 /usr/lib/i386-linux-gnu/libssl.so
429+
if [ ! -r $linkname ]; then
430+
echo "Creating link: $linkname"
431+
sudo ln -fs $target $linkname
426432
fi
433+
}
434+
435+
if test "$do_inst_nacl" = "1"; then
436+
echo "Installing symbolic links for NaCl."
437+
# naclports needs to cross build python for i386, but libssl1.0.0:i386
438+
# only contains libcrypto.so.1.0.0 and not the symlink needed for
439+
# linking (libcrypto.so).
440+
create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \
441+
/usr/lib/i386-linux-gnu/libcrypto.so
442+
443+
create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \
444+
/usr/lib/i386-linux-gnu/libssl.so
427445
else
428446
echo "Skipping symbolic links for NaCl."
429447
fi

0 commit comments

Comments
 (0)