You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2021/10/18 16:32:53 UTC
[GitHub] [incubator-pagespeed-mod] eilandert opened a new issue #2084: bazel build
eilandert opened a new issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084
@oschaaf or whoever knows how to do this ... :-)
First, when I build with bazel I need to add #include <cstdarg> to pagespeed/kernel/base/string.h or else bazel build will fail.
When I build with bazel I get a pagespeed_automatic.a which is 3mb big and not recognized by nginx configure. Is this size normal?
I tried a lot of things, I ended up with the following:
```
cd /usr/src/master
bazel build -c opt //pagespeed/automatic:automatic
cd /usr/src/master/pagespeed/automatic
ADIR="/usr/src/master/bazel-bin"
ALIST=$(find -L $ADIR -name "*.a" | grep -v main | grep -v copy | sed -e s/"^\."/"\/root"/g | xargs echo)
echo "merging libs"
./merge_libraries.sh ~/pagespeed_automatic.a.dirty $ALIST > merge.log
./rename_c_symbols.sh ~/pagespeed_automatic.a.dirty ~/pagespeed_automatic.a > symbol-rename.log
cd /usr/src/master
mkdir -p psol/include
if [ "$(uname -m)" = x86_64 ]; then
bit_size_name=x64
else
bit_size_name=ia32
fi
bindir="psol/lib/Release/linux/$bit_size_name"
mkdir -p "$bindir"
echo Copying files to psol directory...
cp -f ~/pagespeed_automatic.a $bindir/
rsync -arz "." "psol/include/" --prune-empty-dirs \
--exclude=".svn" \
--exclude=".git" \
--include='*.h' \
--include='*/' \
--include="apr_thread_compatible_pool.cc" \
--include="serf_url_async_fetcher.cc" \
--include="apr_mem_cache.cc" \
--include="key_value_codec.cc" \
--include="apr_memcache2.c" \
--include="loopback_route_fetcher.cc" \
--include="add_headers_fetcher.cc" \
--include="console_css_out.cc" \
--include="console_out.cc" \
--include="dense_hash_map" \
--include="dense_hash_set" \
--include="sparse_hash_map" \
--include="sparse_hash_set" \
--include="sparsetable" \
--include="mod_pagespeed_console_out.cc" \
--include="mod_pagespeed_console_css_out.cc" \
--include="mod_pagespeed_console_html_out.cc" \
--exclude='*'
cd /usr/src/master
tar czf /usr/src/psol.tar.gz psol
```
Any idea's or pointers?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-pagespeed-mod] eilandert edited a comment on issue #2084: bazel build / psol
Posted by GitBox <gi...@apache.org>.
eilandert edited a comment on issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084#issuecomment-946102223
@oschaaf
Does that mean we are doomed to use the latest-stable tag?
I am trying to cook some things up with docker ( https://github.com/eilandert/psol-bazel ) but right now I get some 403 errors on some bazel stuff so I have to delay my attempts...
And yes, if I can build this I will try to use it with nginx/ngx_pagespeed ;-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-pagespeed-mod] eilandert commented on issue #2084: bazel build / psol
Posted by GitBox <gi...@apache.org>.
eilandert commented on issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084#issuecomment-947104837
I am stuck now at
`src/incubator-pagespeed-ngx/psol/include/base/logging.h:22:10: fatal error: glog/logging.h: No such file or directory`
Will investigate later
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-pagespeed-mod] eilandert edited a comment on issue #2084: bazel build / psol
Posted by GitBox <gi...@apache.org>.
eilandert edited a comment on issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084#issuecomment-946012731
> What do you need to add that `#include` into?
>
> pagespeed_automatic.a is an intermediate library which can be used to build the Apache or nginx versions.
Sorry, there was a part github was not showing. updated my post. I need to add `#include <cstdarg>` in pagespeed/kernel/base/string.h or I get build errors about va_copy
My goal is to build a working PSOL from the master tree with bazel
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-pagespeed-mod] oschaaf commented on issue #2084: bazel build / psol
Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084#issuecomment-946051372
I don't think I ever really got to producing/testing a standalone `pagespeed_automatic.a`.
Checking I did find this script, but unfortunately I left no context or notes:
https://github.com/apache/incubator-pagespeed-mod/blob/master/pagespeed/automatic/bazel_merge.sh
At a glance this script doesn't seem to be that different from what you are doing above (in fact it does less it seems) .. so I am pessimistic that it will produce a better `pagespeed_automatic.a`.
I do remember that at the time I was hoping for an a NGINX version that would support bazel builds. Because then
we could probably add that and this repo as native dependencies in ngx_pagespeed. https://github.com/S8Cloud/nginx-bazel is an example of that but it seems the effort stalled and it no longer gets any updates.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-pagespeed-mod] jmarantz commented on issue #2084: bazel build / psol
Posted by GitBox <gi...@apache.org>.
jmarantz commented on issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084#issuecomment-945991794
What do you need to add that `#include` into?
pagespeed_automatic.a is an intermediate library which can be used to build the Apache or nginx versions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-pagespeed-mod] oschaaf commented on issue #2084: bazel build / psol
Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084#issuecomment-946111536
I wouldn't say doomed.. but it will require some effort to get ngx_pagespeed to work with the bleeding edge / bazel build system. The path of least resistance is probably producing a working `pagespeed_automatic.a` plus a set of headers, like you are currently attempting.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-pagespeed-mod] Lofesa commented on issue #2084: bazel build / psol
Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084#issuecomment-947378009
@eilandert
Maybe is the same issue related here:
https://github.com/apache/incubator-pagespeed-mod/issues/2069#issuecomment-858151770
"File "base/logging.h" contains "include glog/logging.h"
I had error about "glog" until I've added path to "glog/logging.h" to list of "include"-paths for CC-command in ngx/config:$pagespeed_include"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-pagespeed-mod] eilandert commented on issue #2084: bazel build / psol
Posted by GitBox <gi...@apache.org>.
eilandert commented on issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084#issuecomment-946102223
@oschaaf
Does that mean we are doomed to use the latest-stable tag?
I am trying to cook some things up with docker ( https://github.com/eilandert/psol-bazel ) but right now I get some 403 errors on some bazel stuff so I have to delay my attempts...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-pagespeed-mod] eilandert commented on issue #2084: bazel build / psol
Posted by GitBox <gi...@apache.org>.
eilandert commented on issue #2084:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2084#issuecomment-946012731
> What do you need to add that `#include` into?
>
> pagespeed_automatic.a is an intermediate library which can be used to build the Apache or nginx versions.
Sorry, there was a part github was not showing. updated my post. I need to add `#include <cstdarg>` in pagespeed/kernel/base/string.h or I get build errors about va_copy
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org