Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On 01/23/16 11:19 AM, Hendrik Leppkes wrote: On Sat, Jan 23, 2016 at 8:16 PM, Andreas Cadhalpun wrote: On 23.01.2016 17:16, Hendrik Leppkes wrote: On Sat, Jan 23, 2016 at 4:27 PM, Andreas Cadhalpun wrote: On 23.01.2016 15:07, Hendrik Leppkes wrote: On Sat, Jan 23, 2016 at 2:51 PM, Andreas Cadhalpun wrote: On 23.01.2016 14:48, Hendrik Leppkes wrote: Unfortunately, cygpath is not guaranteed to be available, and in fact is not on some working build setups today (ie. msys1 environments with msvc) Is there another way to get the Windows path on those environments? Not that I am aware. Hmm, sed should be available everywhere. Does the attached patch fix the MSVC builds? Unfortunately these assumptions are also not valid. On cygwin for example, a path would be /cygdrive/C/path/to/folder How many more strange path conventions are there? I think all mentioned so far could be supported by using cygpath, if available, and sed otherwise. Dealing with absolute paths in the unix/windows mixture is just not going to be easy, which is why we were careful to avoid them at all before. Not really. Out-of-tree builds used absolute path before, which is exactly the problem my initial patch fixed. For source files yes, but not for output files, which is the really problematic case with the MSVC CLI syntax. Does it work better without the drive delimiter? That's how I run fate, eg /fate instead of g:/fate with everything needed on G: or is Windows too anal about path separators? Dave ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On Sat, Jan 23, 2016 at 8:16 PM, Andreas Cadhalpun wrote: > On 23.01.2016 17:16, Hendrik Leppkes wrote: >> On Sat, Jan 23, 2016 at 4:27 PM, Andreas Cadhalpun >> wrote: >>> On 23.01.2016 15:07, Hendrik Leppkes wrote: On Sat, Jan 23, 2016 at 2:51 PM, Andreas Cadhalpun wrote: > On 23.01.2016 14:48, Hendrik Leppkes wrote: >> Unfortunately, cygpath is not guaranteed to be available, and in fact >> is not on some working build setups today (ie. msys1 environments with >> msvc) > > Is there another way to get the Windows path on those environments? > Not that I am aware. >>> >>> Hmm, sed should be available everywhere. >>> >>> Does the attached patch fix the MSVC builds? >>> >> >> Unfortunately these assumptions are also not valid. On cygwin for >> example, a path would be /cygdrive/C/path/to/folder > > How many more strange path conventions are there? > > I think all mentioned so far could be supported by using cygpath, > if available, and sed otherwise. > >> Dealing with absolute paths in the unix/windows mixture is just not >> going to be easy, which is why we were careful to avoid them at all >> before. > > Not really. Out-of-tree builds used absolute path before, which is > exactly the problem my initial patch fixed. > For source files yes, but not for output files, which is the really problematic case with the MSVC CLI syntax. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On 23.01.2016 17:16, Hendrik Leppkes wrote: > On Sat, Jan 23, 2016 at 4:27 PM, Andreas Cadhalpun > wrote: >> On 23.01.2016 15:07, Hendrik Leppkes wrote: >>> On Sat, Jan 23, 2016 at 2:51 PM, Andreas Cadhalpun >>> wrote: On 23.01.2016 14:48, Hendrik Leppkes wrote: > Unfortunately, cygpath is not guaranteed to be available, and in fact > is not on some working build setups today (ie. msys1 environments with > msvc) Is there another way to get the Windows path on those environments? >>> >>> Not that I am aware. >> >> Hmm, sed should be available everywhere. >> >> Does the attached patch fix the MSVC builds? >> > > Unfortunately these assumptions are also not valid. On cygwin for > example, a path would be /cygdrive/C/path/to/folder How many more strange path conventions are there? I think all mentioned so far could be supported by using cygpath, if available, and sed otherwise. > Dealing with absolute paths in the unix/windows mixture is just not > going to be easy, which is why we were careful to avoid them at all > before. Not really. Out-of-tree builds used absolute path before, which is exactly the problem my initial patch fixed. Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On Sat, Jan 23, 2016 at 9:57 PM, Hendrik Leppkes wrote: > On Sat, Jan 23, 2016 at 5:24 PM, Michael Niedermayer > wrote: >> On Sat, Jan 23, 2016 at 05:16:28PM +0100, Hendrik Leppkes wrote: >>> On Sat, Jan 23, 2016 at 4:27 PM, Andreas Cadhalpun >>> wrote: >>> > On 23.01.2016 15:07, Hendrik Leppkes wrote: >>> >> On Sat, Jan 23, 2016 at 2:51 PM, Andreas Cadhalpun >>> >> wrote: >>> >>> On 23.01.2016 14:48, Hendrik Leppkes wrote: >>> Unfortunately, cygpath is not guaranteed to be available, and in fact >>> is not on some working build setups today (ie. msys1 environments with >>> msvc) >>> >>> >>> >>> Is there another way to get the Windows path on those environments? >>> >>> >>> >> >>> >> Not that I am aware. >>> > >>> > Hmm, sed should be available everywhere. >>> > >>> > Does the attached patch fix the MSVC builds? >>> > >>> >>> Unfortunately these assumptions are also not valid. On cygwin for >>> example, a path would be /cygdrive/C/path/to/folder >>> Dealing with absolute paths in the unix/windows mixture is just not >>> going to be easy, which is why we were careful to avoid them at all >>> before. >> >> IIUC windows excutables get their command line arguments translated >> from unix to dos paths. Cant that be used to turn a unix into a dos >> path to then later use in a more convoluted (not auto translated) >> argument ? >> > > We had an external wrapper before, but we just got rid of it some time > ago by fixing some more things, I would rather not get it back for > some complicated build change I don't even quite understand or see the > benefit of. Just throwing an idea: does there exist some Makefile magic (via a shell invocation) that effectively places Andreas's original patch under an ifndef Windows? > > - Hendrik > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On Sat, Jan 23, 2016 at 5:24 PM, Michael Niedermayer wrote: > On Sat, Jan 23, 2016 at 05:16:28PM +0100, Hendrik Leppkes wrote: >> On Sat, Jan 23, 2016 at 4:27 PM, Andreas Cadhalpun >> wrote: >> > On 23.01.2016 15:07, Hendrik Leppkes wrote: >> >> On Sat, Jan 23, 2016 at 2:51 PM, Andreas Cadhalpun >> >> wrote: >> >>> On 23.01.2016 14:48, Hendrik Leppkes wrote: >> Unfortunately, cygpath is not guaranteed to be available, and in fact >> is not on some working build setups today (ie. msys1 environments with >> msvc) >> >>> >> >>> Is there another way to get the Windows path on those environments? >> >>> >> >> >> >> Not that I am aware. >> > >> > Hmm, sed should be available everywhere. >> > >> > Does the attached patch fix the MSVC builds? >> > >> >> Unfortunately these assumptions are also not valid. On cygwin for >> example, a path would be /cygdrive/C/path/to/folder >> Dealing with absolute paths in the unix/windows mixture is just not >> going to be easy, which is why we were careful to avoid them at all >> before. > > IIUC windows excutables get their command line arguments translated > from unix to dos paths. Cant that be used to turn a unix into a dos > path to then later use in a more convoluted (not auto translated) > argument ? > We had an external wrapper before, but we just got rid of it some time ago by fixing some more things, I would rather not get it back for some complicated build change I don't even quite understand or see the benefit of. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On Sat, Jan 23, 2016 at 05:16:28PM +0100, Hendrik Leppkes wrote: > On Sat, Jan 23, 2016 at 4:27 PM, Andreas Cadhalpun > wrote: > > On 23.01.2016 15:07, Hendrik Leppkes wrote: > >> On Sat, Jan 23, 2016 at 2:51 PM, Andreas Cadhalpun > >> wrote: > >>> On 23.01.2016 14:48, Hendrik Leppkes wrote: > Unfortunately, cygpath is not guaranteed to be available, and in fact > is not on some working build setups today (ie. msys1 environments with > msvc) > >>> > >>> Is there another way to get the Windows path on those environments? > >>> > >> > >> Not that I am aware. > > > > Hmm, sed should be available everywhere. > > > > Does the attached patch fix the MSVC builds? > > > > Unfortunately these assumptions are also not valid. On cygwin for > example, a path would be /cygdrive/C/path/to/folder > Dealing with absolute paths in the unix/windows mixture is just not > going to be easy, which is why we were careful to avoid them at all > before. IIUC windows excutables get their command line arguments translated from unix to dos paths. Cant that be used to turn a unix into a dos path to then later use in a more convoluted (not auto translated) argument ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct answer. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On Sat, Jan 23, 2016 at 4:27 PM, Andreas Cadhalpun wrote: > On 23.01.2016 15:07, Hendrik Leppkes wrote: >> On Sat, Jan 23, 2016 at 2:51 PM, Andreas Cadhalpun >> wrote: >>> On 23.01.2016 14:48, Hendrik Leppkes wrote: Unfortunately, cygpath is not guaranteed to be available, and in fact is not on some working build setups today (ie. msys1 environments with msvc) >>> >>> Is there another way to get the Windows path on those environments? >>> >> >> Not that I am aware. > > Hmm, sed should be available everywhere. > > Does the attached patch fix the MSVC builds? > Unfortunately these assumptions are also not valid. On cygwin for example, a path would be /cygdrive/C/path/to/folder Dealing with absolute paths in the unix/windows mixture is just not going to be easy, which is why we were careful to avoid them at all before. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On 23.01.2016 15:07, Hendrik Leppkes wrote: > On Sat, Jan 23, 2016 at 2:51 PM, Andreas Cadhalpun > wrote: >> On 23.01.2016 14:48, Hendrik Leppkes wrote: >>> Unfortunately, cygpath is not guaranteed to be available, and in fact >>> is not on some working build setups today (ie. msys1 environments with >>> msvc) >> >> Is there another way to get the Windows path on those environments? >> > > Not that I am aware. Hmm, sed should be available everywhere. Does the attached patch fix the MSVC builds? Best regards, Andreas >From 73bc32b0d2af82ca9b8be5681d1a4f4e775f935e Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sat, 23 Jan 2016 16:23:36 +0100 Subject: [PATCH] build: use Windows path for MSVC Signed-off-by: Andreas Cadhalpun --- configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 8f4642b..9307326 100755 --- a/configure +++ b/configure @@ -3104,6 +3104,8 @@ else die "Out of tree builds are impossible with config.h in source dir." fi +dst_path=$(pwd) + for v in "$@"; do r=${v#*=} l=${v%"$r"} @@ -3365,6 +3367,7 @@ case "$toolchain" in # issues with msys/win32 path conversion for MSVC parameters # such as -Fo or -out:. TMPDIR=. +dst_path=$(echo "$dst_path" | sed 's_/_\\_g' | sed 's_^\\\([^\\]*\)_\U\1:_') ;; icl) cc_default="icl" @@ -6251,7 +6254,7 @@ SRC_PATH=$source_path ifndef MAIN_MAKEFILE SRC_PATH:=\$(SRC_PATH:.%=..%) endif -DST_PATH=$(pwd) +DST_PATH=$dst_path CC_IDENT=$cc_ident ARCH=$arch INTRINSICS=$intrinsics -- 2.7.0.rc3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On Sat, Jan 23, 2016 at 2:51 PM, Andreas Cadhalpun wrote: > On 23.01.2016 14:48, Hendrik Leppkes wrote: >> On Sat, Jan 23, 2016 at 2:44 PM, Andreas Cadhalpun >> wrote: >>> Signed-off-by: Andreas Cadhalpun >>> --- >>> >>> This hopefully fixes the build failures with MSVC. >>> I don't have such an environment to test this, though. >>> >>> --- >>> configure | 5 - >>> 1 file changed, 4 insertions(+), 1 deletion(-) >>> >>> diff --git a/configure b/configure >>> index 8f4642b..64ce901 100755 >>> --- a/configure >>> +++ b/configure >>> @@ -3104,6 +3104,8 @@ else >>> die "Out of tree builds are impossible with config.h in source >>> dir." >>> fi >>> >>> +dst_path=$(pwd) >>> + >>> for v in "$@"; do >>> r=${v#*=} >>> l=${v%"$r"} >>> @@ -3365,6 +3367,7 @@ case "$toolchain" in >>> # issues with msys/win32 path conversion for MSVC parameters >>> # such as -Fo or -out:. >>> TMPDIR=. >>> +dst_path=$(cygpath -w $dst_path) >>> ;; >>> icl) >>> cc_default="icl" >>> @@ -6251,7 +6254,7 @@ SRC_PATH=$source_path >>> ifndef MAIN_MAKEFILE >>> SRC_PATH:=\$(SRC_PATH:.%=..%) >>> endif >>> -DST_PATH=$(pwd) >>> +DST_PATH=$dst_path >>> CC_IDENT=$cc_ident >>> ARCH=$arch >>> INTRINSICS=$intrinsics >>> -- >>> 2.7.0.rc3 >> >> Unfortunately, cygpath is not guaranteed to be available, and in fact >> is not on some working build setups today (ie. msys1 environments with >> msvc) > > Is there another way to get the Windows path on those environments? > Not that I am aware. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On 23.01.2016 14:48, Hendrik Leppkes wrote: > On Sat, Jan 23, 2016 at 2:44 PM, Andreas Cadhalpun > wrote: >> Signed-off-by: Andreas Cadhalpun >> --- >> >> This hopefully fixes the build failures with MSVC. >> I don't have such an environment to test this, though. >> >> --- >> configure | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/configure b/configure >> index 8f4642b..64ce901 100755 >> --- a/configure >> +++ b/configure >> @@ -3104,6 +3104,8 @@ else >> die "Out of tree builds are impossible with config.h in source dir." >> fi >> >> +dst_path=$(pwd) >> + >> for v in "$@"; do >> r=${v#*=} >> l=${v%"$r"} >> @@ -3365,6 +3367,7 @@ case "$toolchain" in >> # issues with msys/win32 path conversion for MSVC parameters >> # such as -Fo or -out:. >> TMPDIR=. >> +dst_path=$(cygpath -w $dst_path) >> ;; >> icl) >> cc_default="icl" >> @@ -6251,7 +6254,7 @@ SRC_PATH=$source_path >> ifndef MAIN_MAKEFILE >> SRC_PATH:=\$(SRC_PATH:.%=..%) >> endif >> -DST_PATH=$(pwd) >> +DST_PATH=$dst_path >> CC_IDENT=$cc_ident >> ARCH=$arch >> INTRINSICS=$intrinsics >> -- >> 2.7.0.rc3 > > Unfortunately, cygpath is not guaranteed to be available, and in fact > is not on some working build setups today (ie. msys1 environments with > msvc) Is there another way to get the Windows path on those environments? Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: use Windows path for MSVC
On Sat, Jan 23, 2016 at 2:44 PM, Andreas Cadhalpun wrote: > Signed-off-by: Andreas Cadhalpun > --- > > This hopefully fixes the build failures with MSVC. > I don't have such an environment to test this, though. > > --- > configure | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index 8f4642b..64ce901 100755 > --- a/configure > +++ b/configure > @@ -3104,6 +3104,8 @@ else > die "Out of tree builds are impossible with config.h in source dir." > fi > > +dst_path=$(pwd) > + > for v in "$@"; do > r=${v#*=} > l=${v%"$r"} > @@ -3365,6 +3367,7 @@ case "$toolchain" in > # issues with msys/win32 path conversion for MSVC parameters > # such as -Fo or -out:. > TMPDIR=. > +dst_path=$(cygpath -w $dst_path) > ;; > icl) > cc_default="icl" > @@ -6251,7 +6254,7 @@ SRC_PATH=$source_path > ifndef MAIN_MAKEFILE > SRC_PATH:=\$(SRC_PATH:.%=..%) > endif > -DST_PATH=$(pwd) > +DST_PATH=$dst_path > CC_IDENT=$cc_ident > ARCH=$arch > INTRINSICS=$intrinsics > -- > 2.7.0.rc3 Unfortunately, cygpath is not guaranteed to be available, and in fact is not on some working build setups today (ie. msys1 environments with msvc) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] build: use Windows path for MSVC
Signed-off-by: Andreas Cadhalpun --- This hopefully fixes the build failures with MSVC. I don't have such an environment to test this, though. --- configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 8f4642b..64ce901 100755 --- a/configure +++ b/configure @@ -3104,6 +3104,8 @@ else die "Out of tree builds are impossible with config.h in source dir." fi +dst_path=$(pwd) + for v in "$@"; do r=${v#*=} l=${v%"$r"} @@ -3365,6 +3367,7 @@ case "$toolchain" in # issues with msys/win32 path conversion for MSVC parameters # such as -Fo or -out:. TMPDIR=. +dst_path=$(cygpath -w $dst_path) ;; icl) cc_default="icl" @@ -6251,7 +6254,7 @@ SRC_PATH=$source_path ifndef MAIN_MAKEFILE SRC_PATH:=\$(SRC_PATH:.%=..%) endif -DST_PATH=$(pwd) +DST_PATH=$dst_path CC_IDENT=$cc_ident ARCH=$arch INTRINSICS=$intrinsics -- 2.7.0.rc3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel