New issue
Advanced search Search tips

Issue 691532 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

linker reports 'undefined reference' error

Reported by mwro...@opera.com, Feb 13 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 OPR/42.0.2393.94

Steps to reproduce the problem:
1. update third_part/WebKit/Source/core/editing/EditorTest.cpp with attach one
2. run build: ninja third_party/WebKit/Source/web:webkit_unit_tests

What is the expected behavior?
succesfull build. Linker does not report error

What went wrong?
build failure. Linker reports 'undefined reference' error

Did this work before? N/A 

Chrome version: 55.0.2883.87  Channel: n/a
OS Version: 
Flash Version: 

I've added additional test case in: third_party/WebKit/Source/core/editing/EditorTest.cpp which refers HTMButtonElement.
As a result linker reporst an error:

third_party/WebKit/Source/core/editing/EditorTest.cpp|82| error: undefined reference to 'blink::HTMLButtonElement::create(blink::Document&)'

When I look on dependencies in GN files (starting from top component): 

web:webkit_unit_tests
core:unit_tests
editing:unit_tests
core:core
core/html

and core/html includes HTMLButtonElement.cpp

which means HTMLButtonElement.cpp source file should be compiled and visible to linker.

It looks like build tool chain error.

 

Comment 1 by l...@chromium.org, Feb 13 2017

Components: -Platform>DevTools Blink>Editing
Labels: Needs-Feedback
Thanks for the report.  I think you meant to attach a .cpp file, but there isn't one attached.  Could you please attach it in a reply?
HTMLButtonElement needs to be core-exported to be visible in unit tests.

Please add CORE_EXPORT to the class declaration (L31 of HTMLButtonElement.h) as follows:

class CORE_EXPORT HTMLButtonElement final : public HTMLFormControlElement {

Comment 3 by ajha@chromium.org, Feb 14 2017

Labels: Needs-Milestone

Comment 4 by yosin@chromium.org, Feb 14 2017

Status: WontFix (was: Unconfirmed)
Please add CORE_EXPORT to HTMLButtonElement class declaration as describe in #c2 with your patch which uses HTMLButtonElement in webkit_unittests.

Comment 5 by mwro...@opera.com, Feb 14 2017

#1 sorry, I missed a file.

#2, #4 thanks, it does the job.

Sign in to add a comment