GNU bug report logs -
#14821
Build broken on 64-bit Cygwin starting with bzr revision 113315
Previous Next
Reported by: Ken Brown <kbrown <at> cornell.edu>
Date: Mon, 8 Jul 2013 15:48:02 UTC
Severity: normal
Done: Ken Brown <kbrown <at> cornell.edu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14821 in the body.
You can then email your comments to 14821 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14821
; Package
emacs
.
(Mon, 08 Jul 2013 15:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ken Brown <kbrown <at> cornell.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 08 Jul 2013 15:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Starting with bzr revision 113315, the build on 64-bit Cygwin fails as
follows:
gcc -std=gnu99 -Demacs -I. -I/c/src/emacs/64testt/src -I../lib
-I/c/src/emacs/64testt/src/../lib -D_REENTRANT -I/usr/include/gtk-3.0
-I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0
-I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/
-I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1
-I/usr/include/libpng15 -DGDK_DISABLE_DEPRECATION_WARNINGS
-DGLIB_DISABLE_DEPRECATION_WARNINGS -I/usr/include/freetype2
-D_REENTRANT -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/cairo -I/usr/include/libpng15 -I/usr/include/pixman-1
-I/usr/include/freetype2 -fopenmp -I/usr/include/ImageMagick
-I/usr/include/libxml2 -I/usr/include/dbus-1.0
-I/usr/lib/dbus-1.0/include -D_REENTRANT -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -D_REENTRANT -I/usr/include/gconf/2
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/freetype2 -MMD -MF deps/.d -MP
-I/usr/include/p11-kit-1 -D_REENTRANT -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -O0 -ggdb \
-o temacs vm-limit.o dispnew.o frame.o scroll.o xdisp.o menu.o
xmenu.o window.o charset.o coding.o category.o ccl.o character.o
chartab.o bidi.o cm.o term.o terminal.o xfaces.o xterm.o xfns.o
xselect.o xrdb.o xsmfns.o xsettings.o gtkutil.o emacsgtkfixed.o
dbusbind.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o
filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o
casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o
doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o
lread.o syntax.o unexcw.o bytecode.o process.o gnutls.o callproc.o
region-cache.o sound.o atimer.o doprnt.o intervals.o textprop.o
composite.o xml.o gfilenotify.o profiler.o sheap.o cygw32.o xfont.o
ftfont.o xftfont.o ftxfont.o fontset.o fringe.o image.o xgselect.o
terminfo.o gmalloc.o lastfile.o ../lib/libgnu.a -ltiff -ljpeg
-lpng -lz -lm -lgif -lXpm -lgtk-3 -latk-bridge-2.0 -lgdk-3 -latk-1.0
-lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage
-lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lgio-2.0 -lXfixes
-lpangoft2-1.0 -lharfbuzz -lpango-1.0 -lcairo -lpixman-1 -lfontconfig
-lexpat -lfreetype -lbz2 -lxcb-shm -lxcb-render -lXrender -lXext -lX11
-lxcb -lXau -lXdmcp -lpng15 -lm -lz -lgmodule-2.0 -lgobject-2.0 -lffi
-lglib-2.0 -lintl -liconv -lpcre -lSM -lICE -lX11 -lXrender -lXft
-lXrender -lfontconfig -lexpat -lfreetype -lz -lbz2 -lX11 -lxcb -lXau
-lXdmcp -lrsvg-2 -lgio-2.0 -lgdk_pixbuf-2.0 -lcairo -lgmodule-2.0
-lgobject-2.0 -lffi -lpixman-1 -lfontconfig -lexpat -lfreetype -lbz2
-lpng15 -lm -lz -lxcb-shm -lxcb-render -lXrender -lXext -lglib-2.0
-lintl -liconv -lpcre -lX11 -lxcb -lXau -lXdmcp -lMagickWand
-lMagickCore -ldbus-1 -lpthread -lrt -lXrandr -lXext
-lXrender -lX11 -lxcb -lXau -lXdmcp -lXinerama -lXext -lX11 -lxcb
-lXau -lXdmcp -lxml2 -lz -liconv -lm -lncurses -lgio-2.0 -lz
-lgmodule-2.0 -lgobject-2.0 -lffi -lglib-2.0 -lintl -liconv -lpcre
-lgconf-2 -ldbus-1 -lpthread -lrt -lgio-2.0 -lz -lgmodule-2.0
-lgobject-2.0 -lffi -lglib-2.0 -lintl -liconv -lpcre -lgobject-2.0
-lffi -lglib-2.0 -lintl -liconv -lpcre -lfreetype -lz -lbz2
-lfontconfig -lexpat -lfreetype -lz -lbz2 -lgnutls -lnettle
-lhogweed -lgmp -lintl -liconv -ltasn1 -lp11-kit -lz -lpthread
-lgio-2.0 -lz -lgmodule-2.0 -lgobject-2.0 -lffi -lglib-2.0 -lintl
-liconv -lpcre
../lib/libgnu.a(pipe2.o): In function `rpl_pipe2':
/c/src/emacs/64testt/lib/pipe2.c:144: undefined reference to `setmode'
I think the issue here is that pipe2.c shouldn't be compiled on Cygwin.
Ken
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14821
; Package
emacs
.
(Tue, 09 Jul 2013 12:34:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 14821 <at> debbugs.gnu.org (full text, mbox):
On 7/8/2013 11:47 AM, Ken Brown wrote:
> Starting with bzr revision 113315, the build on 64-bit Cygwin fails as
> follows:
>
> gcc -std=gnu99 -Demacs -I. -I/c/src/emacs/64testt/src -I../lib
> -I/c/src/emacs/64testt/src/../lib -D_REENTRANT -I/usr/include/gtk-3.0
> -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0
> -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/
> -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1
> -I/usr/include/libpng15 -DGDK_DISABLE_DEPRECATION_WARNINGS
> -DGLIB_DISABLE_DEPRECATION_WARNINGS -I/usr/include/freetype2
> -D_REENTRANT -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0
> -I/usr/include/cairo -I/usr/include/libpng15 -I/usr/include/pixman-1
> -I/usr/include/freetype2 -fopenmp -I/usr/include/ImageMagick
> -I/usr/include/libxml2 -I/usr/include/dbus-1.0
> -I/usr/lib/dbus-1.0/include -D_REENTRANT -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -D_REENTRANT -I/usr/include/gconf/2
> -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/freetype2 -MMD -MF deps/.d -MP
> -I/usr/include/p11-kit-1 -D_REENTRANT -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -O0 -ggdb \
> -o temacs vm-limit.o dispnew.o frame.o scroll.o xdisp.o menu.o
> xmenu.o window.o charset.o coding.o category.o ccl.o character.o
> chartab.o bidi.o cm.o term.o terminal.o xfaces.o xterm.o xfns.o
> xselect.o xrdb.o xsmfns.o xsettings.o gtkutil.o emacsgtkfixed.o
> dbusbind.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o
> filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o
> casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o
> doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o
> lread.o syntax.o unexcw.o bytecode.o process.o gnutls.o callproc.o
> region-cache.o sound.o atimer.o doprnt.o intervals.o textprop.o
> composite.o xml.o gfilenotify.o profiler.o sheap.o cygw32.o xfont.o
> ftfont.o xftfont.o ftxfont.o fontset.o fringe.o image.o xgselect.o
> terminfo.o gmalloc.o lastfile.o ../lib/libgnu.a -ltiff -ljpeg
> -lpng -lz -lm -lgif -lXpm -lgtk-3 -latk-bridge-2.0 -lgdk-3 -latk-1.0
> -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage
> -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lgio-2.0 -lXfixes
> -lpangoft2-1.0 -lharfbuzz -lpango-1.0 -lcairo -lpixman-1 -lfontconfig
> -lexpat -lfreetype -lbz2 -lxcb-shm -lxcb-render -lXrender -lXext -lX11
> -lxcb -lXau -lXdmcp -lpng15 -lm -lz -lgmodule-2.0 -lgobject-2.0 -lffi
> -lglib-2.0 -lintl -liconv -lpcre -lSM -lICE -lX11 -lXrender -lXft
> -lXrender -lfontconfig -lexpat -lfreetype -lz -lbz2 -lX11 -lxcb -lXau
> -lXdmcp -lrsvg-2 -lgio-2.0 -lgdk_pixbuf-2.0 -lcairo -lgmodule-2.0
> -lgobject-2.0 -lffi -lpixman-1 -lfontconfig -lexpat -lfreetype -lbz2
> -lpng15 -lm -lz -lxcb-shm -lxcb-render -lXrender -lXext -lglib-2.0
> -lintl -liconv -lpcre -lX11 -lxcb -lXau -lXdmcp -lMagickWand
> -lMagickCore -ldbus-1 -lpthread -lrt -lXrandr -lXext
> -lXrender -lX11 -lxcb -lXau -lXdmcp -lXinerama -lXext -lX11 -lxcb
> -lXau -lXdmcp -lxml2 -lz -liconv -lm -lncurses -lgio-2.0 -lz
> -lgmodule-2.0 -lgobject-2.0 -lffi -lglib-2.0 -lintl -liconv -lpcre
> -lgconf-2 -ldbus-1 -lpthread -lrt -lgio-2.0 -lz -lgmodule-2.0
> -lgobject-2.0 -lffi -lglib-2.0 -lintl -liconv -lpcre -lgobject-2.0
> -lffi -lglib-2.0 -lintl -liconv -lpcre -lfreetype -lz -lbz2
> -lfontconfig -lexpat -lfreetype -lz -lbz2 -lgnutls -lnettle
> -lhogweed -lgmp -lintl -liconv -ltasn1 -lp11-kit -lz -lpthread
> -lgio-2.0 -lz -lgmodule-2.0 -lgobject-2.0 -lffi -lglib-2.0 -lintl
> -liconv -lpcre
> ../lib/libgnu.a(pipe2.o): In function `rpl_pipe2':
> /c/src/emacs/64testt/lib/pipe2.c:144: undefined reference to `setmode'
>
>
> I think the issue here is that pipe2.c shouldn't be compiled on Cygwin.
Sorry, that was a stupid guess, made without even looking at pipe2.c.
But the point is that setmode shouldn't be used on Cygwin (and wasn't
prior to revision 113315).
The following patch allows the build to complete, but I don't know if
it's the right fix:
=== modified file 'lib/pipe2.c'
--- lib/pipe2.c 2013-07-07 18:00:14 +0000
+++ lib/pipe2.c 2013-07-09 12:20:47 +0000
@@ -138,7 +138,7 @@
goto fail;
}
-# if O_BINARY
+# if O_BINARY && !defined (CYGWIN)
if (flags & O_BINARY)
{
setmode (fd[1], O_BINARY);
Ken
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14821
; Package
emacs
.
(Tue, 09 Jul 2013 13:29:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 14821 <at> debbugs.gnu.org (full text, mbox):
On 7/9/2013 8:33 AM, Ken Brown wrote:
> But the point is that setmode shouldn't be used on Cygwin (and wasn't
> prior to revision 113315).
>
> The following patch allows the build to complete, but I don't know if
> it's the right fix:
>
> === modified file 'lib/pipe2.c'
> --- lib/pipe2.c 2013-07-07 18:00:14 +0000
> +++ lib/pipe2.c 2013-07-09 12:20:47 +0000
> @@ -138,7 +138,7 @@
> goto fail;
> }
>
> -# if O_BINARY
> +# if O_BINARY && !defined (CYGWIN)
> if (flags & O_BINARY)
> {
> setmode (fd[1], O_BINARY);
On second thought, instead of the negative '!defined (CYGWIN)', the code
should probably explicitly list the platforms on which setmode *should*
be used. This is how it's done in other uses of setmode.
Ken
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14821
; Package
emacs
.
(Tue, 09 Jul 2013 16:18:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 14821 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 09 Jul 2013 08:33:03 -0400
> From: Ken Brown <kbrown <at> cornell.edu>
> Cc: Paul Eggert <eggert <at> cs.ucla.edu>
>
> But the point is that setmode shouldn't be used on Cygwin
Why not? What if the volume in question was mounted in text mode?
And even if it wasn't, wouldn't setmode be a no-op?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14821
; Package
emacs
.
(Tue, 09 Jul 2013 16:47:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 14821 <at> debbugs.gnu.org (full text, mbox):
On 7/9/2013 12:17 PM, Eli Zaretskii wrote:
>> Date: Tue, 09 Jul 2013 08:33:03 -0400
>> From: Ken Brown <kbrown <at> cornell.edu>
>> Cc: Paul Eggert <eggert <at> cs.ucla.edu>
>>
>> But the point is that setmode shouldn't be used on Cygwin
>
> Why not? What if the volume in question was mounted in text mode?
> And even if it wasn't, wouldn't setmode be a no-op?
No, the symbol 'setmode' is no longer exported in 64bit Cygwin. That's
what caused the build failure. And the code in pipe2.c that calls
setmode should never actually get executed on Cygwin anyway because of this:
int result = pipe2 (fd, flags);
if (!(result < 0 && errno == ENOSYS))
{
have_pipe2_really = 1;
return result;
Ken
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14821
; Package
emacs
.
(Tue, 09 Jul 2013 17:08:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 14821 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 09 Jul 2013 12:46:44 -0400
> From: Ken Brown <kbrown <at> cornell.edu>
> CC: 14821 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
>
> the symbol 'setmode' is no longer exported in 64bit Cygwin.
Are you saying that there's no way of reading files in text mode while
removing CR characters from CR-LF pairs?
> That's
> what caused the build failure. And the code in pipe2.c that calls
> setmode should never actually get executed on Cygwin anyway because of this:
>
> int result = pipe2 (fd, flags);
> if (!(result < 0 && errno == ENOSYS))
> {
> have_pipe2_really = 1;
> return result;
So define setmode away for Cygwin versions that don't have it. Not
everyone runs the bleeding edge.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14821
; Package
emacs
.
(Tue, 09 Jul 2013 17:14:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 14821 <at> debbugs.gnu.org (full text, mbox):
On 7/9/2013 1:07 PM, Eli Zaretskii wrote:
>> Date: Tue, 09 Jul 2013 12:46:44 -0400
>> From: Ken Brown <kbrown <at> cornell.edu>
>> CC: 14821 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
>>
>> the symbol 'setmode' is no longer exported in 64bit Cygwin.
>
> Are you saying that there's no way of reading files in text mode while
> removing CR characters from CR-LF pairs?
>
>> That's
>> what caused the build failure. And the code in pipe2.c that calls
>> setmode should never actually get executed on Cygwin anyway because of this:
>>
>> int result = pipe2 (fd, flags);
>> if (!(result < 0 && errno == ENOSYS))
>> {
>> have_pipe2_really = 1;
>> return result;
>
> So define setmode away for Cygwin versions that don't have it. Not
> everyone runs the bleeding edge.
The discussion is moot now. Paul just submitted a patch to Gnulib that
should fix it in a better way than what I suggested.
Ken
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14821
; Package
emacs
.
(Tue, 09 Jul 2013 17:30:03 GMT)
Full text and
rfc822 format available.
Message #26 received at 14821 <at> debbugs.gnu.org (full text, mbox):
On 07/09/13 10:13, Ken Brown wrote:
> Paul just submitted a patch to Gnulib that should fix it in a better way than what I suggested.
One problem was that I tried too hard to not use Gnulib
in Emacs, so I mistakenly avoided Gnulib's binary-io module.
There appears to be another issue, though -- a porting bug in Gnulib when
using the accept4 or pipe2 modules on Cygwin. As Ken notes I
have tried to fix that problem in Gnulib, and propagated the
fix to Emacs while I was fixing the binary-io issue.
Please try trunk bzr 113348 to see whether these two changes
solve the problem.
Reply sent
to
Ken Brown <kbrown <at> cornell.edu>
:
You have taken responsibility.
(Tue, 09 Jul 2013 19:53:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ken Brown <kbrown <at> cornell.edu>
:
bug acknowledged by developer.
(Tue, 09 Jul 2013 19:53:03 GMT)
Full text and
rfc822 format available.
Message #31 received at 14821-done <at> debbugs.gnu.org (full text, mbox):
On 7/9/2013 1:29 PM, Paul Eggert wrote:
> On 07/09/13 10:13, Ken Brown wrote:
>> Paul just submitted a patch to Gnulib that should fix it in a better way than what I suggested.
>
> One problem was that I tried too hard to not use Gnulib
> in Emacs, so I mistakenly avoided Gnulib's binary-io module.
>
> There appears to be another issue, though -- a porting bug in Gnulib when
> using the accept4 or pipe2 modules on Cygwin. As Ken notes I
> have tried to fix that problem in Gnulib, and propagated the
> fix to Emacs while I was fixing the binary-io issue.
>
> Please try trunk bzr 113348 to see whether these two changes
> solve the problem.
Yes, that fixes it. Thanks.
For the record, the problem I reported was due to the fact that Cygwin
defines setmode as a macro that expands to _setmode. (So I was wrong
when I said that setmode shouldn't be used on Cygwin.) But this
definition is in <io.h>, which wasn't being #included. The problem
showed up only in the 64-bit build because underscores are automatically
prepended in the 32-bit build.
I'm closing the bug.
Ken
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 07 Aug 2013 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 283 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.