acachy commented on issue #2069:
URL:
https://github.com/apache/incubator-pagespeed-mod/issues/2069#issuecomment-971253138
@eilandert
0. I use your bazel-build command, but extra includes in
pagespeed-ngx/config looks like still necessary
1. Bazel-build with "-c opt" creates more libraries
I didn't go deep. Got error on symbols renaming about duplicates. But
probably it might be because of next point.
2. My bazel-merge.sh had to be fixed against eating pagespeed_automatic.a or
it became constantly growing with each build by including itself
3. I had your error about _uidna_openUTS46_66_ but other suspicions ate time
"find+grep" shows that it's related to libicu-lib
There should be bazel-way to include... And maybe this alternative way would
bring problems.
But don't care at the moment
Just add system's package libs to merge_libraries.sh call in bazel-merge.sh
/usr/lib/x86_64-linux-gnu/libicuuc.a
/usr/lib/x86_64-linux-gnu/libicudata.a
```
#!/bin/bash
ADIR=$(bazel info bazel-bin)
ALIST=$(find $ADIR | grep \\.a$ | grep -v main | grep -v copy | grep -v
envoy | grep -v /pagespeed_automatic\\.a | xargs echo)
for item in ${ALIST[*]}
do
echo $item
done
#find $ADIR | grep \\.a$ | grep -v main | grep -v copy
set -e
echo "merging libs"
bash ./merge_libraries.sh ~/pagespeed_automatic.a.dirty $ALIST
/usr/lib/x86_64-linux-gnu/libicuuc.a /usr/lib/x86_64-linux-gnu/libicudata.a >
merge.log
echo "renaming symbols"
# XXX(oschaaf): objcopy 2.31 doesn't like clang-7's output unless we pass in
-fno-addrsig
# https://github.com/travitch/whole-program-llvm/issues/75
# not passing this in will make the scripts that rename symbols fail
./rename_c_symbols.sh ~/pagespeed_automatic.a.dirty ~/pagespeed_automatic.a
> symbol-rename.log
rm ~/pagespeed_automatic.a.dirty
cp ~/pagespeed_automatic.a
./../../bazel-out/k8-fastbuild/bin/pagespeed/automatic/
mv ~/pagespeed_automatic.a ./
echo "done"
```
4. Then we get "opendl" error - it is fixed in "pagespeed-ngx/config"
```
pagespeed_libs="-lstdc++"
->
pagespeed_libs="-lstdc++ -ldl"
```
5. Now configure is succussful
6. Haha. Make-stage shows a lot of lost files
They may be fixed with more extra includes (maybe good way is in some other
place for includes)
```
pagespeed_include="\
$mod_pagespeed_dir \
$mod_pagespeed_dir/pagespeed/kernel \
$mod_pagespeed_dir/bazel-out/../../../external/com_google_absl \
$ngx_addon_dir/testing-dependencies/mod_pagespeed/third_party/chromium/src
\
$mod_pagespeed_dir/third_party/chromium/src \
$mod_pagespeed_dir/third_party/google-sparsehash/src/src \
$mod_pagespeed_dir/third_party/google-sparsehash/gen/arch/$os_name/$arch_name/include
\
$mod_pagespeed_dir/third_party/grpc/src/include \
$mod_pagespeed_dir/third_party/protobuf/src/src \
$mod_pagespeed_dir/third_party/re2/src \
$mod_pagespeed_dir/out/$buildtype/obj/gen \
$mod_pagespeed_dir/out/$buildtype/obj/gen/protoc_out/instaweb \
$mod_pagespeed_dir/third_party/apr/src/include \
$mod_pagespeed_dir/third_party/aprutil/src/include \
$mod_pagespeed_dir/third_party/apr/gen/arch/$os_name/$arch_name/include \
$mod_pagespeed_dir/third_party/aprutil/gen/arch/$os_name/$arch_name/include \
$mod_pagespeed_dir/url \
$mod_pagespeed_dir/bazel-bin/external/glog/_virtual_includes/default_glog_headers
\
$mod_pagespeed_dir/bazel-out/k8-fastbuild/bin/external/com_github_gflags_gflags/_virtual_includes/gflags
\
$mod_pagespeed_dir/bazel-out/k8-fastbuild/bin/external/google_sparsehash/_virtual_includes/google_sparsehash
\
$mod_pagespeed_dir/bazel-incubator-pagespeed-mod \
$mod_pagespeed_dir/bazel-incubator-pagespeed-mod/external/com_google_protobuf/src
\
$mod_pagespeed_dir/bazel-incubator-pagespeed-mod/external/re2 \
$mod_pagespeed_dir/bazel-bin \
$mod_pagespeed_dir/bazel-incubator-pagespeed-mod/external/com_github_grpc_grpc/include
\
$mod_pagespeed_dir/bazel-incubator-pagespeed-mod/external/apr/include \
$mod_pagespeed_dir/bazel-incubator-pagespeed-mod/external/aprutil/include"
```
7. Then new funny things appear like
```
/ngx/incubator-pagespeed-ngx/src/ngx_pagespeed.cc: In function ‘char*
net_instaweb::{anonymous}::ps_init_dir(const StringPiece&, const StringPiece&,
ngx_conf_t*)’:
/ngx/incubator-pagespeed-ngx/src/ngx_pagespeed.cc:780:33: error: ‘StrCat’ is
not a member of ‘net_instaweb’
780 | cf->pool, net_instaweb::StrCat(directive, " ", path,
```
```
/ngx/incubator-pagespeed-ngx/src/log_message_handler.cc:54:19: error:
‘LOG_ERROR_REPORT’ is not a member of ‘logging’
54 | case logging::LOG_ERROR_REPORT:
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]