Open sgammon opened 4 years ago
@oschaaf any ideas? i want to begin examining integration of the new Envoy code! :) perhaps i can provide an early test case.
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.
(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
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.
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.
@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?
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.
These things would need to be discussed broader first, but I thought it would be good to mention them here
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.
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
)