You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Makefile.pre.in contains extra slash before $(DESTDIR) which can cause Cygwin build to fail #46486
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-10-20.12:19:58.479>created_at=<Date2008-03-04.17:47:50.277>labels= ['build', 'OS-windows']
title='Makefile.pre.in contains extra slash before $(DESTDIR) which can cause Cygwin build to fail'updated_at=<Date2021-10-21.09:56:42.567>user='https://bugs.python.org/jlt63'
I'm not sure that installation work if slash is removed and DESTDIR is
not specified. What about to replace "slash before $(DESTDIR)" with "/./" ?
jlt63 commented on Jan 8, 2009
jlt63mannequin
MannequinAuthor
More actions
Sorry for the delay, but I was on vacation and then recovering from
vacation...
You are correct that my initial patch does not handle the case when
DESTDIR is not specified. Your suggestion will work, but seems hacky.
What about adding the defaulting of DESTDIR to "/" to my initial
patch? This seems cleaner. See my second patch for the details.
If this approach is acceptable, then feel free to move the defaulting
of DESTDIR to a more appropriate place in Makefile.pre.in. I wasn't
sure where to put this change.
rpetrov commented on Jan 10, 2009
rpetrovmannequin
Mannequin
More actions
Jason, did you test what is result is DESTDIR default to "/".
This variable(macro) is used with specific syntax by example (from
Makefile): $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
where $$b is absolute path.
jlt63 commented on Jan 12, 2009
jlt63mannequin
MannequinAuthor
More actions
Obviously not... :,(
It seems like we might have to go with your "/./" workaround, but let
me see if I can come up with another approach.
jlt63 commented on Jan 14, 2009
jlt63mannequin
MannequinAuthor
More actions
Your latest patch is on the right track, but see my latest one,
Makefile.pre.in.v2.diff, for an optimization. I tested make install
with and without DESTDIR defined on the command line and both cases
behaved as expected.
rpetrov commented on Jan 14, 2009
rpetrovmannequin
Mannequin
More actions
Hi Jason,
quick review without tests - I expect $${DESTDIR:-/} to work without :
in expression, i.e. just $${DESTDIR-/}.
The ":" in expression is not so portable (some shells fail on this).
Please see "Shell Substitutions" in autoconf manual.
jlt63 commented on Jan 14, 2009
jlt63mannequin
MannequinAuthor
More actions
I guess you mean the following:
${var:-value}
Old BSD shells, including the Ultrix sh, don't accept the colon for
any shell substitution, and complain and die.
If so, should we just go forward without the colon? The bash manpage
indicates the following:
In each of the cases below, ... bash tests for a parameter that is
unset or null; omitting the colon results in a test only for a
parameter that is unset.
So, if a user executes "make DESTDIR= install", then the build will
fail. Or, maybe we shouldn't worry about that corner case.
What do you think?
rpetrov commented on Jan 21, 2009
rpetrovmannequin
Mannequin
More actions
No response from py-dev list :( . May be solution has to work in all cases.
Activity
jlt63 commentedon Mar 4, 2008
Makefile.pre.in contains extra slash before $(DESTDIR) in two locations
as in the following:
sharedinstall:
$(RUNSHARED) ./$ (BUILDPYTHON) -E $(srcdir)/setup.py install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
--root=/$(DESTDIR)
This causes Cygwin builds to fail if DESTDIR is set as follows:
creating //tmp
error: could not create '//tmp': No such host or network path
The following Open Group Specification:
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html
indicates the following:
4.11 Pathanme Resolution
[snip]
A pathname that begins with two successive slashes may be interpreted
in an implementation-defined manner,...
IMO, these extra slashes should be removed as indicated in the
attached patch. OK to commit? If so, to which branches?
rpetrov commentedon Jan 1, 2009
I would like to confirm issue for trunk.
rpetrov commentedon Jan 1, 2009
I'm not sure that installation work if slash is removed and DESTDIR is
not specified. What about to replace "slash before $(DESTDIR)" with "/./" ?
jlt63 commentedon Jan 8, 2009
Sorry for the delay, but I was on vacation and then recovering from
vacation...
You are correct that my initial patch does not handle the case when
DESTDIR is not specified. Your suggestion will work, but seems hacky.
What about adding the defaulting of DESTDIR to "/" to my initial
patch? This seems cleaner. See my second patch for the details.
If this approach is acceptable, then feel free to move the defaulting
of DESTDIR to a more appropriate place in Makefile.pre.in. I wasn't
sure where to put this change.
rpetrov commentedon Jan 10, 2009
Jason, did you test what is result is DESTDIR default to "/".
This variable(macro) is used with specific syntax by example (from
$(INSTALL) -d -m $ (DIRMODE) $(DESTDIR)$ $b; \
Makefile):
where $$b is absolute path.
jlt63 commentedon Jan 12, 2009
Obviously not... :,(
It seems like we might have to go with your "/./" workaround, but let
me see if I can come up with another approach.
jlt63 commentedon Jan 14, 2009
Your latest patch is on the right track, but see my latest one,
Makefile.pre.in.v2.diff, for an optimization. I tested make install
with and without DESTDIR defined on the command line and both cases
behaved as expected.
rpetrov commentedon Jan 14, 2009
Hi Jason,
quick review without tests - I expect $${DESTDIR:-/} to work without :
in expression, i.e. just $${DESTDIR-/}.
The ":" in expression is not so portable (some shells fail on this).
Please see "Shell Substitutions" in autoconf manual.
jlt63 commentedon Jan 14, 2009
I guess you mean the following:
${var:-value}
Old BSD shells, including the Ultrix sh, don't accept the colon for
any shell substitution, and complain and die.
If so, should we just go forward without the colon? The bash manpage
indicates the following:
In each of the cases below, ... bash tests for a parameter that is
unset or null; omitting the colon results in a test only for a
parameter that is unset.
So, if a user executes "make DESTDIR= install", then the build will
fail. Or, maybe we shouldn't worry about that corner case.
What do you think?
rpetrov commentedon Jan 21, 2009
No response from py-dev list :( . May be solution has to work in all cases.
BreamoreBoy commentedon Jul 9, 2014
Is this still a problem with cygwin?
jlt63 commentedon Jul 10, 2014
AFAICT, yes.