Opened 2 months ago

Last modified 4 hours ago

#31192 needs_revision defect

TBA - Support x86_64 target

Reported by: cypherpunks Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-mobile, tbb-rbm, ff68-esr, GeorgKoppen201907, TorBrowserTeam201909
Cc: boklm, sisbell, sysrqb Actual Points:
Parent ID: Points: 2
Reviewer: Sponsor: Sponsor44-can

Child Tickets

Change History (19)

comment:1 Changed 2 months ago by gk

Resolution: duplicate
Status: newclosed

We added support in #28119.

comment:2 Changed 2 months ago by cypherpunks

Resolution: duplicate
Status: closedreopened

Kidding?

comment:3 Changed 2 months ago by gk

Resolution: wontfix
Status: reopenedclosed

Oh, you meant x86_64 explicitly instead of any 64bit architecture that fulfills Google's requirements? Well, we won't add that in the next 2 weeks as there is no x86_64 support for ESR 60. aarch64 is sufficient here.

comment:4 Changed 2 months ago by cypherpunks

Have you read the link?
"The Google Play Store will require all apps that include native code to include 64-bit builds (ARM64 and x86_64) by August 2019".

comment:5 Changed 7 weeks ago by cypherpunks

"It isn't required to support every 64-bit architecture, but for each native 32-bit architecture you support you must include the corresponding 64-bit architecture."
https://developer.android.com/distribute/best-practices/develop/64-bit

comment:6 in reply to:  5 Changed 7 weeks ago by gk

Replying to cypherpunks:

"It isn't required to support every 64-bit architecture, but for each native 32-bit architecture you support you must include the corresponding 64-bit architecture."
https://developer.android.com/distribute/best-practices/develop/64-bit

Hrm. That's been helpful and seems indeed to indicate that we need both if we ship Tor Browser for armv7 and x86 architectures. That's unfortunate but we won't be able to ship x86_64 support by August 2019. We should come up with a plan, though, to solve this problem if it indeed turns out to throw x86 users under the bus.

comment:7 Changed 7 weeks ago by sysrqb

Upstream (landed in 64): https://bugzilla.mozilla.org/show_bug.cgi?id=1480834

https://hg.mozilla.org/mozilla-central/rev/2eb3342c3ea4
https://hg.mozilla.org/mozilla-central/rev/2d0a7ce39cfc
https://hg.mozilla.org/mozilla-central/rev/b78b12273560
https://hg.mozilla.org/mozilla-central/rev/c12699660620
https://hg.mozilla.org/mozilla-central/rev/ced591ff6815
https://hg.mozilla.org/mozilla-central/rev/704af02a849d
https://hg.mozilla.org/mozilla-central/rev/bbceefcad976
https://hg.mozilla.org/mozilla-central/rev/1dd3bc1e9fd7
https://hg.mozilla.org/mozilla-central/rev/3eff52855cdb

comment:8 Changed 7 weeks ago by sysrqb

Resolution: wontfix
Status: closedreopened

comment:9 Changed 7 weeks ago by sysrqb

Status: reopenedneeds_review

I have a patch that may be a temporary workaround (because we won't get full x86_64 support within the next few days). During the final packaging stage of the x86 build, the patch simply copies the x86 binaries into /lib/x86_64, as well.

This patch is not tested yet. I pushed the branch to my repo, bug31192_0.

comment:10 in reply to:  9 Changed 7 weeks ago by sysrqb

Replying to sysrqb:

I have a patch that may be a temporary workaround (because we won't get full x86_64 support within the next few days). During the final packaging stage of the x86 build, the patch simply copies the x86 binaries into /lib/x86_64, as well.

This patch is not tested yet. I pushed the branch to my repo, bug31192_0.

So far, so good:

$ unzip -l nightly/2019-07-30/tor-browser-tbb-nightly-android-x86-multi-qa.apk
[snip]
  5552176  2000-01-01 00:00   lib/x86/libObfs4proxy.so
  7007040  2000-01-01 00:00   lib/x86/libTor.so
  1164756  2000-01-01 00:00   lib/x86/libmozglue.so
     5556  2000-01-01 00:00   lib/x86/libplugin-container.so
  5552176  2000-01-01 00:00   lib/x86_64/libObfs4proxy.so
  7007040  2000-01-01 00:00   lib/x86_64/libTor.so
  1164756  2000-01-01 00:00   lib/x86_64/libmozglue.so
     5556  2000-01-01 00:00   lib/x86_64/libplugin-container.so

comment:11 Changed 7 weeks ago by sysrqb

No joy here. When the binaries for x86 are in lib/x86_64, then we get "is 32-bit instead of 64-bit":

07-30 19:07:30.341  3092  3092 E GeckoLoader: Couldn't load /data/app/org.torproject.torbrowser_nightly-92QS53uVSnXKDmxyMEWv5Q==/lib/x86_64/libmozglue.so: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/org.torproject.torbrowser_nightly-92QS53uVSnXKDmxyMEWv5Q==/lib/x86_64/libmozglue.so" is 32-bit instead of 64-bit
07-30 19:07:30.342  3092  3092 E GeckoLoader: Library exists but couldn't load!
07-30 19:07:30.343  3092  3092 E GeckoLoader: Couldn't load /data/user/0/org.torproject.torbrowser_nightly/lib/libmozglue.so: java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/user/0/org.torproject.torbrowser_nightly/lib/libmozglue.so" not found
07-30 19:07:30.344  3092  3092 E GeckoLoader: Couldn't load /data/app-lib/org.torproject.torbrowser_nightly/libmozglue.so: java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/app-lib/org.torproject.torbrowser_nightly/libmozglue.so" not found
07-30 19:07:30.349  3092  3092 E GeckoLoader: Couldn't load /data/data/org.torproject.torbrowser_nightly/lib/libmozglue.so: java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/data/org.torproject.torbrowser_nightly/lib/libmozglue.so" not found
07-30 19:07:30.351  3092  3092 D GeckoLoader: Copying lib/x86_64/libmozglue.so to /data/user/0/org.torproject.torbrowser_nightly/files/lib/libmozglue.so
07-30 19:07:30.394  3092  3092 D GeckoLoader: Marking /data/user/0/org.torproject.torbrowser_nightly/files/lib/libmozglue.so as executable.
07-30 19:07:30.394  3092  3092 E GeckoLoader: Couldn't load /data/user/0/org.torproject.torbrowser_nightly/files/lib/libmozglue.so: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/org.torproject.torbrowser_nightly/files/lib/libmozglue.so" is 32-bit instead of 64-bit

If we don't copy libmozglue and libplugin-container into x86_64, then the loader does fallback to loading them from x86, but we still get the same error.

07-30 19:44:23.224  3548  3548 E GeckoLoader: Library doesn't exist when it should.                                               
07-30 19:44:23.225  3548  3548 E GeckoLoader: Couldn't load /data/user/0/org.torproject.torbrowser_nightly/lib/libmozglue.so: java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/user/0/org.torproject.torbrowser_nightly/lib/libmozglue.so" not found          
07-30 19:44:23.226  3548  3568 D GeckoSharedPrefs: Migrating to version = 2                                                                 
07-30 19:44:23.226  3548  3568 D GeckoSharedPrefs: Migrating crash reporter settings                                   
07-30 19:44:23.226  3548  3568 D GeckoSharedPrefs: All keys have been migrated                                                                        
07-30 19:44:23.227  3548  3548 E GeckoLoader: Couldn't load /data/app-lib/org.torproject.torbrowser_nightly/libmozglue.so: java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/app-lib/org.torproject.torbrowser_nightly/libmozglue.so" not found                               
07-30 19:44:23.228  3548  3548 E GeckoLoader: Couldn't load /data/data/org.torproject.torbrowser_nightly/lib/libmozglue.so: java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/data/org.torproject.torbrowser_nightly/lib/libmozglue.so" not found                                               
07-30 19:44:23.231  3548  3548 W GeckoLoader: lib/x86_64/libmozglue.so not found in APK /data/app/org.torproject.torbrowser_nightly-JHl-JoS_-TuA7SFpqkYH5Q==/base.apk                                                                                                                                  
07-30 19:44:23.231  3548  3548 D GeckoLoader: Copying lib/x86/libmozglue.so to /data/user/0/org.torproject.torbrowser_nightly/files/lib/libmozglue.so
07-30 19:44:23.262  3548  3548 D GeckoLoader: Marking /data/user/0/org.torproject.torbrowser_nightly/files/lib/libmozglue.so as executable.           
07-30 19:44:23.263  3548  3548 E GeckoLoader: Couldn't load /data/user/0/org.torproject.torbrowser_nightly/files/lib/libmozglue.so: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/org.torproject.torbrowser_nightly/files/lib/libmozglue.so" is 32-bit instead of 64-bit      
07-30 19:44:23.264  3548  3548 E GeckoLoader: Load diagnostics: LOAD mozglue: ABI: x86-gcc3, x86_64: Data: /data/user/0/org.torproject.torbrowser_nightly, ax=false, ddx=false, -1x=false, -2x=false, nativeLib: /data/app/org.torproject.torbrowser_nightly-JHl-JoS_-TuA7SFpqkYH5Q==/lib/x86_64, dirx=true, libx=false

comment:12 Changed 4 weeks ago by gk

Keywords: TorBrowserTeam201908 added; TorBrowserTeam201907 removed

Moving more tickets to August

comment:13 Changed 4 weeks ago by gk

Keywords: ff68-esr added; GeorgKoppen201907 removed
Summary: TBA - Support x86_64 target by August 2019TBA - Support x86_64 target

comment:14 Changed 4 weeks ago by gk

Keywords: GeorgKoppen201907 added
Status: needs_reviewneeds_revision

comment:15 Changed 4 weeks ago by pili

Sponsor: Sponsor44-can

Tagging with Sponsor 44

comment:16 Changed 2 weeks ago by gk

Keywords: TorBrowserTeam201909 added; TorBrowserTeam201908 removed

Moving tickets to September

comment:17 Changed 2 weeks ago by pili

Points: 2

comment:18 Changed 2 days ago by eighthave

FYI, I think this is relevant, I got 64-bit builds going in @n8fr8's tor-android which is used to provide Tor binaries for Orbot: https://gitlab.com/eighthave/tor-android I'm working on finalizing that, and getting merged there.

comment:19 Changed 4 hours ago by sysrqb

I'm giving bug31192_05 a try. It only adds the necessary android-x86_64 parts into the different config and build files (plus a new mozconfig). I expect it will fail somewhere during the build process (or earlier).

Note: See TracTickets for help on using tickets.