all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem in building Emacs 25.1 on Ubuntu 16.04.1
@ 2016-09-18 15:33 Hantang Liu
  2016-09-18 16:05 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Hantang Liu @ 2016-09-18 15:33 UTC (permalink / raw)
  To: help-gnu-emacs



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem in building Emacs 25.1 on Ubuntu 16.04.1
  2016-09-18 15:33 Problem in building Emacs 25.1 on Ubuntu 16.04.1 Hantang Liu
@ 2016-09-18 16:05 ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2016-09-18 16:05 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 18 Sep 2016 23:33:43 +0800 (GMT+08:00)
> From: "Hantang Liu" <liuhantang@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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem in building Emacs 25.1 on Ubuntu 16.04.1
@ 2016-09-19  2:47 Liu Hantang
  0 siblings, 0 replies; 3+ messages in thread
From: Liu Hantang @ 2016-09-19  2:47 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-19  2:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-18 15:33 Problem in building Emacs 25.1 on Ubuntu 16.04.1 Hantang Liu
2016-09-18 16:05 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2016-09-19  2:47 Liu Hantang

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.