FS#51025 - [atom] Atom not starting due to Electron error

Attached to Project: Community Packages
Opened by Dario Ostuni (dariost) - Wednesday, 28 September 2016, 17:42 GMT
Last edited by Nicola Squartini (tensor5) - Thursday, 29 September 2016, 07:55 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Nicola Squartini (tensor5)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No

Details

Description:
Atom does not start giving the error "electron: symbol lookup error: electron: undefined symbol: _ZN3re23RE23Arg9parse_intEPKciPv"

Additional info:
community/atom 1.10.2-4
community/electron 1.4.1-2
This task depends upon

Closed by  Nicola Squartini (tensor5)
Thursday, 29 September 2016, 07:55 GMT
Reason for closing:  Fixed
Additional comments about closing:  electron 1.4.1-3
Comment by Mika Attila (solvedsnake) - Wednesday, 28 September 2016, 18:24 GMT
Note: Downgrading `re2` from `20160901-1` ([community-testing]) to `20160301-1` ([community]) fixes this error.

This is some kind of a runtime linking error between electron and re2, affecting Atom, since Atom is an electron app.
Comment by Patrik Plihal (birdspider) - Wednesday, 28 September 2016, 19:54 GMT
Same issue with atom 1.10.2-4, electron 1.4.1-2, re2 20160901-1 (all from [community] - I don't have any *-testing enabled)

EDIT: actually running `/usr/bin/electron` by itself produces this error. (Maybe the issue title should be changed?)
Comment by Ryan (EmberQuill) - Wednesday, 28 September 2016, 20:08 GMT
re2 has been updated to 20160901-1 in the [community] repository as of today, I think. Which is why this bug is popping up now. I grabbed the previous version of re2 from the Arch Linux Archive.

EDIT: If you saw this comment before I removed the mention of wonky DPI scaling, that was an unrelated issue that I've fixed.
Comment by zakaria zemmoura (sheltron) - Wednesday, 28 September 2016, 21:36 GMT
Same as you, i just updated my Arch box and electron was in the list to be updated, Atom freezed, i restarted it and no way to restart it.
I had the same error message when i tried to start it from the shell.

EDIT: downgrading re2 to it's previous version seems to fix the problem as mentioned in the earlier comments.
Comment by Anatol Pomozov (anatolik) - Wednesday, 28 September 2016, 22:03 GMT
It looks like upstream re2 modified ABI without bumping so version.

I am trying to rebuild electron to see if it fixes the issue.
Comment by Anatol Pomozov (anatolik) - Wednesday, 28 September 2016, 22:33 GMT
And 'electron' compilation fails with

In file included from ../../third_party/leveldatabase/env_chromium.cc:25:
../../third_party/re2/src/re2/re2.h:186:10: fatal error: 're2/variadic_function.h' file not found
#include "re2/variadic_function.h"
^
2 warnings and 1 error generated.


It looks like the old version of Chromium used with electron does not compatible with the recent version of re2. Nicola, could you please look if it is possible to patch electron? If not we need to revert re2.
Comment by Anatol Pomozov (anatolik) - Wednesday, 28 September 2016, 22:36 GMT
I think env_chromium.cc should be modified to use system version of re2.h file, instead of hardcoding its path to third_party.
Comment by Nicola Squartini (tensor5) - Thursday, 29 September 2016, 01:24 GMT
I'm looking into it now. In the worst case, I can always revert to using the bundled re2, so no need to revert system re2.
Comment by Anatol Pomozov (anatolik) - Thursday, 29 September 2016, 05:51 GMT
After replacing '#include "third_party/re2/src/re2/re2.h"' with #include "re2/re2.h" in 'electron' sources I was able to compile it. And it fixed the problem with atom.

Here is the description of the problem: there are multiple places in electron that hardcode path to re2 main header third_party/re2/src/re2/re2.h. And it is included even if system re2 library is configured. So outdated version of re2/re2.h is included from electron while subsequent includes of 're2/xxx.h' are from system package. This mismatch causes ABI confusion.

Please file a bug to electron project to fix the includes problem. Meanwhile we should 'sed' hardcoded re2 paths.
Comment by Nicola Squartini (tensor5) - Thursday, 29 September 2016, 06:19 GMT
It's actually a problem of Chromium, which is included in electron. They have a special way of bypassing hardcoded headers when you opt for unbundling a specific library, by generating shim headers, but the shim for re2 was not done correctly. I fixed it and I'm waiting for the builds to complete.

Loading...