all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#15675: the configure script invoked before make
@ 2013-10-21 17:02 “Adrian”
  2013-10-23  6:26 ` Glenn Morris
  0 siblings, 1 reply; 12+ messages in thread
From: “Adrian” @ 2013-10-21 17:02 UTC (permalink / raw)
  To: 15675

Downloaded and put the emacs24.3 sources in a directory whose name contained
1 space. The configure script seemed not able to interpret the directory
name properly, as it could only grasp the word preceeding the space in the 
directory name. I verified that this was the problem, as i changed the directory
name to contain no spaces and the configure script ran beautifully.





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

* bug#15675: the configure script invoked before make
  2013-10-21 17:02 bug#15675: the configure script invoked before make “Adrian”
@ 2013-10-23  6:26 ` Glenn Morris
  2013-10-24  1:12   ` Andy Moreton
  0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2013-10-23  6:26 UTC (permalink / raw)
  To: 15675-done

Version: 24.4

“Adrian” wrote:

> Downloaded and put the emacs24.3 sources in a directory whose name
> contained 1 space. The configure script seemed not able to interpret
> the directory name properly, as it could only grasp the word
> preceeding the space in the directory name. I verified that this was
> the problem, as i changed the directory name to contain no spaces and
> the configure script ran beautifully.

In Emacs trunk, building in directories whose name contains space should
now work. (Installing into such a directory probably still doesn't work.)





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

* bug#15675: the configure script invoked before make
  2013-10-23  6:26 ` Glenn Morris
@ 2013-10-24  1:12   ` Andy Moreton
  2013-10-24  1:56     ` Glenn Morris
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Moreton @ 2013-10-24  1:12 UTC (permalink / raw)
  To: 15675

On Wed 23 Oct 2013, Glenn Morris wrote:

> Version: 24.4
>
> “Adrian” wrote:
>
>> Downloaded and put the emacs24.3 sources in a directory whose name
>> contained 1 space. The configure script seemed not able to interpret
>> the directory name properly, as it could only grasp the word
>> preceeding the space in the directory name. I verified that this was
>> the problem, as i changed the directory name to contain no spaces and
>> the configure script ran beautifully.
>
> In Emacs trunk, building in directories whose name contains space should
> now work. (Installing into such a directory probably still doesn't work.)

The changes to support this break doing an out of tree build using
MSYS/MinGW.

I have been trying to build from bzr r114764, with the source tree at
"c:\emacs\src\emacs\trunk", and building in an "obj-mingw32" subdir.

Building in "obj-mingw32/lib" fails because CPP and CPPFLAGS still have
"-I ../nt/inc", which should either be "-I ../../nt/inc" (relative to
"obj-mingw32") or be absolute.

My attempts to patch configure.ac to fix this resulted in a configure
script which complained about missing ACl libraries (which is normally
handled by trunk/nt/mingw-config.site).

As I am inexpert in autotools, I instead tried to work around this by
adding the absolute path to "trunk/nt/inc" to CPPFLAGS on the configure
command line (generated from unmodified configure.ac). This got further,
but failed building lisp:

------------------------------------------------------------------
cd ../lisp; /usr/bin/make -w update-subdirs
make[2]: Entering directory `/c/emacs/src/emacs/trunk/obj-mingw32/lisp'
cd ../../lisp; subdirs=`find . -type d -print`; for file in $subdirs; do case $file in */.* | */.*/* | */=* | */cedet* ) ;; *) wins="$wins${wins:+ }$file" ;; esac; done; \
        for file in $wins; do \
           ../../build-aux/update-subdirs $file; \
        done;
/bin/sh: line 2: ../../build-aux/update-subdirs: No such file or directory
/bin/sh: line 2: ../../build-aux/update-subdirs: No such file or directory
------------------------------------------------------------------

The for loop runs from trunk/lisp, so the path to trunk/build-aux is wrong.
In addition, this use of find and a for loop does not look correct for
directory paths with spaces.

Let me know if you need any help with testing, build logs etc.

    AndyM






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

* bug#15675: the configure script invoked before make
  2013-10-24  1:12   ` Andy Moreton
@ 2013-10-24  1:56     ` Glenn Morris
  2013-10-24  2:16       ` Glenn Morris
  0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2013-10-24  1:56 UTC (permalink / raw)
  To: Andy Moreton; +Cc: 15675

Andy Moreton wrote:

> Building in "obj-mingw32/lib" fails because CPP and CPPFLAGS still have
> "-I ../nt/inc", which should either be "-I ../../nt/inc" (relative to
> "obj-mingw32") or be absolute.

Yes, I posted about that on emacs-devel a little earlier, see
http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00733.html

> /bin/sh: line 2: ../../build-aux/update-subdirs: No such file or directory

Should be fixed now.

> In addition, this use of find and a for loop does not look correct for
> directory paths with spaces.

The found directories are relative paths within the Emacs repo and won't
contain spaces.





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

* bug#15675: the configure script invoked before make
  2013-10-24  1:56     ` Glenn Morris
@ 2013-10-24  2:16       ` Glenn Morris
  2013-10-24  3:44         ` Andy Moreton
  0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2013-10-24  2:16 UTC (permalink / raw)
  To: Andy Moreton; +Cc: 15675

Glenn Morris wrote:

>> Building in "obj-mingw32/lib" fails because CPP and CPPFLAGS still have
>> "-I ../nt/inc",

? Why does CPP contain flags at all? Sounds wrong.

> Yes, I posted about that on emacs-devel a little earlier, see
> http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00733.html

I installed my guess at a solution...





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

* bug#15675: the configure script invoked before make
  2013-10-24  2:16       ` Glenn Morris
@ 2013-10-24  3:44         ` Andy Moreton
  2013-10-24  4:07           ` Glenn Morris
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Moreton @ 2013-10-24  3:44 UTC (permalink / raw)
  To: 15675

On Thu 24 Oct 2013, Glenn Morris wrote:

> Glenn Morris wrote:
>
>>> Building in "obj-mingw32/lib" fails because CPP and CPPFLAGS still have
>>> "-I ../nt/inc",
>
> ? Why does CPP contain flags at all? Sounds wrong.

With your updated configury from r114769, obj-mingw32/lib/Makefile has:

CPP = gcc -I ../nt/inc -E
CPPFLAGS = -mtune=pentium4   -IC:/emacs/mingw-devel/include -IC:/emacs/mingw-devel/src/xpm/3.5.1/libXpm-3.5.1-src/lib -DUSE_CRT_DLL=1 -I ${abs_top_srcdir}/nt/inc

Not sure where that comes from though...

>> Yes, I posted about that on emacs-devel a little earlier, see
>> http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00733.html
>
> I installed my guess at a solution...

Thanks for looking at this. There is still a build error in that the the
paths using $abs_top_srcdir don't expand properly. I've tracked this
down to the trailing tab and comment in the Makefile.in files:

abs_top_srcdir=@abs_top_srcdir@        # MinGW CPPFLAGS may use this

Removing the tab and the comment in all the Makefile.in files fixed
things for me.

    AndyM






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

* bug#15675: the configure script invoked before make
  2013-10-24  3:44         ` Andy Moreton
@ 2013-10-24  4:07           ` Glenn Morris
  2013-10-24 14:48             ` Andy Moreton
  2013-10-24 16:11             ` Eli Zaretskii
  0 siblings, 2 replies; 12+ messages in thread
From: Glenn Morris @ 2013-10-24  4:07 UTC (permalink / raw)
  To: Andy Moreton; +Cc: 15675

Andy Moreton wrote:

> CPP = gcc -I ../nt/inc -E

Seems wrong to me for CPP to contain any -I option. Where does that come from?

> CPPFLAGS = -mtune=pentium4   -IC:/emacs/mingw-devel/include -IC:/emacs/mingw-devel/src/xpm/3.5.1/libXpm-3.5.1-src/lib -DUSE_CRT_DLL=1 -I ${abs_top_srcdir}/nt/inc

Looks ok to me.

> abs_top_srcdir=@abs_top_srcdir@        # MinGW CPPFLAGS may use this
>
> Removing the tab and the comment in all the Makefile.in files fixed
> things for me.

Whoops; fixed.





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

* bug#15675: the configure script invoked before make
  2013-10-24  4:07           ` Glenn Morris
@ 2013-10-24 14:48             ` Andy Moreton
  2013-10-24 16:11             ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Andy Moreton @ 2013-10-24 14:48 UTC (permalink / raw)
  To: 15675

On Thu 24 Oct 2013, Glenn Morris wrote:

> Andy Moreton wrote:
>
>> CPP = gcc -I ../nt/inc -E
>
> Seems wrong to me for CPP to contain any -I option. Where does that come from?
>
>> CPPFLAGS = -mtune=pentium4 -IC:/emacs/mingw-devel/include
>> -IC:/emacs/mingw-devel/src/xpm/3.5.1/libXpm-3.5.1-src/lib -DUSE_CRT_DLL=1 -I
>> ${abs_top_srcdir}/nt/inc
>
> Looks ok to me.
>
>> abs_top_srcdir=@abs_top_srcdir@        # MinGW CPPFLAGS may use this
>>
>> Removing the tab and the comment in all the Makefile.in files fixed
>> things for me.
>
> Whoops; fixed.

Thanks. I've successfully bootstrapped from bzr r114777 today, so I
think you can declare victory.

    AndyM






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

* bug#15675: the configure script invoked before make
  2013-10-24  4:07           ` Glenn Morris
  2013-10-24 14:48             ` Andy Moreton
@ 2013-10-24 16:11             ` Eli Zaretskii
  2013-10-24 21:30               ` Glenn Morris
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2013-10-24 16:11 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 15675, andrewjmoreton

> From: Glenn Morris <rgm@gnu.org>
> Date: Thu, 24 Oct 2013 00:07:01 -0400
> Cc: 15675@debbugs.gnu.org
> 
> Andy Moreton wrote:
> 
> > CPP = gcc -I ../nt/inc -E
> 
> Seems wrong to me for CPP to contain any -I option. Where does that come from?

From the configure script.

The story begins, innocently enough, here:

    case "${canonical}" in
      *-darwin* )               opsys=darwin ;;
      *-mingw32 )
		opsys=mingw32
		# MinGW overrides and adds some system headers in nt/inc.
		GCC_TEST_OPTIONS="-I $srcdir/nt/inc"

(MinGW needs the test programs to pick up headers in nt/inc, since
those headers define some stuff which is not available in the MinGW
system headers.  This is what GCC_TEST_OPTIONS are for, right?)

Then the configure script sets CC to something that uses these
switches:

  if test x$GCC = xyes; then
    test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"

So far, so good.  But then:

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
  $as_echo_n "checking how to run the C preprocessor... " >&6; }
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
  fi
  if test -z "$CPP"; then
    if test "${ac_cv_prog_CPP+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
	# Double quotes because CPP needs to be expanded
      for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
      do         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  [...]
      done
      ac_cv_prog_CPP=$CPP

  fi
    CPP=$ac_cv_prog_CPP

This sets CPP to "$CC -E", and the rest, as they say, is history.

The problem here seems to be that the script confuses the value of CPP
needed to run the test programs with the value of CPP that is needed
to be substituted for @CPP@.  The latter should have any
GCC_TEST_OPTIONS removed from it.





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

* bug#15675: the configure script invoked before make
  2013-10-24 16:11             ` Eli Zaretskii
@ 2013-10-24 21:30               ` Glenn Morris
  2013-10-25  6:38                 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2013-10-24 21:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 15675, andrewjmoreton

Eli Zaretskii wrote:

> (MinGW needs the test programs to pick up headers in nt/inc, since
> those headers define some stuff which is not available in the MinGW
> system headers.  This is what GCC_TEST_OPTIONS are for, right?)

I don't really know what *GCC_TEST_OPTIONS is for.
The only thing in configure using it apart from MinGW is Irix,
which frankly is used by ~ no-one.

Emacs autoconf usage is not always best-practice...
It seems to me that both the Irix and MinGW cases should be using
C(PP)FLAGS instead of using GCC_TEST_OPTIONS to modify CC.





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

* bug#15675: the configure script invoked before make
  2013-10-24 21:30               ` Glenn Morris
@ 2013-10-25  6:38                 ` Eli Zaretskii
  2013-10-25  8:45                   ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2013-10-25  6:38 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 15675, andrewjmoreton

> From: Glenn Morris <rgm@gnu.org>
> Cc: andrewjmoreton@gmail.com,  15675@debbugs.gnu.org
> Date: Thu, 24 Oct 2013 17:30:00 -0400
> 
> It seems to me that both the Irix and MinGW cases should be using
> C(PP)FLAGS instead of using GCC_TEST_OPTIONS to modify CC.

That was the first thing I tried back when I worked on configuring
MinGW with the configure script.  But it doesn't fly too well, either.
I don't exactly remember the details, but I think the flags ended
up twice in the compilation command, once from CPPFLAGS and another
time from CFLAGS.  Or something like that.

These are all minor issues, but so is the fact that CPP includes
switches.  And CPP is only used by lib/Makefile.in.  So these are nits
in any case.





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

* bug#15675: the configure script invoked before make
  2013-10-25  6:38                 ` Eli Zaretskii
@ 2013-10-25  8:45                   ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2013-10-25  8:45 UTC (permalink / raw)
  To: rgm; +Cc: 15675, andrewjmoreton

> Date: Fri, 25 Oct 2013 09:38:47 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 15675@debbugs.gnu.org, andrewjmoreton@gmail.com
> 
> > From: Glenn Morris <rgm@gnu.org>
> > Cc: andrewjmoreton@gmail.com,  15675@debbugs.gnu.org
> > Date: Thu, 24 Oct 2013 17:30:00 -0400
> > 
> > It seems to me that both the Irix and MinGW cases should be using
> > C(PP)FLAGS instead of using GCC_TEST_OPTIONS to modify CC.
> 
> That was the first thing I tried back when I worked on configuring
> MinGW with the configure script.  But it doesn't fly too well, either.
> I don't exactly remember the details, but I think the flags ended
> up twice in the compilation command, once from CPPFLAGS and another
> time from CFLAGS.  Or something like that.
> 
> These are all minor issues, but so is the fact that CPP includes
> switches.  And CPP is only used by lib/Makefile.in.  So these are nits
> in any case.

Actually, having these flags twice on the command line is not a minor
problem: some headers in nt/inc use #include_next, which will not DTRT
if -I../nt/inc is seen more than once on the command line.





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

end of thread, other threads:[~2013-10-25  8:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-21 17:02 bug#15675: the configure script invoked before make “Adrian”
2013-10-23  6:26 ` Glenn Morris
2013-10-24  1:12   ` Andy Moreton
2013-10-24  1:56     ` Glenn Morris
2013-10-24  2:16       ` Glenn Morris
2013-10-24  3:44         ` Andy Moreton
2013-10-24  4:07           ` Glenn Morris
2013-10-24 14:48             ` Andy Moreton
2013-10-24 16:11             ` Eli Zaretskii
2013-10-24 21:30               ` Glenn Morris
2013-10-25  6:38                 ` Eli Zaretskii
2013-10-25  8:45                   ` Eli Zaretskii

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.