Re: Compiling on Termux

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Compiling on Termux
Date: 2018-12-21 20:03:32
Message-ID: CAEepm=0bVBVxBrw=nEH_=vn_BvcZ9j3w=nrjr-zG=2xkc20UFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 22, 2018 at 5:56 AM David Fetter <david(at)fetter(dot)org> wrote:
>
> Folks,
>
> I'm trying to compile master (c952eae52a33069e2e92d34f217b43d0eca3d7de)
> on Termux, using the supplied settings, as follows.
>
> pg_config --configure | xargs ./configure > configure.out 2>configure.err
> make -j 4 > make.out 2> make.err
>
> There appears to be some confusion somewhere about sync_file_range,
> namely that it's found by ./configure and then not found in make.
>
> What should I be poking at to make this work?

Apparently your libc (or something else) defines the function so the
configure test passes, but your <fcntl.h> doesn't declare it so we
can't use it. I guess Termux supplies the headers but your Android
supplies the libraries, so there may be sync issues. I'd try hunting
around for declarations with something like find /usr/include -name
'*.h' | xargs grep sync_file_range. Here's an interesting similar
case:

https://github.com/termux/termux-packages/issues/899

That talks about using -D__ANDROID_API__=23 (or presumably higher) to
make sure that sigtimedwait is exposed by signal.h. Something similar
may be afoot here.

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2018-12-21 20:16:16 Offline enabling/disabling of data checksums
Previous Message David Fetter 2018-12-21 18:56:22 Compiling on Termux