From: Sascha Wilde <wilde@sha-bang.de>
To: emacs-devel@gnu.org
Cc: "Jan Djärv" <jan.h.d@swipnet.se>
Subject: Pathnames with two (or more) slashes in Makefile.c (was: Latest configure.in change breaks building)
Date: Sun, 28 Jan 2007 15:28:11 +0100 [thread overview]
Message-ID: <m2odoj5ipw.fsf_-_@kenny.sha-bang.de> (raw)
In-Reply-To: <45BC7182.7010704@swipnet.se> (Jan Djärv's message of "Sun\, 28 Jan 2007 10\:48\:50 +0100")
Jan Djärv <jan.h.d@swipnet.se> wrote:
> Sascha Wilde skrev:
>> the latest change on configure.in:
>>
>> 2007-01-26 Jan Djärv <jan.h.d@swipnet.se>
>>
>> * configure.in: Add check for libXft.
>>
>> breaks the build process for me (CVS Head on GNU/Linux with GTK+ frontend):
>>
>> The new configure tests are successful: checking for xft >=
>> 0.13.0... yes checking XFT_CFLAGS... -I/usr/X11R6/include
>> -I/usr/include/freetype2 checking XFT_LIBS... -L//lib
>> -L/usr/X11R6/lib -lXft -lXrender -lX11 -lXext
>> -lfontconfig -lfreetype -lz
>
> What is //lib? It looks broken.
//lib == /lib, see below...
[...]
> You have -L -lncurses in there. What happens is when the preprocessor
> reads Makefile.c (generated from Makefile.in), your -L//lib ... is
> taken as a comment, and everything after // is removed, so you are
> left with -L.
You are right, the problem is not in your patch, but was triggered by
it on m system.
fontconfig.pc (one of the dependencies of xft.pc) on my system looks
like this:
prefix=/usr
exec_prefix=/
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Fontconfig
Description: Font configuration and customization library
Version: 2.3.2
Libs: -L${libdir} -lfontconfig
Cflags: -I${includedir}
So yes, the library include directory is set to "//lib", in fact this
is a very common idiom in various situations when the prefix
installation path of software is set to "/".
In fact, it isn't wrong at all (though it touches a certain corner
case of the posix definition just by chance), the last paragraph in
the section "Pathname Resolution" (chapter "General Concepts") from
the posix standard states:
A pathname consisting of a single slash shall resolve to the root
directory of the process. A null pathname shall not be successfully
resolved. A pathname that begins with two successive slashes may be
interpreted in an implementation-defined manner, although more than
two leading slashes shall be treated as a single slash.
On GNU Systems (and most unixoid systems I know), two leading slashes
are not interpreted in any special way, but like three and more
slashes: they are treated as one.
So the problem is, that the double slash is written unquoted to
Makefile.c where it gets interpreted as a comment.
This is IMO a bug.
When generating Makefile.c consecutive slashes hould either be reduced
to one or appropriately quoted.
cheers
sascha
--
Sascha Wilde
Nothing is fool-proof to a sufficiently talented fool.
next prev parent reply other threads:[~2007-01-28 14:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-27 19:54 Latest configure.in change breaks building Sascha Wilde
2007-01-28 9:48 ` Jan Djärv
2007-01-28 14:28 ` Sascha Wilde [this message]
2007-01-29 8:06 ` Pathnames with two (or more) slashes in Makefile.c Jan Djärv
2007-01-29 20:21 ` Sascha Wilde
2007-01-30 7:08 ` Jan Djärv
2007-01-30 8:53 ` Sascha Wilde
2007-01-30 9:09 ` Sascha Wilde
2007-01-31 9:36 ` Sascha Wilde
2007-01-31 17:42 ` Jan Djärv
2007-01-31 22:33 ` Sascha Wilde
2007-01-30 9:14 ` Jan Djärv
2007-01-30 9:47 ` Sascha Wilde
2007-01-30 10:26 ` Jan Djärv
2007-01-30 11:04 ` Sascha Wilde
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2odoj5ipw.fsf_-_@kenny.sha-bang.de \
--to=wilde@sha-bang.de \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
/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 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.