Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Can't seem to get a musl-libc build working #14357

Closed
svvac opened this issue Jun 14, 2016 · 1 comment
Closed

Can't seem to get a musl-libc build working #14357

svvac opened this issue Jun 14, 2016 · 1 comment

Comments

@svvac
Copy link

svvac commented Jun 14, 2016

I'm trying to get a musl-libc build of phantomjs working, specifically for use in Alpine Linux without the glibc-compat stuff.

I'm building from source (git tag 2.1.1) with the following patches applied:

The build process doesn't seem to run through any trouble, except for a few warnings on unused variables AFAICT (the build log is ginormous however, can't say I went through it all). However, when launching the binary, I get the REPL, but it doesn't seem to execute anything:

$ phantomjs --debug=true
2016-06-14T09:54:46 [DEBUG] CookieJar - Created but will not store cookies (use option '--cookies-file=<filename>' to enable persistent cookie storage)
2016-06-14T09:54:46 [DEBUG] Set  "http"  proxy to:  "" : 1080
2016-06-14T09:54:46 [DEBUG] Phantom - execute: Configuration
2016-06-14T09:54:46 [DEBUG]      0 objectName : ""
2016-06-14T09:54:46 [DEBUG]      1 cookiesFile : ""
2016-06-14T09:54:46 [DEBUG]      2 diskCacheEnabled : "false"
2016-06-14T09:54:46 [DEBUG]      3 maxDiskCacheSize : "-1"
2016-06-14T09:54:46 [DEBUG]      4 diskCachePath : ""
2016-06-14T09:54:46 [DEBUG]      5 ignoreSslErrors : "false"
2016-06-14T09:54:46 [DEBUG]      6 localUrlAccessEnabled : "true"
2016-06-14T09:54:46 [DEBUG]      7 localToRemoteUrlAccessEnabled : "false"
2016-06-14T09:54:46 [DEBUG]      8 outputEncoding : "UTF-8"
2016-06-14T09:54:46 [DEBUG]      9 proxyType : "http"
2016-06-14T09:54:46 [DEBUG]      10 proxy : ":1080"
2016-06-14T09:54:46 [DEBUG]      11 proxyAuth : ":"
2016-06-14T09:54:46 [DEBUG]      12 scriptEncoding : "UTF-8"
2016-06-14T09:54:46 [DEBUG]      13 webSecurityEnabled : "true"
2016-06-14T09:54:46 [DEBUG]      14 offlineStoragePath : ""
2016-06-14T09:54:46 [DEBUG]      15 localStoragePath : ""
2016-06-14T09:54:46 [DEBUG]      16 localStorageDefaultQuota : "-1"
2016-06-14T09:54:46 [DEBUG]      17 offlineStorageDefaultQuota : "-1"
2016-06-14T09:54:46 [DEBUG]      18 printDebugMessages : "true"
2016-06-14T09:54:46 [DEBUG]      19 javascriptCanOpenWindows : "true"
2016-06-14T09:54:46 [DEBUG]      20 javascriptCanCloseWindows : "true"
2016-06-14T09:54:46 [DEBUG]      21 sslProtocol : "default"
2016-06-14T09:54:46 [DEBUG]      22 sslCiphers : "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-RC4-SHA:ECDHE-RSA-RC4-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:RC4-SHA:RC4-MD5"
2016-06-14T09:54:46 [DEBUG]      23 sslCertificatesPath : ""
2016-06-14T09:54:46 [DEBUG]      24 sslClientCertificateFile : ""
2016-06-14T09:54:46 [DEBUG]      25 sslClientKeyFile : ""
2016-06-14T09:54:46 [DEBUG]      26 sslClientKeyPassphrase : ""
2016-06-14T09:54:46 [DEBUG]      27 webdriver : ":"
2016-06-14T09:54:46 [DEBUG]      28 webdriverLogFile : ""
2016-06-14T09:54:46 [DEBUG]      29 webdriverLogLevel : "INFO"
2016-06-14T09:54:46 [DEBUG]      30 webdriverSeleniumGridHub : ""
2016-06-14T09:54:46 [DEBUG] Phantom - execute: Script & Arguments
2016-06-14T09:54:46 [DEBUG]      script: ""
2016-06-14T09:54:46 [DEBUG] Phantom - execute: Starting REPL mode
2016-06-14T09:54:46 [DEBUG] WebPage - setupFrame ""
phantomjs> var a = 10
phantomjs> console.log(a);
phantomjs> console.log('Echo?')
phantomjs> This is not even *valid syntax*, yet it doesn't complain /o\
phantomjs> ^C
2016-06-14T09:55:52 [DEBUG] WebPage - setupFrame ""
2016-06-14T09:55:52 [DEBUG] WebPage - updateLoadingProgress: 10
2016-06-14T09:55:52 [DEBUG] WebPage - setupFrame ""
2016-06-14T09:55:52 [DEBUG] WebPage - updateLoadingProgress: 100

If anything is missing, I'd be happy to give more details.

Additional info:

$ phantomjs -v
2.1.1
$ ldd /usr/bin/phantomjs 
    /lib/ld-musl-x86_64.so.1 (0x559e6abbb000)
    libz.so.1 => /lib/libz.so.1 (0x7f1a3da7a000)
    libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x7f1a3d7cf000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x7f1a3d598000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7f1a3d2ea000)
    libssl.so.1.0.0 => /lib/libssl.so.1.0.0 (0x7f1a3d081000)
    libcrypto.so.1.0.0 => /lib/libcrypto.so.1.0.0 (0x7f1a3cc64000)
    libicui18n.so.56 => /usr/lib/libicui18n.so.56 (0x7f1a3c839000)
    libicuuc.so.56 => /usr/lib/libicuuc.so.56 (0x7f1a3c4cd000)
    libicudata.so.56 => /usr/lib/libicudata.so.56 (0x7f1a3aaea000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f1a3a79a000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f1a3a587000)
    libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x559e6abbb000)
    libexpat.so.1 => /usr/lib/libexpat.so.1 (0x7f1a3a367000)
    libpng16.so.16 => /usr/lib/libpng16.so.16 (0x7f1a3a13a000)
$ paxctl -v /usr/bin/phantomjs 
PaX control v0.9
Copyright 2004,2005,2006,2007,2009,2010,2011,2012,2014 PaX Team <[email protected]>

- PaX flags: -----m-x-e-- [/usr/bin/phantomjs]
    MPROTECT is disabled
    RANDEXEC is disabled
    EMUTRAMP is disabled
@svvac
Copy link
Author

svvac commented Jun 14, 2016

Duplicate of #14186
Will post my stuff there, sorry for the noise.

@svvac svvac closed this as completed Jun 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant