unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* building emacs-dynamic-modules on Windows Msys64 mingw32
@ 2014-10-24 22:15 Stephen Leake
  2014-10-25  6:34 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Leake @ 2014-10-24 22:15 UTC (permalink / raw)
  To: emacs-devel

I'm trying to build emacs-dynamic-modules on Windows Msys64 for mingw32.

I've checkout out the git repository with:

git clone https://github.com/aaptel/emacs-dynamic-module.git

In an msys shell, I did:

cd /c/Projects/emacs/emacs-dynamic-module
./autogen.sh
./configure --prefix=/mingw32
make

This failed with "missing ctags.c"; I edited lib-src/Makefile to delete
ctags.exe

Then make got further, but dies with:

make[2]: Leaving directory '/c/Projects/emacs/emacs-dynamic-module/lisp'
if test "no" = "yes"; then \
  rm -f bootstrap-emacs.exe; \
  ln temacs.exe bootstrap-emacs.exe; \
else \
  ./temacs --batch --load loadup bootstrap || exit 1; \
  test "X" = X ||  -zex emacs.exe; \
  mv -f emacs.exe bootstrap-emacs.exe; \
fi
/bin/sh: line 4: ./temacs: cannot execute binary file: Exec format error
Makefile:798: recipe for target 'bootstrap-emacs.exe' failed
make[1]: *** [bootstrap-emacs.exe] Error 1
make[1]: Leaving directory '/c/Projects/emacs/emacs-dynamic-module/src'
Makefile:376: recipe for target 'src' failed
make: *** [src] Error 2


I don't have this problem when building emacs-24.3.94 from the tarball.

What branch is emacs-dynamic-module derived from?

Do we need to merge from trunk or emacs-24 to fix building with Msys64?

-- 
-- Stephe



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

* Re: building emacs-dynamic-modules on Windows Msys64 mingw32
  2014-10-24 22:15 building emacs-dynamic-modules on Windows Msys64 mingw32 Stephen Leake
@ 2014-10-25  6:34 ` Eli Zaretskii
  2014-10-25 12:25   ` Stephen Leake
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2014-10-25  6:34 UTC (permalink / raw)
  To: Stephen Leake; +Cc: emacs-devel

> From: Stephen Leake <stephen_leake@stephe-leake.org>
> Date: Fri, 24 Oct 2014 17:15:21 -0500
> 
> make[2]: Leaving directory '/c/Projects/emacs/emacs-dynamic-module/lisp'
> if test "no" = "yes"; then \
>   rm -f bootstrap-emacs.exe; \
>   ln temacs.exe bootstrap-emacs.exe; \
> else \
>   ./temacs --batch --load loadup bootstrap || exit 1; \
>   test "X" = X ||  -zex emacs.exe; \
>   mv -f emacs.exe bootstrap-emacs.exe; \
> fi
> /bin/sh: line 4: ./temacs: cannot execute binary file: Exec format error

What kind of file is 'temacs'?  Can you invoke it from the Windows cmd
prompt?



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

* Re: building emacs-dynamic-modules on Windows Msys64 mingw32
  2014-10-25  6:34 ` Eli Zaretskii
@ 2014-10-25 12:25   ` Stephen Leake
  2014-10-25 12:52     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Leake @ 2014-10-25 12:25 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Stephen Leake <stephen_leake@stephe-leake.org>
>> Date: Fri, 24 Oct 2014 17:15:21 -0500
>> 
>> make[2]: Leaving directory '/c/Projects/emacs/emacs-dynamic-module/lisp'
>> if test "no" = "yes"; then \
>>   rm -f bootstrap-emacs.exe; \
>>   ln temacs.exe bootstrap-emacs.exe; \
>> else \
>>   ./temacs --batch --load loadup bootstrap || exit 1; \
>>   test "X" = X ||  -zex emacs.exe; \
>>   mv -f emacs.exe bootstrap-emacs.exe; \
>> fi
>> /bin/sh: line 4: ./temacs: cannot execute binary file: Exec format error
>
> What kind of file is 'temacs'?  Can you invoke it from the Windows cmd
> prompt?

No:

    'temacs.exe' is not recognized as an internal or external command,
    operable program or batch file.

I discovered I have 'objdump' from Cygwin; it reports:

stephe@takver$ objdump -f temacs.exe

temacs.exe:     file format pei-i386
architecture: i386, flags 0x0000013a:
EXEC_P, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, D_PAGED
start address 0x001372f0

stephe@takver$ objdump -fh temacs.exe

temacs.exe:     file format pei-i386
architecture: i386, flags 0x0000013a:
EXEC_P, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, D_PAGED
start address 0x001372f0

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         001b5c09  00000fff  00000fff  000005ff  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
  1 .data         001cdf78  001b7000  001b7000  001b6400  2**6
                  CONTENTS, ALLOC, LOAD, DATA
  2 .rdata        0001db10  00385000  00385000  00384400  2**6
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .eh_frame     00033810  003a3000  003a3000  003a2000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .bss          00b5c480  003d7000  003d7000  00000000  2**6
                  ALLOC
  5 .idata        00003a8c  00f34000  00f34000  003d5a00  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  6 .CRT          00000034  00f38000  00f38000  003d9600  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  7 .tls          00000020  00f39000  00f39000  003d9800  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  8 .rsrc         0000d7f4  00f3a000  00f3a000  003d9a00  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  9 .debug_aranges 00001388  00f48000  00f48000  003e7200  2**3
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_info   00631255  00f4a000  00f4a000  003e8600  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_abbrev 0002590c  0157c000  0157c000  00a19a00  2**0
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_line   000ca14e  015a2000  015a2000  00a3f400  2**0
                  CONTENTS, READONLY, DEBUGGING
 13 .debug_str    00011e3c  0166d000  0166d000  00b09600  2**0
                  CONTENTS, READONLY, DEBUGGING
 14 .debug_loc    002bd822  0167f000  0167f000  00b1b600  2**0
                  CONTENTS, READONLY, DEBUGGING
 15 .debug_macro  02e3ceae  0193d000  0193d000  00dd9000  2**0
                  CONTENTS, READONLY, DEBUGGING
 16 .debug_ranges 0005ab98  0477a000  0477a000  03c16000  2**0
                  CONTENTS, READONLY, DEBUGGING


That's very close to the temacs.exe I built from the 24.3.94 tarball; it
has an additional section:

 17 EMHEAP        02a00000  04eaa000  04eaa000  00000000  2**2
                  ALLOC


Is there some other binutils tool that might provide more detailed info
on what's wrong with this file?

-- 
-- Stephe



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

* Re: building emacs-dynamic-modules on Windows Msys64 mingw32
  2014-10-25 12:25   ` Stephen Leake
@ 2014-10-25 12:52     ` Eli Zaretskii
  2014-10-25 13:49       ` Aurélien Aptel
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2014-10-25 12:52 UTC (permalink / raw)
  To: Stephen Leake; +Cc: emacs-devel

> From: Stephen Leake <stephen_leake@stephe-leake.org>
> Date: Sat, 25 Oct 2014 07:25:36 -0500
> 
> stephe@takver$ objdump -f temacs.exe
> 
> temacs.exe:     file format pei-i386
> architecture: i386, flags 0x0000013a:
> EXEC_P, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, D_PAGED
> start address 0x001372f0

The start address looks wrong (too low).

Can you show the log of the end of the build process, starting with
the link command?

I actually find this all very strange: the git repo claims to have
started in July 2014, but doesn't say which Emacs branch it was forked
off.  And I don't think we had any problems like this in July on any
of the 2 active branches.

So maybe the person who did that should chime in and explain what he
did, instead of us trying to second-guess him.

Alternatively, make a diff since the first to the last commit in this
repo, and then apply it to the current trunk.

> stephe@takver$ objdump -fh temacs.exe
> 
> temacs.exe:     file format pei-i386
> architecture: i386, flags 0x0000013a:
> EXEC_P, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, D_PAGED
> start address 0x001372f0
> 
> Sections:
> Idx Name          Size      VMA       LMA       File off  Algn
>   0 .text         001b5c09  00000fff  00000fff  000005ff  2**4
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
>   1 .data         001cdf78  001b7000  001b7000  001b6400  2**6
>                   CONTENTS, ALLOC, LOAD, DATA
>   2 .rdata        0001db10  00385000  00385000  00384400  2**6
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   3 .eh_frame     00033810  003a3000  003a3000  003a2000  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   4 .bss          00b5c480  003d7000  003d7000  00000000  2**6
>                   ALLOC
>   5 .idata        00003a8c  00f34000  00f34000  003d5a00  2**2
>                   CONTENTS, ALLOC, LOAD, DATA
>   6 .CRT          00000034  00f38000  00f38000  003d9600  2**2
>                   CONTENTS, ALLOC, LOAD, DATA
>   7 .tls          00000020  00f39000  00f39000  003d9800  2**2
>                   CONTENTS, ALLOC, LOAD, DATA
>   8 .rsrc         0000d7f4  00f3a000  00f3a000  003d9a00  2**2
>                   CONTENTS, ALLOC, LOAD, DATA
>   9 .debug_aranges 00001388  00f48000  00f48000  003e7200  2**3
>                   CONTENTS, READONLY, DEBUGGING
>  10 .debug_info   00631255  00f4a000  00f4a000  003e8600  2**0
>                   CONTENTS, READONLY, DEBUGGING
>  11 .debug_abbrev 0002590c  0157c000  0157c000  00a19a00  2**0
>                   CONTENTS, READONLY, DEBUGGING
>  12 .debug_line   000ca14e  015a2000  015a2000  00a3f400  2**0
>                   CONTENTS, READONLY, DEBUGGING
>  13 .debug_str    00011e3c  0166d000  0166d000  00b09600  2**0
>                   CONTENTS, READONLY, DEBUGGING
>  14 .debug_loc    002bd822  0167f000  0167f000  00b1b600  2**0
>                   CONTENTS, READONLY, DEBUGGING
>  15 .debug_macro  02e3ceae  0193d000  0193d000  00dd9000  2**0
>                   CONTENTS, READONLY, DEBUGGING
>  16 .debug_ranges 0005ab98  0477a000  0477a000  03c16000  2**0
>                   CONTENTS, READONLY, DEBUGGING
> 
> 
> That's very close to the temacs.exe I built from the 24.3.94 tarball; it
> has an additional section:
> 
>  17 EMHEAP        02a00000  04eaa000  04eaa000  00000000  2**2
>                   ALLOC
> 
> 
> Is there some other binutils tool that might provide more detailed info
> on what's wrong with this file?

How about 'file' (not from Binutils)?

Also, what does "od -c -N2" says about it?



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

* Re: building emacs-dynamic-modules on Windows Msys64 mingw32
  2014-10-25 12:52     ` Eli Zaretskii
@ 2014-10-25 13:49       ` Aurélien Aptel
  2014-10-25 15:09         ` Stephen Leake
  2014-10-27 13:13         ` Aurélien Aptel
  0 siblings, 2 replies; 9+ messages in thread
From: Aurélien Aptel @ 2014-10-25 13:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stephen Leake, Emacs development discussions

Hi,

Stephen has the same bug I described in my announcement (on a linux system).
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00292.html

On Sat, Oct 25, 2014 at 2:52 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> I actually find this all very strange: the git repo claims to have
> started in July 2014, but doesn't say which Emacs branch it was forked
> off.  And I don't think we had any problems like this in July on any
> of the 2 active branches.
>
> So maybe the person who did that should chime in and explain what he
> did, instead of us trying to second-guess him.

I downloaded a tarball of the repo at the last commit on the trunk
branch but I forgot to write down the actual commit id, sorry.
The only thing I have is the creation time of the files in the zip: 2014-07-01.

My working directory builds successfully but it seems cloning the repo
breaks it. I suspect some files that are needed for the build were not
added (because of .gitignore maybe) when I created the repo from the
zip content.
Given the previous date, my repo was probably base on a commit between
rev 117456 and rev 117461 included (6 commits).



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

* Re: building emacs-dynamic-modules on Windows Msys64 mingw32
  2014-10-25 13:49       ` Aurélien Aptel
@ 2014-10-25 15:09         ` Stephen Leake
  2014-10-27 13:13         ` Aurélien Aptel
  1 sibling, 0 replies; 9+ messages in thread
From: Stephen Leake @ 2014-10-25 15:09 UTC (permalink / raw)
  To: emacs-devel

Aurélien Aptel <aurelien.aptel+emacs@gmail.com> writes:

> Stephen has the same bug I described in my announcement (on a linux system).
> http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00292.html

I only see the "missing ctags.c" problem there, not the "can't execute
temacs" problem.

I just compiled on Debian; no temacs problems there.

I gather you are not building on Windows?

> On Sat, Oct 25, 2014 at 2:52 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> I actually find this all very strange: the git repo claims to have
>> started in July 2014, but doesn't say which Emacs branch it was forked
>> off.  And I don't think we had any problems like this in July on any
>> of the 2 active branches.
>>
>> So maybe the person who did that should chime in and explain what he
>> did, instead of us trying to second-guess him.
>
> I downloaded a tarball of the repo at the last commit on the trunk
> branch but I forgot to write down the actual commit id, sorry.
> The only thing I have is the creation time of the files in the zip: 2014-07-01.
>
> My working directory builds successfully but it seems cloning the repo
> breaks it. I suspect some files that are needed for the build were not
> added (because of .gitignore maybe) when I created the repo from the
> zip content.
> Given the previous date, my repo was probably base on a commit between
> rev 117456 and rev 117461 included (6 commits).

Ok.

I can play with things on Debian for a while, but I need this to work on
Windows as well (plus my Windows box is a lot faster than my Debian box :).

For Windows, I think the best way forward is to wait for the
bzr/git switch (nov 11), and then you can create a proper branch in the
new repo, apply the patches from your repo, and I can clone from there.

-- 
-- Stephe



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

* Re: building emacs-dynamic-modules on Windows Msys64 mingw32
  2014-10-25 13:49       ` Aurélien Aptel
  2014-10-25 15:09         ` Stephen Leake
@ 2014-10-27 13:13         ` Aurélien Aptel
  2014-10-27 13:32           ` Andreas Schwab
  2014-10-27 13:35           ` Aurélien Aptel
  1 sibling, 2 replies; 9+ messages in thread
From: Aurélien Aptel @ 2014-10-27 13:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stephen Leake, Emacs development discussions

On Sat, Oct 25, 2014 at 3:49 PM, Aurélien Aptel
<aurelien.aptel+emacs@gmail.com> wrote:
> My working directory builds successfully but it seems cloning the repo
> breaks it. I suspect some files that are needed for the build were not
> added (because of .gitignore maybe) when I created the repo from the
> zip content.

Indeed, it turns out lib-src/ctags.c is explicitely marked as ignored
by lib-src/.gitignore but is present in the repo. Same thing for all
the files in etc/icons which are ignored by etc/.gitignore. Is this a
bug?



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

* Re: building emacs-dynamic-modules on Windows Msys64 mingw32
  2014-10-27 13:13         ` Aurélien Aptel
@ 2014-10-27 13:32           ` Andreas Schwab
  2014-10-27 13:35           ` Aurélien Aptel
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2014-10-27 13:32 UTC (permalink / raw)
  To: Aurélien Aptel
  Cc: Eli Zaretskii, Stephen Leake, Emacs development discussions

Aurélien Aptel <aurelien.aptel+emacs@gmail.com> writes:

> Indeed, it turns out lib-src/ctags.c is explicitely marked as ignored
> by lib-src/.gitignore

This is likely a typo (should have been ctags).

In general there is nothing wrong with patterns in .gitignore matching
tracked files, since the ignore patterns are only relevant for untracked
files.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



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

* Re: building emacs-dynamic-modules on Windows Msys64 mingw32
  2014-10-27 13:13         ` Aurélien Aptel
  2014-10-27 13:32           ` Andreas Schwab
@ 2014-10-27 13:35           ` Aurélien Aptel
  1 sibling, 0 replies; 9+ messages in thread
From: Aurélien Aptel @ 2014-10-27 13:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stephen Leake, Emacs development discussions

On Mon, Oct 27, 2014 at 2:13 PM, Aurélien Aptel
<aurelien.aptel+emacs@gmail.com> wrote:
> the files in etc/icons which are ignored by etc/.gitignore. Is this a

It's etc/images/icons, sorry.



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

end of thread, other threads:[~2014-10-27 13:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 22:15 building emacs-dynamic-modules on Windows Msys64 mingw32 Stephen Leake
2014-10-25  6:34 ` Eli Zaretskii
2014-10-25 12:25   ` Stephen Leake
2014-10-25 12:52     ` Eli Zaretskii
2014-10-25 13:49       ` Aurélien Aptel
2014-10-25 15:09         ` Stephen Leake
2014-10-27 13:13         ` Aurélien Aptel
2014-10-27 13:32           ` Andreas Schwab
2014-10-27 13:35           ` Aurélien Aptel

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).