-
Notifications
You must be signed in to change notification settings - Fork 361
Building on newer glibc (eg. Ubuntu 21.10 and above) #1743
Comments
Hello eilandert, I don't see this files in folder structure which you have mentioned - I do have incubator-pagespees-ngx-latest-stable/psol/third_party/apr/src but no threadproc and locks. There are only the following folders: include, random, test and none of them seems to include the files you mentioned. The only one I have found is: |
Hello @nemihome, try the latest master, recursive. additionally, I uploaded precompiled psol binaries here: http://www.tiredofit.nl/psol-jammy.tar.xz and additionally, I'm offering debian and ubuntu packages (including jammy) here: https://deb.myguard.nl/nginx-modules/ |
Hello @eilandert, thank you. I tried your repository. Well Nginx is working with pagespeed but that changes half of the ubuntu 22.04 software to non standard. I don't like that much because if there are problems showing up like e.g. "Note that the deactivation of "ssh-rsa" signatures does not necessarily There is always the question if this is resulting from changes like + openssl3 + other changes or standard (yeah, i have noticed later that openssl3 is a separate package). If something is not working I am not shure if this is standard or special because of all the listed package changes which are mentioned your homepage. That's the opposite idea of using a LTS version in my opinion. That's more like a rolling release. Is there a way to get only the nginx part of your packages automatically? All this updates are not on my list of things I would like to have (I really would prefer just nginx in the package): The following packages will be upgraded:
So I ended up with a lot more updates which I don't want with the full auto install package via apt:
And there are further effects which may be a result of this particular updates not planned in 22.04: I have done the following steps for now (folder /home/admin). . Optional parts = italic (only needed for geopip2 module) Maybe folder name have to be adapted to ngx_http_geoip2_module or just change the folder name below in options part of nginx. I used the standard script:
After PSOL is downloaded and extracted (there are stop points and several steps in this script). I have replaced the incubator-pagespeed-ngx-latest-stable/psol folder by your jammy-psol/psol folder version folder and compiled nginx with the following options:
That seems to be working so far. |
Hi, Thanks for your feedback. I am happy that my jammy-psol works for you and probably others |
My way of resolving this was to patch Pagespeed, compile it on the working version of glibc, and package the result as a debian package. I have automated the process here: https://github.com/knyzorg/nginx-pagespeed And host the resulting debian files both in the repo and on my personal server for public use. |
any hope for quic https://blog.cloudflare.com/experiment-with-http-3-using-nginx-and-quiche/ ? |
@knyzorg I have tried that. This is working for me. Thanks. I have tried to compile nginx in latest version (1.23.0) and I'm running into a new error. But I think this is more a general topic than pagespeed related but I'm not shure about that (I could reproduce that error on two ubuntu 22.04 systems): `/home/admin/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc /home/admin/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc:444:59: error: request for member ‘nelts’ in ‘r->ngx_http_request_s::headers_out.ngx_http_headers_out_t::cache_control’, which is of pointer type ‘ngx_table_elt_t*’ {aka ‘ngx_table_elt_s*’} (maybe you meant to use ‘->’ ?) Fount some similar error mssage here but in another module. |
On Debian11 I succeeded with 1.22.0 version: Sadly, 1.23.1 end up with the errors that you posted above. |
I've just tested 1.22.0 under Ubuntu 22.04.1 using @eilandert's PSOL, and it seemed to work well. I do have a few other plugins as well besides PageSpeed, but the compilation finished without any issue, and I haven't tested 1.23.1 yet (since @myvesta reported having problems with it...) but I might give it a try! |
Whew. After much sweating, I managed to get this working under 1.23.1 as well, under Ubuntu 22.04.1 LTS (jammy), together with all my other plugins. Now it's time to do some testing :-) |
Did all go well? ;-) |
I am 22.04.1 And just try 1.23.1 and it results some error like ngx_table_elt_t** {aka ngx_table_elt_s**} make[1]: *** [objs/Makefile:1493: objs/addon/src/ngx_pagespeed.o] Error 1 May I know how can you fix it? Many thanks. |
For 1.22.0 how can you make it work? I got the error as below /usr/bin/ld: /root/incubator-pagespeed-ngx-latest-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.thread.o.o): in function |
I cooked some build instructions in #1760 |
@eilandert: it went remarkably well, thanks for your 'special' compilation! @mactrash: In the meantime, I've focused on 1.23.1 and left 1.22.X (because, well, it had some issues with newer versions of other, non-PageSpeed-related modules that I needed). Are you sure you have used @eilandert's PSOL compilation? I'm just asking since you get the error precisely while linking with the PSOL libraries. On the other hand, the error you got is related to the So...
I'll be posting some additional compilation instructions for those bold enough to try Note, however, that my own compilation is (obviously!) pretty much built upon @eilandert's instructions, and it wouldn't have worked without his PSOL compilation; the rest is mostly a few more hacks to get HTTP/3 support without breaking PageSpeed. |
@GwynethLlewelyn the pthread_yield error is directly linked to glibc, in my first post I changed HAVE_PTHREAD_YIELD from 1 to 0 when compiling the PSOL library, I remember clearly it did not work with PTHREAD_YIELD enabled. I haven't had the time to check HTTP/3 support, I am still waiting for it to appear in NGINX Mainline ;-) But even then it will probably not work with standard OpenSSL3.0, so I need to package https://github.com/quictls/openssl/ or use BoringSSL (which also doesn't have package afaik) and didn't want to go there yet ;-) So I am curious for your build instructions for HTTP/3 ;-) (especially the parts of not breaking pagespeed) |
I'm wondering what hacks do you need to get HTTP/3 support in pagespeed? Do I need them too? I have a full HTTP/3 build with NGINX-quic and OpenSSL3/quic running on production now and I have not encountered any issues so far. It's in beta/testing phase, but as said, I'm running in production now without problems |
Please note that PSOL built on Ubuntu 20.04 (Focal) and earlier will not work on systems with newer glibc (for example ubuntu Impish and upcoming Ubuntu LTS Jammy.
It's fixable with:
sed -i -r 's/sys_siglist[signum]/strsignal(signum)/g' third_party/apr/src/threadproc/unix/signals.c
sed -i s/"pthread_mutex_consistent_np"/"pthread_mutex_consistent"/g third_party/apr/src/locks/unix/proc_mutex.c
sed -i s/"define HAVE_PTHREAD_YIELD 1"/"define HAVE_PTHREAD_YIELD 0"/g third_party/apr/gen/arch/linux/x64/include/apr_private.h
But if you do that I doubt it will compile and/or work on systems with older glibc.
Just a heads up
The text was updated successfully, but these errors were encountered: