From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Building Emacs on MSYS2 (was: Build failure for Emacs master) Date: Thu, 14 Apr 2016 17:58:09 +0200 Message-ID: <878u0gyyge.fsf_-_@wanadoo.es> References: <56CCD91E.6070507@alice.it> <83egc2ixji.fsf@gnu.org> <56CD798D.7060102@alice.it> <56CD8408.1000701@alice.it> <83wppuggb4.fsf@gnu.org> <56CE2CA7.5050906@alice.it> <83io1cg2pt.fsf@gnu.org> <56DA0327.2030009@alice.it> <83oaatxu72.fsf@gnu.org> <570C4307.6050907@alice.it> <83k2k2g82s.fsf@gnu.org> <570EA823.1010404@alice.it> <570EBADD.2060604@cs.ucla.edu> <570EC198.5090407@alice.it> <570EF300.3050104@cs.ucla.edu> <570F4EC7.3060403@alice.it> <83twj4dx7q.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1460649532 10955 80.91.229.3 (14 Apr 2016 15:58:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Apr 2016 15:58:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 14 17:58:37 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aqjfB-0002nH-2s for ged-emacs-devel@m.gmane.org; Thu, 14 Apr 2016 17:58:37 +0200 Original-Received: from localhost ([::1]:42222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqjf9-0007j3-TY for ged-emacs-devel@m.gmane.org; Thu, 14 Apr 2016 11:58:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqjf2-0007Zf-3w for emacs-devel@gnu.org; Thu, 14 Apr 2016 11:58:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqjex-0003cn-1f for emacs-devel@gnu.org; Thu, 14 Apr 2016 11:58:27 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:57241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqjew-0003by-QZ for emacs-devel@gnu.org; Thu, 14 Apr 2016 11:58:22 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aqjeq-0002c0-N7 for emacs-devel@gnu.org; Thu, 14 Apr 2016 17:58:16 +0200 Original-Received: from 120.red-88-22-75.staticip.rima-tde.net ([88.22.75.120]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Apr 2016 17:58:16 +0200 Original-Received: from ofv by 120.red-88-22-75.staticip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Apr 2016 17:58:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 100 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 120.red-88-22-75.staticip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) Cancel-Lock: sha1:jj71WThyjdoyI62NC/WbGWYNBlQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:202909 Archived-At: Eli Zaretskii writes: >> In MSYS2 and other OS there are *-git packages just to have the last >> development source not because that people aims to develop and maintain >> the applications of those packages.. > > I'd urge all those who are tracking development sources to please use > the official established build procedure. Using 3rd-party packages > whose procedures deviate from the project instructions is susceptible > to bumping into problems that stem from using those deviant > procedures, which is an added maintenance burden I think we'd like to > avoid. Also, doing so means less testing for the official build > procedures. Currently this is the code for configuring the build of emacs-git on MSYS2 MinGW-packages: build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "build-${MINGW_CHOST}" local with_wide_int='no' if test "${CARCH}" == 'x86_64'; then with_wide_int='yes' fi CPPFLAGS="-DNDEBUG -isystem ${MINGW_PREFIX}/include" CFLAGS="-pipe -O3 -fomit-frame-pointer -funroll-loops" LDFLAGS="-s -Wl,-s" "${srcdir}/${_realname}/configure" \ --prefix="${MINGW_PREFIX}" \ --build="${MINGW_CHOST}" \ --with-wide-int="${with_wide_int}" \ --with-sound="yes" \ --with-file-notification="yes" \ --without-gpm \ --without-gconf \ --without-gsettings \ --without-selinux make } Apart from setting with_wide_int and adding some (unnecessary, IMHO) optimization options, it looks like a fairly standard configuration. The package contains two patches too. This one that looks like trying to avoid a link problem: --- src/image.c.orig 2014-10-15 14:18:29.088716000 +0200 +++ src/image.c 2014-10-15 15:54:12.407522800 +0200 @@ -7862,7 +7862,7 @@ }; #if defined HAVE_NTGUI && defined WINDOWSNT -static bool init_imagemagick_functions (void); +#define init_imagemagick_functions NULL #else #define init_imagemagick_functions NULL #endif and this one that seems related to locating the source directory: --- src/lread.c.orig 2014-11-04 20:29:22.129549000 +0100 +++ src/lread.c 2014-11-04 22:33:07.346414100 +0100 @@ -4351,6 +4351,12 @@ } /* Vinstallation_directory != Vsource_directory */ } /* if Vinstallation_directory */ + else + { + Vsource_directory + = Fexpand_file_name (build_string ("../"), + Fcar (decode_env_path (0, PATH_DATA, 0))); + } } else /* !initialized */ { > If you can convince the MSYS2 maintainers to adopt the official build > procedure, it would be even better. I can change the emacs-git package for not adding those optimization options and not setting with-wide-int. Do you think that's enough? > Failing that, please consider > switching back to what the project recommends, what is documented in > the relevant INSTALL documents. Because MSYS2 does not distribute binaries for emacs-git, I guess that the number of people who currently uses the PKGBUILD shown above is very small. AFAIK Angelo and others that build Emacs on MSYS2 are not using the PKGBUILD, but following the recipe on the Emacs' docs (possibly with their own personal modifications.)