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

browser(webkit): rebase to 05/31/22 (r295073) #14556

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

dpino
Copy link
Contributor

@dpino dpino commented Jun 1, 2022

Rebase webkit/patches/bootstrap.diff to r295073. Changes:

About the linking error, after resolving the conflicts the build finished with a linking error. The output was:

[27/72] Linking CXX shared library lib/libTestRunnerInjectedBundle.so
FAILED: lib/libTestRunnerInjectedBundle.so
: && /usr/lib/ccache/c++ -fPIC -fdiagnostics-color=always -Wextra -Wall -pipe -Wno-expansion-to-defined -Wno-odr -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare  -fno-stric
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `thread_local_init':
thread_pthread.c:(.text+0x17): undefined reference to `pthread_key_create'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_MUTEX_init':
thread_pthread.c:(.text+0xfb): undefined reference to `pthread_rwlock_init'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_MUTEX_lock_read':
thread_pthread.c:(.text+0x119): undefined reference to `pthread_rwlock_rdlock'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_MUTEX_lock_write':
thread_pthread.c:(.text+0x139): undefined reference to `pthread_rwlock_wrlock'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_MUTEX_unlock_read':
thread_pthread.c:(.text+0x159): undefined reference to `pthread_rwlock_unlock'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_MUTEX_unlock_write':
thread_pthread.c:(.text+0x179): undefined reference to `pthread_rwlock_unlock'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_STATIC_MUTEX_lock_read':
thread_pthread.c:(.text+0x1a9): undefined reference to `pthread_rwlock_rdlock'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_STATIC_MUTEX_lock_write':
thread_pthread.c:(.text+0x1c9): undefined reference to `pthread_rwlock_wrlock'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_STATIC_MUTEX_unlock_read':
thread_pthread.c:(.text+0x1e9): undefined reference to `pthread_rwlock_unlock'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_STATIC_MUTEX_unlock_write':
thread_pthread.c:(.text+0x209): undefined reference to `pthread_rwlock_unlock'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_once':
thread_pthread.c:(.text+0x229): undefined reference to `pthread_once'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_get_thread_local':
thread_pthread.c:(.text+0x256): undefined reference to `pthread_once'
/usr/bin/ld: thread_pthread.c:(.text+0x273): undefined reference to `pthread_getspecific'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_set_thread_local':
thread_pthread.c:(.text+0x2b4): undefined reference to `pthread_once'
/usr/bin/ld: thread_pthread.c:(.text+0x2e7): undefined reference to `pthread_getspecific'
/usr/bin/ld: thread_pthread.c:(.text+0x357): undefined reference to `pthread_setspecific'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/third_party/boringssl/src/crypto/thread_pthread.c.o: in function `CRYPTO_MUTEX_cleanup':
thread_pthread.c:(.text+0x195): undefined reference to `pthread_rwlock_destroy'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/webrtc/rtc_base/logging.cc.o: in function `rtc::LogMessage::SetLogOutput(rtc::LoggingSeverity, void (*)(rtc::LoggingSeverity, char const*))':
logging.cc:(.text+0x101): undefined reference to `pthread_mutexattr_init'
/usr/bin/ld: logging.cc:(.text+0x118): undefined reference to `pthread_mutexattr_destroy'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/webrtc/rtc_base/logging.cc.o: in function `rtc::LogMessage::LogToDebug(rtc::LoggingSeverity)':
logging.cc:(.text+0x2e9): undefined reference to `pthread_mutexattr_init'
/usr/bin/ld: logging.cc:(.text+0x300): undefined reference to `pthread_mutexattr_destroy'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/webrtc/rtc_base/logging.cc.o: in function `rtc::LogMessage::GetLogToStream(rtc::LogSink*)':
logging.cc:(.text+0x40d): undefined reference to `pthread_mutexattr_init'
/usr/bin/ld: logging.cc:(.text+0x424): undefined reference to `pthread_mutexattr_destroy'
/usr/bin/ld: lib/../Source/ThirdParty/libwebrtc/CMakeFiles/webrtc.dir/Source/webrtc/rtc_base/logging.cc.o: in function `rtc::LogMessage::AddLogToStream(rtc::LogSink*, rtc::LoggingSeverity)':
logging.cc:(.text+0x51d): undefined reference to `pthread_mutexattr_init'
...

So basically this was a linking error due to missing linkage to pthread from libraries webrtc and boringssl. I inspected several commits and found out the linking error started happening since this commit https://bugs.webkit.org/show_bug.cgi?id=240755

This patch fixed a linking error in non-unified builds. The patch reintroduced a CMake setting that had created some problems in the past (there's a lof of discussion in the bug ticket about whether to enable this setting or not). The setting is set(WebCore_LIBRARY_TYPE OBJECT). My understanding is that this change makes WebCore be built as dynamic library instead of statically.

I didn't manage to reproduce this linking error upstream.

To solve the linking error I enforced linking to pthread. Probably this is not the right fix and there's a better way to fix it than introducing a change in Options{GTK,WPE}.cmake.

About the tests, I got the following failures:

[webkit] › library/browsercontext-locale.spec.ts:31:1 › should affect navigator.language =======
[webkit] › library/browsercontext-locale.spec.ts:89:1 › should affect navigator.language in popups 
[webkit] › library/browsercontext-locale.spec.ts:141:1 › should not change default locale in another context 
[webkit] › library/defaultbrowsercontext-2.spec.ts:60:1 › should support locale option =========

These tests have been failing since #1649. They started failing due to fast/text/international/system-language/navigator-language/navigator-language-fr.html is a flaky failure. It seems to me these tests need to get their expectations updated after that change.

[webkit] › library/modernizr.spec.ts:32:1 › safari-14-1 ========================================
[webkit] › library/modernizr.spec.ts:74:1 › mobile-safari-14-1 =================================

Likely a regression introduced by Stop exposing ApplicationCache API if it is not enabled. Probably can be fixed by updating expectations or enabling this setting.

Copy link
Member

@yury-s yury-s left a comment

Choose a reason for hiding this comment

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

Are you planning to upstream the linker fixes (in its current form or an alternative approach) ?

@yury-s yury-s merged commit 9ea89d5 into microsoft:main Jun 1, 2022
@dpino
Copy link
Contributor Author

dpino commented Jun 1, 2022

If I managed to reproduce the error upstream, that would help to land it. In any case, I plan to discuss the error with other team members to get their feedback.

@dpino dpino deleted the rebase-to-05/31/22-r295073 branch September 9, 2022 09:44
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