Opened 10 years ago

Last modified 7 years ago

#1147 closed defect (Fixed)

mlockall prevents compile for Android

Reported by: ioerror Owned by: ioerror
Priority: Low Milestone:
Component: Core Tor/Tor Version: 0.2.2.5-alpha
Severity: Keywords:
Cc: ioerror, Sebastian, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

bionic doesn't have an actual implementation of mlockall();
mlockall() is merely in the headers but not actually in the library.
This prevents Tor compilation with the bionic libc for Android handsets.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Attachments (3)

mlockall-autoconf.patch (1.3 KB) - added by ioerror 10 years ago.
mlockall autoconf patch to fix android build issue
mlockall-autoconf-02.patch (1.4 KB) - added by ioerror 10 years ago.
A more elegant patch that only tries to link if we actually have mlockall
mlockall-autoconf-03.patch (1018 bytes) - added by ioerror 10 years ago.
This is a minimal but still functional patch - please test it

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by ioerror

I've coded up a quick autoconf hack that I think fixes this issue.
Configure now checks for mlockall() and attempts to link it:
% ./configure|grep -i mlock
checking for mlockall... yes
checking whether we can link mlockall... yes

Changed 10 years ago by ioerror

Attachment: mlockall-autoconf.patch added

mlockall autoconf patch to fix android build issue

Changed 10 years ago by ioerror

Attachment: mlockall-autoconf-02.patch added

A more elegant patch that only tries to link if we actually have mlockall

comment:2 Changed 10 years ago by ioerror

The second attachment is the patch worth testing.

Changed 10 years ago by ioerror

Attachment: mlockall-autoconf-03.patch added

This is a minimal but still functional patch - please test it

comment:3 Changed 10 years ago by nickm

Committed in 6f1fe7e941b8f6d62829852059862b00beed5a6e; thanks!

comment:4 Changed 10 years ago by nickm

flyspray2trac: bug closed.

comment:5 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.