all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* building Emacs on Msys2/mingw32
@ 2014-09-08 15:54 Stephen Leake
  2014-09-08 20:14 ` Óscar Fuentes
  2014-09-09 13:28 ` Eli Zaretskii
  0 siblings, 2 replies; 16+ messages in thread
From: Stephen Leake @ 2014-09-08 15:54 UTC (permalink / raw)
  To: emacs-devel

I've succesfully built Emacs on Msys2/mingw32. After I got some msys2
install issues sorted out, it went quite smoothly; almost as well as a
typical install on a Linxu/gnu box!

Thanks to all who made this possible!


I have suggested changes to the Msys2 people to iron out the Msys2
install issues I had.


To address the "almost" above:

I built from the current pretest tarball,
http://alpha.gnu.org/gnu/emacs/pretest/emacs-24.3.93.tar.xz

I had to override the guessed build machine on the configure line:

    $ ./configure --build=i686-pc-mingw32 --prefix=/mingw32

config.guess returns x86_64-pc-msys; configure rejects this.

x86_64-pc-msys is the correct host identifier, but we will never
actually build an Emacs for that machine; we will always want to build
for i686-pc-mingw32 or x86_64-pc-mingw32.

It might make sense to have configure translate x86_64-pc-msys to
x86_64-pc-mingw32, and i686-pc-msys to i686-pc-mingw32.

I'm not clear what MSYS (as opposed to MSYS2) does about this.

At least, this case should now be mentioned in nt/INSTALL. Here's a
suggested patch:

--- INSTALL	2014-09-08 10:42:54.523175900 -0500
+++ INSTALL.orig	2014-06-04 23:33:18.000000000 -0500
@@ -14,10 +14,10 @@
 
 * For the brave (a.k.a. "impatient"):
 
-  For those who have a working MSYS/MSYS2/MinGW development
-  environment and are comfortable with running Posix configure
-  scripts, here are the concise instructions for configuring and
-  building the native Windows binary of Emacs with these tools:
+  For those who have a working MSYS/MinGW development environment and
+  are comfortable with running Posix configure scripts, here are the
+  concise instructions for configuring and building the native Windows
+  binary of Emacs with these tools:
 
   0. Start the MSYS Bash window.  Everything else below is done from
      that window's Bash prompt.
@@ -41,14 +41,6 @@
 
         ./configure --prefix=PREFIX ...
 
-      - If you are building with MSYS2, you must specify the build machine:
-
-        --build=i686-pc-mingw32
-
-        or
-
-        --build=x86_64-pc-mingw32
-        
      It is always preferable to use --prefix to configure Emacs for
      some specific location of its installed tree; the default
      /usr/local is not suitable for Windows (see the detailed

@@ -83,16 +75,6 @@
   If these short instructions somehow fail, read the rest of this
   file.
 
-* Installing MinGW32 and MSYS2
-
-  Follow the instructions at http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/
-
-  Install the compiler, and tar:
-
-  $ pacman -S mingw-w64-i686-toolchain tar
-
-  Follow the instructions above to build emacs.
-  
 * Installing MinGW and MSYS
 
   Make sure you carefully read the following two sections in their

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: building Emacs on Msys2/mingw32
@ 2014-09-08 21:54 Angelo Graziosi
  2014-09-08 22:53 ` Óscar Fuentes
  2014-09-09 13:42 ` Eli Zaretskii
  0 siblings, 2 replies; 16+ messages in thread
From: Angelo Graziosi @ 2014-09-08 21:54 UTC (permalink / raw)
  To: Emacs developers

Óscar Fuentes wrote:
> All this and the remaining removed text is unnecessary if you use
> mingw32_shell.bat

Hmm... This was what I thought. I build the W64 binaries of Emacs, and I 
DO use mingw64_shell.bat, where:

$ echo $PATH
/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/usr/bin/vendor_perl:/usr/bin/core_perl

$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-4.9.1/configure --prefix=/mingw64 
--with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 
--host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 
--with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include 
--libexecdir=/mingw64/lib 
--with-gxx-include-dir=/mingw64/include/c++/4.9.1 --enable-bootstrap 
--with-arch=x86-64 --with-tune=generic 
--enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared 
--enable-static --enable-libatomic --enable-threads=posix 
--enable-graphite --enable-fully-dynamic-string 
--enable-libstdcxx-time=yes --disable-libstdcxx-pch 
--disable-libstdcxx-debug --enable-cloog-backend=isl 
--enable-version-specific-runtime-libs --disable-cloog-version-check 
--disable-isl-version-check --enable-lto --enable-libgomp 
--disable-multilib --enable-checking=release --disable-rpath 
--disable-win32-registry --disable-nls --disable-werror 
--disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 
--with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 
--with-cloog=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' 
--with-bugurl=http://sourceforge.net/projects/msys2 --with-gnu-as 
--with-gnu-ld
Thread model: posix
gcc version 4.9.1 (Rev3, Built by MSYS2 project)

and I build with

$ ./autogen.sh
$ ./configure --prefix=/Emacs --with-wide-int --build=x86_64-w64-mingw32 
--without-imagemagick 'CFLAGS=-I/mingw64/include/noX -Ofast -g0 -pipe' 
LDFLAGS=-pipe

$ make -j3


If I remove the "--build=x86_64-w64-mingw32" option to configure, the 
build is configure for x86_64-pc-mingw64,

[...]
Configured for `x86_64-pc-mingw64'.

   Where should the build process find the source code?    .
   What compiler should emacs be built with?               gcc 
-std=gnu99  -I/mingw64/include/noX -Ofast -g0 -pipe
   Should Emacs use the GNU version of malloc?             no
     (The GNU allocators don't work with this system configuration.)
   Should Emacs use a relocating allocator for buffers?    no
   Should Emacs use mmap(2) for buffer allocation?         yes
   What window system should Emacs use?                    w32
   What toolkit should Emacs use?                          none
   Where do we find X Windows header files?                NONE
   Where do we find X Windows libraries?                   NONE
   Does Emacs use -lXaw3d?                                 no
   Does Emacs use -lXpm?                                   yes
   Does Emacs use -ljpeg?                                  yes
   Does Emacs use -ltiff?                                  yes
   Does Emacs use a gif library?                           yes
   Does Emacs use a png library?                           yes
   Does Emacs use -lrsvg-2?                                yes
   Does Emacs use imagemagick?                             no
   Does Emacs support sound?                               no
   Does Emacs use -lgpm?                                   no
   Does Emacs use -ldbus?                                  yes
   Does Emacs use -lgconf?                                 no
   Does Emacs use GSettings?                               no
   Does Emacs use a file notification library?             yes (w32)
   Does Emacs use access control lists?                    yes
   Does Emacs use -lselinux?                               no
   Does Emacs use -lgnutls?                                yes
   Does Emacs use -lxml2?                                  yes
   Does Emacs use -lfreetype?                              no
   Does Emacs use -lm17n-flt?                              no
   Does Emacs use -lotf?                                   no
   Does Emacs use -lxft?                                   no
   Does Emacs directly use zlib?                           yes
   Does Emacs use toolkit scroll bars?                     yes
[...]

and 'make -j3' fails at some point.. Instead, with that configure 
option, the build is configure for 'x86_64-w64-mingw32' and it is 
completed successfully...

So, may you explain how you build Emacs on MSYS2?

TIA,
  Angelo.



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

end of thread, other threads:[~2014-09-10  3:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-08 15:54 building Emacs on Msys2/mingw32 Stephen Leake
2014-09-08 20:14 ` Óscar Fuentes
2014-09-09  5:00   ` Stephen Leake
2014-09-09 10:39     ` Chris Zheng
2014-09-09 13:58       ` Stephen Leake
2014-09-09 13:48     ` Eli Zaretskii
2014-09-09 13:28 ` Eli Zaretskii
2014-09-09 22:03   ` Stephen Leake
2014-09-10  3:22     ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2014-09-08 21:54 Angelo Graziosi
2014-09-08 22:53 ` Óscar Fuentes
2014-09-09 13:42 ` Eli Zaretskii
2014-09-09 17:53   ` Angelo Graziosi
2014-09-09 18:11     ` Eli Zaretskii
2014-09-09 18:15       ` Eli Zaretskii
2014-09-09 19:50         ` Fabrice Popineau

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.