Opened 6 months ago

Closed 5 months ago

#34219 closed defect (fixed)

Enable ZSTD support properly for Android

Reported by: gk Owned by: gk
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, TorBrowserTeam202005R, GeorgKoppen202005, tbb-10.0a1
Cc: tbb-team Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

In #28766 we tried to enable ZSTD support for Android but just specifying --enable-zstd when compiling tor and extracting the library is not enough:

WARNING: Unable to find libzstd, install pkg-config, and check the PKG_CONFIG_PATH environment variable, or set ZSTD_CFLAGS and ZSTD_LIBS

Child Tickets

Change History (3)

comment:1 Changed 6 months ago by gk

Keywords: TorBrowserTeam202005R added; TorBrowserTeam202005 removed
Status: assignedneeds_review

We have at least two options to fix that:

1) Installing pkg-config and pointing it to /var/tmp/dist/zstd/lib/pkgconfig
2) Setting ZSTD_CFLAGS and ZSTD_LIBS properly.

I opted for 2) as 1) needs pkg-config installed (presumable for all other platforms as well if we want to keep the container amount low) and we end up with -L/var/tmp/dist/zstd/lib -lzstd for ld which is not really needed. Pointing directly to the static lib we want to have used should be enough if I understand things correctly.

bug_34219 (https://gitweb.torproject.org/user/gk/tor-browser-build.git/commit/?h=bug_34219&id=40809c54c2e198cbe11d0d4f19bc9fd7c242166b) has a patch for review.

It still needs some testing.

comment:3 Changed 5 months ago by sysrqb

Keywords: tbb-10.0a1 added
Resolution: fixed
Status: needs_reviewclosed

Looks good to me. Thanks!

(top is from 9.5a13)

Tor version 0.4.3.5 (git-5ceb60e5ca61fec9). 
Library versions	Compiled		Runtime
Libevent		2.1.11-stable  		2.1.11-stable
OpenSSL 		1.1.1g         		1.1.1g
Zlib    		1.2.11         		1.2.11

Tor version 0.4.3.5 (git-5ceb60e5ca61fec9). 
Library versions	Compiled		Runtime
Libevent		2.1.11-stable  		2.1.11-stable
OpenSSL 		1.1.1g         		1.1.1g
Zlib    		1.2.11         		1.2.11
Libzstd 		1.4.4          		1.4.4

Merged onto master with commit ede6ffb414a8684f5dab8615836504acf2774734.

Note: See TracTickets for help on using tickets.