Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem in building Emacs 25.1 on Ubuntu 16.04.1

19 views
Skip to first unread message

Hantang Liu

unread,
Sep 18, 2016, 11:57:27 AM9/18/16
to help-gn...@gnu.org

Hi everyone. I came across a problem when building emacs-25.1 on Ubuntu 16.04.1. After successfully running


./autogen.sh
./configure --with-xwidgets --with-cairo --prefix=$HOME


I run `make` then the following error shows up


In file included from binary-io.c:3:0:
binary-io.h: In function ‘set_binary_mode’:
binary-io.h:57:10: error: ‘O_BINARY’ undeclared (first use in this function)
return O_BINARY;


I googled around and could not solve it by myself, do you have any ideas? Thanks.

--
Hantang Liu

Eli Zaretskii

unread,
Sep 18, 2016, 12:04:58 PM9/18/16
to help-gn...@gnu.org
> Date: Sun, 18 Sep 2016 23:33:43 +0800 (GMT+08:00)
> From: "Hantang Liu" <liuha...@zju.edu.cn>
>
> In file included from binary-io.c:3:0:
> binary-io.h: In function ‘set_binary_mode’:
> binary-io.h:57:10: error: ‘O_BINARY’ undeclared (first use in this function)
> return O_BINARY;

O_BINARY is supposed to be defined in lib/fcntl.h, please look there
for why this doesn't work for you.

In any case, I suggest to report this using report-emacs-bug.

Liu Hantang

unread,
Sep 19, 2016, 10:10:31 AM9/19/16
to help-gn...@gnu.org
I delved into `lib/fcntl.h` and found `O_BINARY` is defined in it.
Then I found that `binary-io.h` includes `fcntl.h` with `#include <fcntl.h>`,
which means it mightuse my system's version of `fcntl.h`. I found that system's
`fcntl.h` has no `O_BINARY` defined and I happened to have `export C_INCLUDE_PATH=/usr/include...`
in my .zshrc so the compiler used system's instead of emacs'(which is supposed to be used).
I deleted the `C_INCLUDE_PATH` definition in `.zshrc` then successfully compiled it.

Thanks for the help!

============================

> > Date: Sun, 18 Sep 2016 23:33:43 +0800 (GMT+08:00)
> > From: "Hantang Liu" <address@hidden>
> >
> > In file included from binary-io.c:3:0:
> > binary-io.h: In function ‘set_binary_mode’:
> > binary-io.h:57:10: error: ‘O_BINARY’ undeclared (first use in this
> > function)
> > return O_BINARY;
>
> O_BINARY is supposed to be defined in lib/fcntl.h, please look there
> for why this doesn't work for you.
>
> In any case, I suggest to report this using report-emacs-bug.

--
Hantang Liu
0 new messages