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

electron: difference between electron-source.electron.headers and electron-bin.headers #363349

Closed
TomaSajt opened this issue Dec 8, 2024 · 0 comments · Fixed by #371189
Closed
Labels
0.kind: bug Something is broken

Comments

@TomaSajt
Copy link
Contributor

TomaSajt commented Dec 8, 2024

Describe the bug

Seems like electron-source.electron.headers is just using the headers from inside src/third_party/electron_node

Steps To Reproduce

Steps to reproduce the behavior:

  1. Unpack both electron-source.electron.headers and electron-bin.headers
  2. run diff -r -u node_headers/ node-v20.18.0/
  3. see many differences

Expected behavior

the two directories are identical

Additional context

Noticed this while packaging an electron app: #362637

The package uses electron-rebuild, which detects if npm_config_nodedir is set, and uses that instead of downloading the electron headers. (It is set by default to ${nodejs} if you use npmConfigHook)

One of the dependencies actually used a native module that needed a header file which was different between node and electron.

I unpacked electron-source.headers and set it as npm_config_nodedir, but it didn't work when I tried to run the program:
_ZN2v89Exception9TypeErrorENS_5LocalINS_6StringEEE is a node-only symbol, because electron-source.electron.headers contains headers only for the node ABI.
However, electron-bin.headers worked perfectly:
_ZN2v89Exception9TypeErrorENS_5LocalINS_6StringEEENS1_INS_5ValueEEE is the symbol that's present in the electron executable

Metadata

Notify maintainers

@yayayayaka @teutat3s


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@TomaSajt TomaSajt added the 0.kind: bug Something is broken label Dec 8, 2024
@TomaSajt TomaSajt changed the title electron: difference between electron-source.headers and electron-bin.headers electron: difference between electron-source.electron.headers and electron-bin.headers Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant