Open yeled opened 5 years ago
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
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?
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 https://github.com/Homebrew/brew/issues/5153 together with https://github.com/Homebrew/homebrew-core/issues/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.
Hm, ok, hopefully that solves it.
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.
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 ;)
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. :-/
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.
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
Ah, cool, did you try adding it?
tir. 16. apr. 2019 kl. 08:30 skrev notifications@github.com:
I just reviewed the error log posted by @cstork https://github.com/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, 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
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/astroidmail/homebrew-astroid/issues/27#issuecomment-483529033, or mute the thread https://github.com/notifications/unsubscribe-auth/AADd-3DMy90McBQDI-flu6OZYJpIRZ3nks5vhW4OgaJpZM4b4KYr .
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
I think the latest error should be fixed by #28.
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!
@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
isnan
defined as a CPP macro in math.h
(C style) and the C++ std::isnan
which should be exposed by cmath
(which is a C++ header).
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 https://github.com/astroidmail/homebrew-astroid/pull/26#issuecomment-473520351