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

build: fix with enable_pdf_viewer = false #39990

Merged
merged 1 commit into from Sep 27, 2023
Merged

Conversation

codebytere
Copy link
Member

Description of Change

Fix build with enable_pdf_viewer = false. Without this fix, the following linker error occurs:

Linker Error

ld64.lld: error: undefined symbol: pdf_extension_util::AddAdditionalData(bool, bool, base::Value::Dict*)
>>> referenced by resources_private_api.cc:54 (../../electron/shell/browser/extensions/api/resources_private/resources_private_api.cc:54)
>>>               obj/electron/electron_lib/resources_private_api.o:(symbol extensions::ResourcesPrivateGetStringsFunction::Run()+0x84)

ld64.lld: error: undefined symbol: pdf_extension_util::AddStrings(pdf_extension_util::PdfViewerContext, base::Value::Dict*)
>>> referenced by resources_private_api.cc:52 (../../electron/shell/browser/extensions/api/resources_private/resources_private_api.cc:52)
>>>               obj/electron/electron_lib/resources_private_api.o:(symbol extensions::ResourcesPrivateGetStringsFunction::Run()+0x74)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Traceback (most recent call last):
  File "/Users/codebytere/Developer/electron-gn/src/out/Testing/../../build/toolchain/apple/linker_driver.py", line 389, in <module>
    LinkerDriver(sys.argv).run()
  File "/Users/codebytere/Developer/electron-gn/src/out/Testing/../../build/toolchain/apple/linker_driver.py", line 172, in run
    subprocess.check_call([self._driver_path] + compiler_driver_args,
  File "/Users/codebytere/.electron_build_tools/third_party/Xcode/Xcode-14.3.0.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)

Checklist

Release Notes

Notes: Fixed build failure when PDF viewer is disabled.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/25-x-y PR should also be added to the "25-x-y" branch. target/26-x-y PR should also be added to the "26-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. labels Sep 27, 2023
@jkleinsc jkleinsc merged commit b7c9c89 into main Sep 27, 2023
22 checks passed
@jkleinsc jkleinsc deleted the fix-pdf-viewer-disabled branch September 27, 2023 14:09
@release-clerk
Copy link

release-clerk bot commented Sep 27, 2023

Release Notes Persisted

Fixed build failure when PDF viewer is disabled.

@trop
Copy link
Contributor

trop bot commented Sep 27, 2023

I have automatically backported this PR to "26-x-y", please check out #39999

@trop trop bot added in-flight/26-x-y and removed target/26-x-y PR should also be added to the "26-x-y" branch. labels Sep 27, 2023
@trop
Copy link
Contributor

trop bot commented Sep 27, 2023

I have automatically backported this PR to "25-x-y", please check out #40000

@trop
Copy link
Contributor

trop bot commented Sep 27, 2023

I have automatically backported this PR to "27-x-y", please check out #40001

@trop trop bot added in-flight/25-x-y in-flight/27-x-y merged/25-x-y PR was merged to the "25-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. and removed target/25-x-y PR should also be added to the "25-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. in-flight/25-x-y in-flight/26-x-y labels Sep 27, 2023
@trop trop bot removed the in-flight/27-x-y label Sep 27, 2023
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shell/browser/extensions/api/resources_private/resources_private_api.cc

MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
build: fix with enable_pdf_viewer = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/25-x-y PR was merged to the "25-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants