unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dani Moncayo <dmoncayo@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16099@debbugs.gnu.org
Subject: bug#16099: 24.3.50; Build failure, undefined function `cl-member'
Date: Thu, 12 Dec 2013 15:08:08 +0100	[thread overview]
Message-ID: <CAH8Pv0gX-nYpgkEbj9M0fqMGpR1bOJ1h9uiouyN-BZ4+fF3jyA@mail.gmail.com> (raw)
In-Reply-To: <83iouvwbvh.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 4697 bytes --]

On Wed, Dec 11, 2013 at 6:12 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Tue, 10 Dec 2013 21:57:04 +0100
>> From: Dani Moncayo <dmoncayo@gmail.com>
>>
>> I think that it would be possible that the path to "unmsys" had the
>> form "/foo/bar".  For example if someone has the source code tree
>> under his MSYS tree and invokes the configure script with an absolute
>> MSYS path (e.g. "/home/user/emacs/trunk/configure").
>>
>> In that case, 'unmsys--file-name' will not translate the MSYS path
>> ("/home/user/...") as expected.
>
> How is this different from your use case, which is already handled?

The difference is this:  I invoke the configure script (from the build
dir) using a relative path, which works with the current trunk.  But
if someone invokes the configure script using an absolute path which
doesn't match the "/c/foo/bar" pattern (e.g.
"/home/user-foo/emacs/trunk/configure"), the build will fail.

I've myself reproduced the problem this morning (visit the attached
file "bootstrap1.log" and look there for "unmsys" - you'll see the
problem clearly).

>> > Not sure what you meant here.  If you mean your use case of building
>> > inside the MSYS tree, then that one should be (and was) handled by
>> > different means.
>>
>> It was handled in one place (for generating the native paths in
>> 'src/epaths.h'), but it seems that there are more places where a
>> translation to native w32 format is performed, and it would be nice if
>> that translation was as reliable as possible.
>
> Does it make any trouble?  If so, please report the details (and I
> still don't understand how it works for you, since that's exactly what
> you do).

This is answered above.  Again: the problem arises with _absolute_
MSYS path which don't match the "/c/foo/bar" pattern.

> If we have no specific problems, let's leave this alone, since it is
> not broken.  Our aim is not to translate file names, or aim is to
> build Emacs reliably and correctly.

Indeed, that is our aim, and for that reason I'd like to make the MSYS
build procedure more reliable/robust than is right now, and I think I
know how to do it (see below).

>> I agree that the MSYS shell auto-conversion of paths can be tricky,
>> but we still don't know the origin of this problem.
>
> What problem are you talking about?  The lack of auto-conversion?  Its
> origin is well known: MSYS simply tries to play it safe, and doesn't
> auto-convert unless it is absolutely sure it sees a file name.

Well, I've been reading a bit about the rules used by the MSYS bash
for auto-translating posix-type PATHS to Windows native paths [1], and
I think I now understand the problem.

Ideally, the MSYS bash should be smart enough to correctly translate
paths as needed when invoking native w32 programs, but the behavior is
not always what we want.  For example, in 'lisp/Makefile.in' we have:

 custom-deps: doit
    $(setwins_almost); \
    echo Directories: $$wins; \
    $(emacs) -l cus-dep \
     --eval '(setq generated-custom-dependencies-file
(unmsys--file-name "$(srcdir)/cus-load.el"))' \
     -f custom-make-dependencies $$wins

You had to try to manually translate the path "$(srcdir)/cus-load.el"
with 'unmsys--file-name' because the MSYS bash didn't do it
automatically as expected (if the path was a standalone argument, it
would have been translated as expected, but the path is part of a more
complex argument, and MSYS doesn't handle that case well.).

But your way of implementing the translation doesn't work with all
types of MSYS paths, as we've already seen.

After doing some test, I've got a path that seems to fix this problem
(see "patch.v3.diff" attached).

The file "bootstrap2.log" is the output of my "make bootstrap" with
the patch applied.  You can compare it with "bootstrap1.log" to see
how the problems are indeed fixed.

If you think it is correct, I may commit it to the trunk.

PS: The only "tricky" part of the patch is this:

  leimdir=`${srcdir}/../build-aux/msys-to-w32 "${leimdir}"` && \
  ${RUN_EMACS} -l international/quail \
    --eval "(update-leim-list-file \"$${leimdir}\");"
                                                   ^
                                                   ^
                                                   ^
This semicolon does not alter the effect of the lisp expression, but
prevents MSYS from altering the argument, since such argument (in the
MSYS case) will have a colon ("c:/foo/bar") and that would make MSYS
think about it as a list of posix paths which need translation to
native windows format.  See the rules in [1].  (This technique has
been employed in several points)

-- 
Dani Moncayo

[1] http://www.mingw.org/wiki/Posix_path_conversion

[-- Attachment #2: files.zip --]
[-- Type: application/zip, Size: 68499 bytes --]

  reply	other threads:[~2013-12-12 14:08 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 12:13 bug#16099: 24.3.50; Build failure, undefined function `cl-member' Richard Copley
2013-12-10 16:46 ` Eli Zaretskii
2013-12-10 16:53   ` Richard Copley
2013-12-10 17:09     ` Glenn Morris
2013-12-10 18:05     ` Eli Zaretskii
2013-12-10 18:13       ` Richard Copley
2013-12-10 18:16         ` Glenn Morris
2013-12-10 18:35         ` Eli Zaretskii
     [not found] ` <handler.16099.D16099.138669538824350.notifdone@debbugs.gnu.org>
2013-12-10 17:42   ` bug#16099: closed (Re: bug#16099: 24.3.50; Build failure, undefined function `cl-member') Richard Copley
2013-12-10 17:55     ` Richard Copley
2013-12-10 18:12       ` bug#16099: 24.3.50; Build failure, undefined function `cl-member' Glenn Morris
2013-12-10 18:25         ` Richard Copley
2013-12-10 18:34           ` Eli Zaretskii
2013-12-10 18:37             ` Richard Copley
2013-12-10 18:59               ` Eli Zaretskii
2013-12-10 20:47                 ` Richard Copley
2013-12-10 20:58                   ` Eli Zaretskii
2013-12-10 21:08                     ` Glenn Morris
2013-12-11 17:07                       ` Eli Zaretskii
2013-12-10 18:42             ` Glenn Morris
2013-12-10 18:48               ` Glenn Morris
2013-12-10 18:58                 ` Eli Zaretskii
2013-12-10 20:09                 ` Dani Moncayo
2013-12-10 20:31                   ` Eli Zaretskii
2013-12-10 20:57                     ` Dani Moncayo
2013-12-11 17:12                       ` Eli Zaretskii
2013-12-12 14:08                         ` Dani Moncayo [this message]
2013-12-12 16:33                           ` Eli Zaretskii
2013-12-12 19:53                             ` Dani Moncayo
2013-12-14  9:33                               ` Dani Moncayo
2013-12-14  9:56                                 ` Eli Zaretskii
2013-12-14 20:08                                 ` Glenn Morris
2013-12-14 21:32                                   ` Dani Moncayo
2013-12-14 21:43                                     ` Glenn Morris
2013-12-14 21:56                                       ` Dani Moncayo
2013-12-10 18:58               ` Eli Zaretskii
2013-12-10 18:13     ` bug#16099: closed (Re: bug#16099: 24.3.50; Build failure, undefined function `cl-member') Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH8Pv0gX-nYpgkEbj9M0fqMGpR1bOJ1h9uiouyN-BZ4+fF3jyA@mail.gmail.com \
    --to=dmoncayo@gmail.com \
    --cc=16099@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).