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

2.22.7 build failure report #27

Open
yeled opened this issue Mar 17, 2019 · 14 comments
Open

2.22.7 build failure report #27

yeled opened this issue Mar 17, 2019 · 14 comments

Comments

@yeled
Copy link
Member

yeled commented Mar 17, 2019

Installing webkitgtk (https://webkitgtk.org/releases/webkitgtk-2.22.7.tar.xz) failed for me in ninja install. See my log ~/Library/Logs/Homebrew/webkitgtk/02.ninja.

Thanks for doing this!

Originally posted by @cstork in #26 (comment)

@yeled
Copy link
Member Author

yeled commented Mar 17, 2019

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

🤔 This sounds familiar but I can't quite place it @cstork

@gauteh
Copy link
Member

gauteh commented Mar 17, 2019

Looking at:

[1213/2516] Linking CXX executable bin/WebKitWebDriver
FAILED: bin/WebKitWebDriver 
: && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++  -fdiagnostics-color=always -fcolor-diagnostics -Wno-parentheses-equality -Wno-noexcept-type -Qunused-arguments -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wextra -Wall  -fno-strict-aliasing -fno-exceptions -fno-rtti -std=c++14 -O2 -g -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names  Source/WebDriver/CMakeFiles/WebDriver.dir/CommandResult.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/HTTPServer.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/Session.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/SessionHost.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/WebDriverMain.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/WebDriverService.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/__/__/DerivedSources/WebDriver/WebDriverAtoms.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/glib/SessionHostGlib.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/glib/WebDriverServiceGLib.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/gtk/WebDriverServiceGtk.cpp.o Source/WebDriver/CMakeFiles/WebDriver.dir/soup/HTTPServerSoup.cpp.o  -o bin/WebKitWebDriver  lib/libWTFGTK.a /usr/local/lib/libsoup-2.4.dylib /usr/local/opt/icu4c/lib/libicudata.dylib /usr/local/opt/icu4c/lib/libicui18n.dylib /usr/local/opt/icu4c/lib/libicuuc.dylib /usr/local/lib/libgio-2.0.dylib /usr/local/lib/libgobject-2.0.dylib /usr/local/lib/libglib-2.0.dylib /usr/lib/libz.dylib && :
ld: warning: ignoring file lib/libWTFGTK.a, file was built for unsupported file format ( 0x21 0x3C 0x74 0x68 0x69 0x6E 0x3E 0x0A 0x2F 0x20 0x20 0x20 0x20 0x20 0x20 0x20 ) which is not the architecture being linked (x86_64): lib/libWTFGTK.a
Undefined symbols for architecture x86_64:
  "_WTFLogAlways", referenced from:
      WebDriver::dbusConnectionCallAsyncReadyCallback(_GObject*, _GAsyncResult*, void*) in SessionHostGlib.cpp.o
      WebDriver::HTTPServer::listen(std::optional<WTF::String> const&, unsigned int) in HTTPServerSoup.cpp.o
  "WTF::StringImpl::s_atomicEmptyString", referenced from:

looks like you have a custom clang++? Maybe try the system one?

@cstork
Copy link

cstork commented Mar 17, 2019

No custom clang++ – at least to my knowledge. Certainly no LLVM installation by homebrew. I think this is a standard shim, but I couldn't find any detailed documentation/explanation of it.

However, I'm still on High Sierra and Homebrew/brew#5153 together with Homebrew/homebrew-core#28817 makes me suspect that my problem might disappear after the upgrade. Although, that will have to wait a few days since I want to finish up a larger project first.

@gauteh
Copy link
Member

gauteh commented Mar 17, 2019

Hm, ok, hopefully that solves it.

@gauteh
Copy link
Member

gauteh commented Mar 30, 2019

I´ve decided to try if I can get something useful working with vagrant. Would be nice to avoid virtualization, but wrestling with webkitgtk on mac is too energy consuming at the moment.

@gauteh
Copy link
Member

gauteh commented Apr 7, 2019

You can try to use vagrant on mac, use vagrant ssh -- -X from a terminal opened in XQuartz to get astroid running. Hooking up with your config and mail store is left for someone else to try ;)

@cstork
Copy link

cstork commented Apr 7, 2019

Thanks @gauteh for the vagrant tip. Before I try this here an update after upgrading my system to macOS 10.14.4.

Sadly, it still fails in ninja install. However, this time it's a different error:

In file included from ../Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28:
In file included from ../Source/JavaScriptCore/bytecode/ArrayProfile.h:29:
In file included from ../Source/JavaScriptCore/runtime/Structure.h:28:
In file included from ../Source/JavaScriptCore/runtime/ClassInfo.h:25:
In file included from ../Source/JavaScriptCore/interpreter/CallFrame.h:30:
In file included from ../Source/JavaScriptCore/runtime/VM.h:40:
In file included from ../Source/JavaScriptCore/runtime/FunctionHasExecutedCache.h:29:
In file included from DerivedSources/ForwardingHeaders/wtf/StdUnorderedMap.h:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/unordered_map:385:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__node_handle:16:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/optional:171:70: error: redefinition of 'bad_optional_access'
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
                                                                     ^
DerivedSources/ForwardingHeaders/wtf/Optional.h:281:7: note: previous definition is here
class bad_optional_access : public std::logic_error {
      ^
1 error generated.

See ~/Library/Logs/Homebrew/webkitgtk/02.ninja for details. :-/

@gauteh
Copy link
Member

gauteh commented Apr 7, 2019

When I managed to compile webkit last time I was not able to get it to render properly, did not seem to be a functional build. Seemed to be a deeper problem.

@guilleiguaran
Copy link

guilleiguaran commented Apr 16, 2019

I just reviewed the error log posted by @cstork and looks like it's the same I'm getting in my machine:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/optional:171:70: error: redefinition of 'bad_optional_access'
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
                                                                     ^
DerivedSources/ForwardingHeaders/wtf/Optional.h:281:7: note: previous definition is here
class bad_optional_access : public std::logic_error {
      ^
1 error generated.

Looks like there are conflicting definitions of bad_optional_access (the one shipped with libc++ and the one shipped by WTF), FreeBSD project fixed the package with this patch and I think it might be useful in our case: https://svnweb.freebsd.org/ports/head/www/webkit2-gtk3/files/patch-Source_WTF_wtf_Optional.h?view=markup&pathrev=477812

@gauteh
Copy link
Member

gauteh commented Apr 16, 2019 via email

@wpix
Copy link

wpix commented May 25, 2019

I am getting the same error, failing on the ninja install for webkitgtk

/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:171:70: error: redefinition of 'bad_optional_access'
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
                                                                     ^
DerivedSources/ForwardingHeaders/wtf/Optional.h:281:7: note: previous definition is here
class bad_optional_access : public std::logic_error {
      ^
1 error generated.
[1150/2516] Generate bindin

@gauteh
Copy link
Member

gauteh commented Aug 3, 2019

I think the latest error should be fixed by #28.

@yeled
Copy link
Member Author

yeled commented Aug 4, 2019

Just tried brew install --build-from-source Formula/webkitgtk.rb from master.

==> Installing webkitgtk
==> Downloading https://webkitgtk.org/releases/webkitgtk-2.22.7.tar.xz
Already downloaded: /Users/yeled/Library/Caches/Homebrew/downloads/d31bf62d4d59b6dd3e425154edb1d608eca9dd023f5dde5ed3766b2c59d0fdd4--webkitgtk-2.22.7.tar.xz
==> Patching
patching file Source/WTF/wtf/RAMSize.cpp
patching file Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp
patching file Source/WebCore/platform/PlatformWheelEvent.h
patching file Source/WebCore/platform/graphics/OpenGLShims.h
patching file Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp
patching file Source/WebCore/platform/gtk/ScrollAnimatorGtk.cpp
patching file Source/WTF/wtf/Optional.h
==> cmake -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/u
==> ninja install
Last 15 lines from /Users/yeled/Library/Logs/Homebrew/webkitgtk/02.ninja:
In file included from ../Source/WebCore/platform/graphics/cairo/ImageBufferDataCairo.h:31:
In file included from ../Source/WebCore/platform/graphics/cairo/PlatformContextCairo.h:31:
In file included from ../Source/WebCore/platform/graphics/GraphicsContext.h:29:
In file included from ../Source/WebCore/platform/graphics/DashArray.h:29:
In file included from DerivedSources/ForwardingHeaders/wtf/Vector.h:33:
DerivedSources/ForwardingHeaders/wtf/MathExtras.h:420:17: error: expected unqualified-id
    return std::isnan(a) || std::isnan(b) ? std::numeric_limits<T>::quiet_NaN() : std::max(a, b);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
    ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[1444/2516] Building C object Source/WebCore/CMakeFiles/WebCorePlatformGTK.dir/platform/gtk/GtkVersioning.c.o
ninja: build stopped: subcommand failed.

Do not report this issue to Homebrew/brew or Homebrew/core!

@andreabedini
Copy link
Contributor

@yeled I couldn't reproduce your problem (on macOS 10.14.6, CLT 10.3.0.0.1.1562985497) so I am afraid it's a "Works for me ™️". Looking around it seems to be related to

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

No branches or pull requests

6 participants