RESOLVED FIXED 127059
[GTK] Fails to link JavaScriptCore in OS X, missing symbols add_history and readline
https://bugs.webkit.org/show_bug.cgi?id=127059
Summary [GTK] Fails to link JavaScriptCore in OS X, missing symbols add_history and r...
Jeremy Huddleston Sequoia
Reported 2014-01-15 12:27:43 PST
darwin/gtk2/x11, webkit-gtk-2.3.4 fails to link. 2.3.3 was ok: libtool: link: /usr/bin/clang -arch x86_64 -ansi -fno-strict-aliasing -pipe -Os -ftemplate-depth=256 -arch x86_64 -pthread -std=c99 -Qunused-arguments -O2 -Wl,-headerpad_max_install_names -arch x86_64 -Wl,--no-demangle -o Programs/.libs/minidom Source/JavaScriptCore/API/tests/Programs_minidom-JSNode.o Source/JavaScriptCore/API/tests/Programs_minidom-JSNodeList.o Source/JavaScriptCore/API/tests/Programs_minidom-Node.o Source/JavaScriptCore/API/tests/Programs_minidom-NodeList.o Source/JavaScriptCore/API/tests/Programs_minidom-minidom.o -L/opt/local/lib ./.libs/libjavascriptcoregtk-1.0.dylib -lz -lgmodule-2.0 -lgthread-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -licui18n -licuuc -licudata -lm -lpthread -lstdc++ -pthread libtool: link: /usr/bin/clang++ -fno-strict-aliasing -fno-rtti -I/opt/local/include -pipe -Os -ftemplate-depth=256 -Wno-c++11-extensions -arch x86_64 -stdlib=libc++ -pthread -std=c++11 -Wno-c++11-compat -Qunused-arguments -O2 -Wl,-headerpad_max_install_names -arch x86_64 -Wl,--no-demangle -o Programs/.libs/jsc-1 Source/JavaScriptCore/Programs_jsc_1-jsc.o -L/opt/local/lib ./.libs/libjavascriptcoregtk-1.0.dylib -lpthread -lz -lgmodule-2.0 -lgthread-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -licui18n -licuuc -licudata -pthread Undefined symbols for architecture x86_64: "_add_history", referenced from: __Z7jscmainiPPc in Programs_jsc_1-jsc.o "_readline", referenced from: __Z7jscmainiPPc in Programs_jsc_1-jsc.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Attachments
Patch (537 bytes, patch)
2014-10-03 00:36 PDT, Philip Chimento
no flags
Patch (642 bytes, patch)
2014-10-03 00:43 PDT, Philip Chimento
no flags
Patch for 2.4.x stable branch (1.23 KB, patch)
2014-10-06 13:00 PDT, Philip Chimento
no flags
Patch (1.28 KB, patch)
2015-01-03 12:17 PST, Philip Chimento
no flags
Jeremy Huddleston Sequoia
Comment 1 2014-01-15 12:30:21 PST
You're missing a link against libedit.
Alberto Garcia
Comment 2 2014-01-23 12:18:23 PST
Ok, I see the problem, this was r161853. It's probably enough with something like this in Source/JavaScriptCore/GNUmakefile.am if OS_DARWIN Programs_jsc_LDADD += -ledit endif Can you give it a try and upload the patch if it works?
Philip Chimento
Comment 3 2014-10-03 00:36:45 PDT
Created attachment 239185 [details] Patch Worked for me, with the addition of @WEBKITGTK_API_MAJOR_VERSION@. Here's the patch.
Philip Chimento
Comment 4 2014-10-03 00:43:43 PDT
Philip Chimento
Comment 5 2014-10-03 00:49:49 PDT
I'm guessing the patch doesn't apply to trunk because trunk doesn't use automake anymore :-/ Can it be committed to the 2.4 stable branch though?
Philip Chimento
Comment 6 2014-10-06 13:00:16 PDT
Created attachment 239350 [details] Patch for 2.4.x stable branch
Philip Chimento
Comment 7 2014-10-06 13:05:42 PDT
Here's an updated patch with changelog.
Philip Chimento
Comment 8 2014-11-05 22:06:49 PST
Would it be possible to get this reviewed for 2.4.8?
Alberto Garcia
Comment 9 2014-11-06 00:55:11 PST
I believe the patch is fine, I just added it to the list of changes to merge for 2.4.8: http://trac.webkit.org/wiki/WebKitGTK/2.4.x Carlos will take care of it before the next release. Isn't webkitgtk 2.6 affected by this problem?
Philip Chimento
Comment 10 2014-11-06 08:57:51 PST
(In reply to comment #9) > I believe the patch is fine, I just added it to the list of changes > to merge for 2.4.8: > > http://trac.webkit.org/wiki/WebKitGTK/2.4.x > > Carlos will take care of it before the next release. > > Isn't webkitgtk 2.6 affected by this problem? This only affects the Automake build system, I think, which is defunct in 2.6.
Philip Chimento
Comment 11 2015-01-02 20:11:16 PST
I was wrong; -ledit is also missing in cmake in 2.6. I'll add a patch for that as well. Thanks for the review for 2.4.8, by the way.
Philip Chimento
Comment 12 2015-01-03 12:17:24 PST
Philip Chimento
Comment 13 2015-01-04 09:10:18 PST
Anyone know why -ledit would fail the "mac" EWS build? Do I need to check for PORT=GTK as well?
Carlos Garcia Campos
Comment 14 2015-01-05 02:13:16 PST
Comment on attachment 239350 [details] Patch for 2.4.x stable branch Committed to 2.4 branch, thanks. <http://trac.webkit.org/changeset/177899>
Carlos Garcia Campos
Comment 15 2015-01-05 02:15:14 PST
(In reply to comment #9) > I believe the patch is fine, I just added it to the list of changes > to merge for 2.4.8: > > http://trac.webkit.org/wiki/WebKitGTK/2.4.x > > Carlos will take care of it before the next release. > > Isn't webkitgtk 2.6 affected by this problem? Do we even support building wk2 in MAC OSX?
Philip Chimento
Comment 16 2015-01-05 12:18:40 PST
I don't know if you support it as such, but I have recently succeeded in building WebKitGTK 2.6.4 on OSX and would like to contribute all the fixes that I made.
Philippe Normand
Comment 17 2015-01-06 01:02:44 PST
The Mac EWS failure seems unrelated with this patch. Moreover the Mac port doesn't use CMake so I think this is safe for landing.
Alex Christensen
Comment 18 2015-05-14 12:07:04 PDT
(In reply to comment #17) > The Mac EWS failure seems unrelated with this patch. I agree. > Moreover the Mac port doesn't use CMake so I think this is safe for landing. I think this is safe for landing, but I would have to change it to (WTF_OS_MAC_OS_X && GTK) or whatever the CMake equivalent is once I get back to getting CMake working on Mac for the non-GTK Mac port, which I assume does not use libedit (I'm not familiar with libedit). I'm ok with this patch with or without this change.
Philip Chimento
Comment 19 2015-05-17 11:59:39 PDT
libedit is a BSD-licensed replacement for the GNU readline library. I assume JSC uses it in its REPL.
WebKit Commit Bot
Comment 20 2015-10-12 10:04:23 PDT
Comment on attachment 243919 [details] Patch Clearing flags on attachment: 243919 Committed r190857: <http://trac.webkit.org/changeset/190857>
WebKit Commit Bot
Comment 21 2015-10-12 10:04:32 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.