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

Project error #5

Open
nabad600 opened this issue Jul 25, 2020 · 13 comments
Open

Project error #5

nabad600 opened this issue Jul 25, 2020 · 13 comments

Comments

@nabad600
Copy link

Hi,
Thanks for your project but error showing
./configure: error: no /tmp/ngx_pagespeed-1.11.33.4-beta/config was found

@wernight
Copy link
Owner

I admit I should update it, it's just very painful to maintain this one.

@oschaaf
Copy link

oschaaf commented Jul 29, 2020

@wernight there's also https://github.com/apache/incubator-pagespeed-ngx/tree/master/docker
On mod_pagespeed's master, we've ported the build to use bazel instead of gyp and lean more on absl/Envoy. That actually
might make life easier (but I'd have to try and see if that holds).
Also, 1.14 was released as a first apache incubator release. (not announced yet).

@oschaaf
Copy link

oschaaf commented Jul 29, 2020

(For master, I suspect taking https://hub.docker.com/r/envoyproxy/envoy-alpine as a base could be convenient)

@oschaaf
Copy link

oschaaf commented Jul 29, 2020

FWIW, there's no one with proper docker knowledge/experience involved in maintaining the apache ones,
and help is surely welcome there :-)

@wernight
Copy link
Owner

wernight commented Jul 29, 2020

(For master, I suspect taking https://hub.docker.com/r/envoyproxy/envoy-alpine as a base could be convenient)

I'm really reluctant to use a base image that is not an official OS of Docker Hub and that doesn't even show its sources, for a web server. That's a clear no no.

The Dockerfile you pointed out is useful, however it's 2 years old. After trying a bit, the main issue is that the documentation regarding how to build manually fails with weird errors on Alpine. It says that it cannot find PSOL. The real reason which is hidden is that ld cannot find many musl dependencies (basically LIBC which Alpine doesn't have).

Falling back to building PSOL is badly documented and relying on so many things it should not: bash, lsb_release... Just cloning from git.apache.org is so slow that it often times out which worries me for building this even if I manage to write a Dockerfile.

On https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source (which I cannot edit), I'd suggest to replace for example:

wget ${psol_url}
tar -xzvf $(basename ${psol_url})  # extracts to psol/

by

wget -O- ${psol_url} | tar -xzv  # extracts to psol/

Much easier to read and execute.

@oschaaf
Copy link

oschaaf commented Jul 29, 2020

I can add that, but it's also possible to propose it over at:
https://github.com/apache/incubator-pagespeed-mod/tree/master/html
(modpagespeed.com mirrors that)

@oschaaf
Copy link

oschaaf commented Jul 29, 2020

Regarding Envoy's docker images, I think they are available via https://github.com/envoyproxy/envoy/tree/master/ci (the continuous integration pushes them). But I wasn't lying when I said I'm not expert here, so just pointing it out; if it's useful -- I'll leave that up to you :-)

@wernight
Copy link
Owner

wernight commented Jul 29, 2020

What if ngx_pagespeed as provided as an AppImage? I'm not sure but it might work on Alpine then without almost any work. AppImage/AppImageKit#1015

I'll update the dev branch with what I currently have.

Looks like PSOL uses fortied LIBC which isn't implemented on Alpine: https://stackoverflow.com/questions/55246192/musl-gcc-undefined-reference-to-memcpy-chk. Building PSOL says it cannot handle Alpine distro. So overall at the moment PSOL is giving me the most trouble.

For reference here is that basic Dockerfile:

FROM alpine:3.12

RUN set -x \
 && apk add ---no-cache -t .build-deps \
        g++ \
        libc6-compat \
        make \
        pcre-dev \
        util-linux-dev \
        zlib-dev \
    # Download PageSpeed (and PSOL).
 && wget -O- https://github.com/apache/incubator-pagespeed-ngx/archive/${PAGESPEED_VERSION}.tar.gz | tar -xzC /tmp \
 && mv /tmp/incubator-pagespeed-ngx-* /tmp/ngx_pagespeed \
 && cd $_ \
 && PSOL_BINARY_URL=$(sh scripts/format_binary_url.sh PSOL_BINARY_URL) \
 && wget -O- ${PSOL_BINARY_URL} | tar -xz \
    # Build Nginx with support for PageSpeed.
 && wget -O- http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz | tar -xzC /tmp \
 && cd /tmp/nginx-* \
 && ./configure --add-module=/tmp/ngx_pagespeed \
 && make install --silent

wernight added a commit that referenced this issue Jul 29, 2020
The main current issue is getting a working compiled PSOD:

 - Using precompile image require fortified LIBC which is not
   implemented on Alpine.
 - Compiling PSOD seems like a huge pain as git clone times out,
   and it has some platform specific build without Alpine support.

See also #5
wernight added a commit that referenced this issue Jul 29, 2020
The main current issue is getting a working compiled PSOL

 - Using precompile image require fortified LIBC which is not
   implemented on Alpine.
 - Compiling PSOD seems like a huge pain as git clone times out,
   and it has some platform specific build without Alpine support.

See also #5
@wernight
Copy link
Owner

One more issue regarding build PSOL: The latest release does not seem to have submodules defined: https://github.com/apache/incubator-pagespeed-ngx/blob/v1.13.35.2-stable/.gitmodules

So it looks like either need to guess a compatible PSOL, or build from latest snapshot. Neither are good options.

wernight added a commit that referenced this issue Jul 29, 2020
The main current issue is getting a working compiled PSOL

 - Using precompile image require fortified LIBC which is not
   implemented on Alpine.
 - Compiling PSOD seems like a huge pain as git clone times out,
   and it has some platform specific build without Alpine support.

See also #5
@wernight
Copy link
Owner

@oschaaf Once there is a release with PSOL source code, I'll try again to compile PSOL.

@oschaaf
Copy link

oschaaf commented Jul 31, 2020

Well, there's psol-1.14.36.1-apache-incubating-x64.tar.gz

@oschaaf
Copy link

oschaaf commented Jul 31, 2020

Sorry - that went out too early; I wanted to point to https://dist.apache.org/repos/dist/release/incubator/pagespeed/1.14.36.1/x64/

@wernight
Copy link
Owner

Thank you. Btw. I replied on apache/incubator-pagespeed-mod#2021

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