Skip to content

Fix build in nightlies #61

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

Open
wants to merge 1 commit into
base: haiku
Choose a base branch
from
Open

Conversation

lonemadmax
Copy link

I've been having a linking error and this solves it for me, though I don't know why it happens to me and not the builder, and whether this is a proper solution. The only difference I can think of is that I'm running nightly instead of beta.

[5738/5807] Linking CXX shared library lib/libWebKitLegacy.so.1.9.21
FAILED: lib/libWebKitLegacy.so.1.9.21 
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: lib/../Source/WebCore/PAL/pal/CMakeFiles/PAL.dir/text/TextEncodingDetectorICU.cpp.o: in function `PAL::detectTextEncoding(std::span<unsigned char const, 18446744073709551615ul>, WTF::ASCIILiteral, PAL::TextEncoding*)':
TextEncodingDetectorICU.cpp:(.text._ZN3PAL18detectTextEncodingESt4spanIKhLm18446744073709551615EEN3WTF12ASCIILiteralEPNS_12TextEncodingE+0xa8): undefined reference to `WTF::ucsdet_detectAll_span(UCharsetDetector*, UErrorCode*)'
collect2: error: ld returned 1 exit status

WTF::ucsdet_detectAll_span is in WTF/wtf/text/icu/UnicodeExtras, declared with WTF_EXPORT_PRIVATE and called from PAL::detectTextEncoding. The failing command references lib/libWTF.a before lib/libWTF.a, and moving it afterwards finishes the build.

@pulkomandy
Copy link
Member

I did not reproduce the build problem on my machine. Which linker do you use (ld or lld)? Is there ccache enabled or something else special?

@lonemadmax
Copy link
Author

I was using ld. Changed to lld and the build ends with no errors. 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants