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 2020/08/03 08:35:47 UTC

[GitHub] [incubator-pagespeed-mod] sgammon opened a new issue #2024: Build issues w/Bazel on macOS

sgammon opened a new issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024


   Hello esteemed Pagespeed authors,
   
   I am having trouble building the Envoy targets via Bazel on macOS. See below for the error. My (naive) guess would be a compiler difference between macOS and Linux, but any help or insight would be much appreciated.
   
   macOS Version: `10.15.6 (19G73)`
   Code revision: `master` at the time of filing (`82f7f34a2`)
   
   ```
   envoy/config/core/v3/proxy_protocol.proto: warning: Import validate/validate.proto but not used.
   envoy/config/core/v3/substitution_format_string.proto: warning: Import udpa/annotations/status.proto but not used.
   envoy/config/core/v3/substitution_format_string.proto: warning: Import validate/validate.proto but not used.
   INFO: From CcCmakeMakeRule external/envoy/bazel/foreign_cc/ares/include:
   
   ERROR: /Volumes/KICKSTART/incubator-pagespeed-mod/pagespeed/kernel/html/BUILD:16:11: C++ compilation of rule '//pagespeed/kernel/html:html' failed (Exit 1) wrapped_clang failed: error executing command external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 122 argument(s) skipped)
   
   Use --sandbox_debug to see verbose messages from the sandbox
   pagespeed/kernel/html/html_name.gperf:98:20: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   gperf_case_memcmp (register const char *s1, register const char *s2, register unsigned int n)
                      ^~~~~~~~~
   pagespeed/kernel/html/html_name.gperf:98:45: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   gperf_case_memcmp (register const char *s1, register const char *s2, register unsigned int n)
                                               ^~~~~~~~~
   pagespeed/kernel/html/html_name.gperf:98:70: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   gperf_case_memcmp (register const char *s1, register const char *s2, register unsigned int n)
                                                                        ^~~~~~~~~
   pagespeed/kernel/html/html_name.gperf:124:22: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   KeywordMapper::hash (register const char *str, register unsigned int len)
                        ^~~~~~~~~
   pagespeed/kernel/html/html_name.gperf:124:48: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   KeywordMapper::hash (register const char *str, register unsigned int len)
                                                  ^~~~~~~~~
   pagespeed/kernel/html/html_name.gperf:155:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
     register unsigned int hval = len;
     ^~~~~~~~~
   pagespeed/kernel/html/html_name.gperf:225:24: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   KeywordMapper::Lookup (register const char *str, register unsigned int len)
                          ^~~~~~~~~
   pagespeed/kernel/html/html_name.gperf:225:50: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   KeywordMapper::Lookup (register const char *str, register unsigned int len)
                                                    ^~~~~~~~~
   pagespeed/kernel/html/html_name.gperf:234:13: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
               register const char *s = kHtmlNameTable[key].name;
               ^~~~~~~~~
   9 errors generated.
   Target //pagespeed/envoy:envoy failed to build
   Use --verbose_failures to see the command lines of failed build steps.
   INFO: Elapsed time: 97.442s, Critical Path: 79.64s
   INFO: 1147 processes: 1147 darwin-sandbox.
   FAILED: Build did NOT complete successfully
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-mod] sgammon edited a comment on issue #2024: Build issues w/Bazel on macOS

Posted by GitBox <gi...@apache.org>.
sgammon edited a comment on issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024#issuecomment-668387402


   @oschaaf the flags you suggested got the build much further on my machine as well. however, i got stuck realizing there was only an `ia32` set of headers for the `third_party/{apr,aprutil}/gen` includes.
   
   is that something that can be generated for x64 on mac?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-mod] sgammon commented on issue #2024: Build issues w/Bazel on macOS

Posted by GitBox <gi...@apache.org>.
sgammon commented on issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024#issuecomment-668387402


   @oschaaf the flags you suggested got the build much further on my machine as well. however, i got stuck realizing there was only an `ia32` set of headers for the `gen/{apr,aprutil}` includes.
   
   is that something that can be generated for x64 on mac?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-mod] oschaaf commented on issue #2024: Build issues w/Bazel on macOS

Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024#issuecomment-668616577


   One more note on apr/aprutil/serf: it might be worth looking at what happened on branch 36 with respect to building these, as that had the old build system still going (gyp).
   For example https://github.com/apache/incubator-pagespeed-mod/blob/36/third_party/apr/apr.gyp
   has stuff like:
   ```
                 ['OS=="mac"', {
                   'defines': [
                     'HAVE_CONFIG_H',
                     'DARWIN',
                     'SIGPROCMASK_SETS_THREAD_MASK',
                   ]}],
   ```
   
   However, a word of warning there is warranted too: as far as I know, nobody was using OSX to build the project, so I really have no idea if this is correct and / or all of it.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-mod] oschaaf commented on issue #2024: Build issues w/Bazel on macOS

Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024#issuecomment-667923384


   fwiw, looking at the rest of the code, I suspect the issues above are actually all of it. Envoy itself builds fine on OSX, and modulo apr/apr-util/serf, the direct dependencies all seem to build OK.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-mod] sgammon commented on issue #2024: Build issues w/Bazel on macOS

Posted by GitBox <gi...@apache.org>.
sgammon commented on issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024#issuecomment-667889761


   @oschaaf any ideas? i want to begin examining integration of the new Envoy code! :) perhaps i can provide an early test case.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-mod] oschaaf commented on issue #2024: Build issues w/Bazel on macOS

Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024#issuecomment-667892727


   That would be awesome, but would it be possible to build on linux/ubuntu? I've been using 19.10 with clang-10. 
   I don't expect any fundamental blockers for OSX, but I think getting the build to work end to end there is going to take some trial and error.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-mod] oschaaf commented on issue #2024: Build issues w/Bazel on macOS

Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024#issuecomment-667905114


   (As I don't have powerful mac hardware, I anticipate iterations are going to take quite a while.. in this case it looks like building with something like `bazel build --cxxopt=-Wno-register //pagespeed/envoy/...`) might resolve; but I'm not sure what else we'll run into


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-mod] oschaaf commented on issue #2024: Build issues w/Bazel on macOS

Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024#issuecomment-667918796


   yeah, so I tried, and some of the `BUILD` files would have to be patched to ignore the `register` keyword usage in files generated by `gperf`. That resolves this particular build error, and things get quite far, but when we enter the build of `apr` and `aprutil`, things break again. I think this didn't work earlier too, but it should be fixable. There's also the `<sys/prctl.h>` which doesn't exist on OSX. All fixable, but I can't look into that right now as I have other priorities at the moment.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-mod] oschaaf commented on issue #2024: Build issues w/Bazel on macOS

Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #2024:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2024#issuecomment-668474989


   I think that those apr headers may actually be OK for osx/64bit, but that we need a different set of defines (-DXXX flags) in the build options to make them work. I haven't done that before, it would require some looking into to get it right. 
   Having said that -- while it would be nice to have -- if it's a lot of work to get this right, another option would be to just disable stuff that needs this for OSX (or in general). We need apr/aprutil for Serf (to fetch inputs over http(s)), and for the memcached client.
   
   - We might be able to depend on the PoC Envoy fetcher soon (which will bring asynchronous http1/http2/http3 fetching)
   - We'd need a replacement for the memcached client though to be able to drop the dependencies, but I think that's not too hard, and we may be able to offer a good alternative based on plain http caching as a stock option.
   
   These things would need to be discussed broader first, but I thought it would be good to mention them here
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org