Closed joscha closed 8 years ago
Seems there are some missing libs:
bash-4.3# file ./BrowserStackLocal
./BrowserStackLocal: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=65535af54d7b8808fdd2b7587354710dd3ced488, stripped
bash-4.3# ldd ./BrowserStackLocal
/lib64/ld-linux-x86-64.so.2 (0x560fb93fa000)
libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x560fb93fa000)
librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x560fb93fa000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f9b26973000)
libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x560fb93fa000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f9b26760000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x560fb93fa000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x560fb93fa000)
Error relocating ./BrowserStackLocal: __isnan: symbol not found
Error relocating ./BrowserStackLocal: backtrace: symbol not found
Error relocating ./BrowserStackLocal: __isinf: symbol not found
After installing https://github.com/sgerrand/alpine-pkg-glibc we can at least see an error:
bash-4.3# ./BrowserStackLocal
./BrowserStackLocal: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Seems to be related to: https://github.com/gliderlabs/docker-alpine/issues/11
@joscha Thank you for digging up on this!
@vedharish ;) I just opened a support ticket - I actually think the only way to do this is to build the binary on alpine and provide it or to make the source available, so it can be built at template build time.
Got it to work, I'll leave this here for future reference:
#### <browserstack>
# Copied from https://github.com/sgerrand/alpine-pkg-glibc
ENV GLIBC_VERSION 2.23-r3
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub \
&& wget "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/glibc-$GLIBC_VERSION.apk" \
&& apk --no-cache add "glibc-$GLIBC_VERSION.apk" \
&& rm "glibc-$GLIBC_VERSION.apk" \
&& wget "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/glibc-bin-$GLIBC_VERSION.apk" \
&& apk --no-cache add "glibc-bin-$GLIBC_VERSION.apk" \
&& rm "glibc-bin-$GLIBC_VERSION.apk" \
&& wget "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/glibc-i18n-$GLIBC_VERSION.apk" \
&& apk --no-cache add "glibc-i18n-$GLIBC_VERSION.apk" \
&& rm "glibc-i18n-$GLIBC_VERSION.apk"
RUN wget -q https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip \
&& unzip BrowserStackLocal-linux-x64.zip \
&& rm BrowserStackLocal-linux-x64.zip
#### </browserstack>
It still doesn't work to me:
BrowserStackLocal: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
I really wonder why browserstack won't provide docker image. it's kind of 2019 already and we're not living in a tank.
It seems that the binary can't be properly started on an alpine-based image:
I suspect some of the logic to figure out which binary to download to be failing.
With
alpine:3.4
: