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

Tunnel fails on alpine linux #20

Closed
joscha opened this issue Oct 4, 2016 · 8 comments
Closed

Tunnel fails on alpine linux #20

joscha opened this issue Oct 4, 2016 · 8 comments

Comments

@joscha
Copy link

joscha commented Oct 4, 2016

It seems that the binary can't be properly started on an alpine-based image:

BrowserStack error BrowserStack tunnel: 'LocalError: Error: spawn /root/.browserstack/BrowserStackLocal ENOENT'

I suspect some of the logic to figure out which binary to download to be failing.

With alpine:3.4:

bash-4.3# wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip
--2016-10-04 23:27:59--  https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip
Resolving www.browserstack.com... 52.200.35.219, 52.205.168.216, 54.164.231.212
Connecting to www.browserstack.com|52.200.35.219|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5914538 (5.6M) [application/zip]
Saving to: 'BrowserStackLocal-linux-x64.zip'

BrowserStackLocal-linux-x64.zip        100%[===========================================================================>]   5.64M   403KB/s    in 31s

2016-10-04 23:28:34 (188 KB/s) - 'BrowserStackLocal-linux-x64.zip' saved [5914538/5914538]

bash-4.3# unzip BrowserStackLocal-linux-x64.zip
Archive:  BrowserStackLocal-linux-x64.zip
  inflating: BrowserStackLocal
bash-4.3# ./BrowserStackLocal
bash: ./BrowserStackLocal: No such file or directory
@joscha
Copy link
Author

joscha commented Oct 4, 2016

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

@joscha
Copy link
Author

joscha commented Oct 4, 2016

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

@joscha
Copy link
Author

joscha commented Oct 4, 2016

Seems to be related to: gliderlabs/docker-alpine#11

@vedharish
Copy link
Contributor

@joscha Thank you for digging up on this!

@joscha
Copy link
Author

joscha commented Oct 4, 2016

@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.

@joscha
Copy link
Author

joscha commented Oct 5, 2016

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>

@joscha joscha closed this as completed Oct 5, 2016
@holms
Copy link

holms commented Jun 18, 2019

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.

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

No branches or pull requests

3 participants