Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various win32 compile issues #9915

Merged
merged 5 commits into from
Feb 4, 2020
Merged

Fix various win32 compile issues #9915

merged 5 commits into from
Feb 4, 2020

Conversation

wrowe
Copy link
Contributor

@wrowe wrowe commented Feb 3, 2020

Description:

Address recent breakage and a few easily reviewed long-standing open win32 issues.

Note specifically that the first commit to foreign_cc BoringSSL build addresses the fact that its own bazel build doesn't respect our choice to build a static library. The patch deserve additions and further adjustment, but resolves #8754 which could not be reopened due to my force push.

Risk Level: low
Testing: local on windows msvc, linux gcc
Docs Changes: n/a
Release Notes: n/a

wrowe added 4 commits February 3, 2020 10:19
In libevent 2.2 dev, libevent is sliced into base, _core and _extra
libraries. libevent_pthreads on gcc exhibits a dependency on the
libevent_core lib. The resulting error prior to this patch is;

ERROR: /home/pivotal/workspace/envoy/test/common/http/BUILD:109:1:
Linking of rule '//test/common/http:codes_speed_test' failed (Exit 1)
gcc failed: error executing command /usr/bin/gcc
@bazel-out/k8-fastbuild/bin/test/common/http/codes_speed_test-2.params
bazel/foreign_cc/event/lib/libevent_pthreads.a(evthread_pthread.c.o):evthread_pthread.c:function
evthread_posix_lock_alloc: error: undefined reference to 'event_mm_malloc_'
bazel/foreign_cc/event/lib/libevent_pthreads.a(evthread_pthread.c.o):evthread_pthread.c:function
evthread_posix_lock_alloc: error: undefined reference to 'event_mm_free_'
bazel/foreign_cc/event/lib/libevent_pthreads.a(evthread_pthread.c.o):evthread_pthread.c:function
evthread_posix_lock_free: error: undefined reference to 'event_mm_free_'
bazel/foreign_cc/event/lib/libevent_pthreads.a(evthread_pthread.c.o):evthread_pthread.c:function
evthread_posix_cond_alloc: error: undefined reference to 'event_mm_malloc_'
bazel/foreign_cc/event/lib/libevent_pthreads.a(evthread_pthread.c.o):evthread_pthread.c:function
evthread_posix_cond_alloc: error: undefined reference to 'event_mm_free_'
bazel/foreign_cc/event/lib/libevent_pthreads.a(evthread_pthread.c.o):evthread_pthread.c:function
evthread_posix_cond_free: error: undefined reference to 'event_mm_free_'
bazel/foreign_cc/event/lib/libevent_pthreads.a(evthread_pthread.c.o):evthread_pthread.c:function
evthread_use_pthreads: error: undefined reference to 'evthread_set_lock_callbacks'
bazel/foreign_cc/event/lib/libevent_pthreads.a(evthread_pthread.c.o):evthread_pthread.c:function
evthread_use_pthreads: error: undefined reference to 'evthread_set_condition_callbacks'
bazel/foreign_cc/event/lib/libevent_pthreads.a(evthread_pthread.c.o):evthread_pthread.c:function
evthread_use_pthreads: error: undefined reference to 'evthread_set_id_callback'
collect2: error: ld returned 1 exit status

On Windows, including event_extra.lib was excessive/unnecessary.

Signed-off-by: Sunjay Bhatia <[email protected]>
Signed-off-by: William A Rowe Jr <[email protected]>
Adjust 6799eec
to behave on windows (.begin() returns an iterator, we need the uint8[] bytestream from .data())

Also correct the spelling to generateHashForSessionContextId

Signed-off-by: Sunjay Bhatia <[email protected]>
Signed-off-by: William A Rowe Jr <[email protected]>
As commented, a previously valid directory symlink acts very
differently between the linux and win32 filesystems.

Signed-off-by: Sunjay Bhatia <[email protected]>
Signed-off-by: William A Rowe Jr <[email protected]>
On Windows we need to cooerce this value to 64 bits.

Signed-off-by: Sunjay Bhatia <[email protected]>
Signed-off-by: William A Rowe Jr <[email protected]>
@wrowe wrowe requested a review from lizan as a code owner February 3, 2020 18:28
Signed-off-by: Sunjay Bhatia <[email protected]>
Signed-off-by: William A Rowe Jr <[email protected]>
@mattklein123 mattklein123 self-assigned this Feb 3, 2020
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mattklein123 mattklein123 merged commit 7fe8b23 into envoyproxy:master Feb 4, 2020
@wrowe wrowe deleted the fix-compile-breakage branch February 25, 2020 15:12
@sunjayBhatia sunjayBhatia mentioned this pull request Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants