Could not determine MSC version (Visual Studio 2017)

classic Classic list List threaded Threaded
14 messages Options
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Could not determine MSC version (Visual Studio 2017)

Hello,

I'm giving a try with Win build on Win7 with Visual Studio 2017 community
retrieved today  + master sources.
Here's the autogen.sh:
--with-system-odbc
--with-ant-home=/cygdrive/c/BLP/apache-ant-1.9.5
--with-junit=/cygdrive/c/BLP/junit-4.10.jar
--enable-64-bit
--enable-werror
--enable-debug
--enable-dbgutil
--enable-python=fully-internal
--without-system-mariadb
--enable-bundle-mariadb
--disable-ccache
--enable-pch
--with-external-tar=/cygdrive/c/BLP/lo-externalsrc
--with-lang=en-US fr

config.log gives this:
configure:12062: checking cl.exe
configure:12088: result: found Visual C++ 2017
(C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/1416~1.270/bin/HostX64/x64/cl.exe)

I got when using /opt/lo/bin/make
checking for cl... cl
configure: error: Could not determine MSC version.

I use French UI. I read
http://document-foundation-mail-archive.969070.n3.nabble.com/Could-not-determine-MSC-version-td4219256.html#a4219261
but it seems it should work with French UI too.

Any thoughts?

Julien




--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

On 24/01/2019 15:52, julien2412 wrote:
> I got when using /opt/lo/bin/make
> checking for cl... cl
> configure: error: Could not determine MSC version.

During the execution of what make target does that failure happen?
Re-execution of LO's top-level configure as triggered by the makefile,
or configure run for one of the external projects?  (Include more
surrounding lines from the failure output, and for a parallel build make
sure to pass -O to make to keep the parallel jobs' output separated.)
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

sberg wrote

> On 24/01/2019 15:52, julien2412 wrote:
>> I got when using /opt/lo/bin/make
>> checking for cl... cl
>> configure: error: Could not determine MSC version.
>
> During the execution of what make target does that failure happen?
> Re-execution of LO's top-level configure as triggered by the makefile,
> or configure run for one of the external projects?  (Include more
> surrounding lines from the failure output, and for a parallel build make
> sure to pass -O to make to keep the parallel jobs' output separated.)

I did a global build, so just "make"

Here what I did to avoid language pb:
export LANG=C
make clean
make

Here are the last lines:
[build ULF]
C:/BLP/libo-core/workdir/ScpMergeTarget/scp2/source/writer/registryitem_writer.ulf
[build ULF]
C:/BLP/libo-core/workdir/ScpMergeTarget/scp2/source/winexplorerext/module_winexplorerext.ulf
[build MO ] sdfr
[build MO ] sfxfr
[build ULF]
C:/BLP/libo-core/workdir/CustomTarget/shell/source/win32/shlxthandler/res/shlxthdl.ulf
[build MO ] smfr
[build MO ] svlfr
[build MO ] svtfr
[build MO ] svxfr
[build MO ] swfr
[build MOD] ucbhelper
[build MO ] uuifr
[build MO ] vclfr
[build PRP] CustomTarget/wizards/locproperties/resources_fr.properties
[build PRP] CustomTarget/wizards/locproperties/resources_qtz.properties
[build MO ] wizfr
[build MO ] wptfr
[build MO ] xscfr
[build PAT] libxslt
[build UIC] modules/dbapp
make[2]: warning: -jN forced in submake: disabling jobserver mode.
expr: syntax error
expr: syntax error
expr: syntax error
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking target system type... x86_64-unknown-cygwin
checking for cl... cl
configure: error: Could not determine MSC version.
make[2]: *** [Makefile:129: ../nspr/out/config.status] Error 1

It seems it's quite at random since the build runned a longer time.

I'll try "make -O" tomorrow.

remarks:
- building with Cygwin was taking a lot memory (I got 8GB) and, contrary to
Linux building, I saw a lot of "include file" in console. (perhaps both are
linked)
- also when using Ctrl-C on cygwin to stop the process then close cygwin, it
seems it doesn't stop process and so doesn't free memory ; ie I could see
several "make" process on tasks manager.
Hope LO may be built with Windows native tools instead of cygwin.



--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

On 24/01/2019 21:04, julien2412 wrote:

> Here what I did to avoid language pb:
> export LANG=C
> make clean
> make
>
> Here are the last lines:
> [build ULF]
> C:/BLP/libo-core/workdir/ScpMergeTarget/scp2/source/writer/registryitem_writer.ulf
> [build ULF]
> C:/BLP/libo-core/workdir/ScpMergeTarget/scp2/source/winexplorerext/module_winexplorerext.ulf
> [build MO ] sdfr
> [build MO ] sfxfr
> [build ULF]
> C:/BLP/libo-core/workdir/CustomTarget/shell/source/win32/shlxthandler/res/shlxthdl.ulf
> [build MO ] smfr
> [build MO ] svlfr
> [build MO ] svtfr
> [build MO ] svxfr
> [build MO ] swfr
> [build MOD] ucbhelper
> [build MO ] uuifr
> [build MO ] vclfr
> [build PRP] CustomTarget/wizards/locproperties/resources_fr.properties
> [build PRP] CustomTarget/wizards/locproperties/resources_qtz.properties
> [build MO ] wizfr
> [build MO ] wptfr
> [build MO ] xscfr
> [build PAT] libxslt
> [build UIC] modules/dbapp
> make[2]: warning: -jN forced in submake: disabling jobserver mode.
> expr: syntax error
> expr: syntax error
> expr: syntax error
> checking build system type... x86_64-unknown-cygwin
> checking host system type... x86_64-unknown-cygwin
> checking target system type... x86_64-unknown-cygwin
> checking for cl... cl
> configure: error: Could not determine MSC version.
> make[2]: *** [Makefile:129: ../nspr/out/config.status] Error 1
>
> It seems it's quite at random since the build runned a longer time.

 From "make[2]: *** [Makefile:129: ../nspr/out/config.status] Error 1"
it looks like this is a failure during configure of external/nss.
workdir/UnpackedTarball/nss/nspr/out/config.log might contain a clue as
to why it fails for you.

> I'll try "make -O" tomorrow.

Always use -O.  It doesn't make any difference for failing vs. not
failing, it just makes sure that the output from recipes that make runs
in parallel don't all write to the same stdout/stderr in parallel.  Not
using -O leads to garbled output, making it hard to tell which make
target exactly failed in what way.
>
> remarks:
> - building with Cygwin was taking a lot memory (I got 8GB) and, contrary to
> Linux building, I saw a lot of "include file" in console. (perhaps both are
> linked)

Those "include file" lines should be from invoking cl with /showincludes
(which we use for dependency tracking, similar to GCC -MD).  No idea why
they (or at least lots of them) show up on stdout/stderr for you, though.

> - also when using Ctrl-C on cygwin to stop the process then close cygwin, it
> seems it doesn't stop process and so doesn't free memory ; ie I could see
> several "make" process on tasks manager.

Yes, that's a well-known issue.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

sberg wrote
>>...
>  From "make[2]: *** [Makefile:129: ../nspr/out/config.status] Error 1"
> it looks like this is a failure during configure of external/nss.
> workdir/UnpackedTarball/nss/nspr/out/config.log might contain a clue as
> to why it fails for you
> ...

Here's the config.log
is "--enable-win32-target=WIN95" ok ? Shouldn't we use WINNT ?
config.log
<http://document-foundation-mail-archive.969070.n3.nabble.com/file/t230433/config.log>  

Here are the different locations where "Could not determine MSC version" can
be found:
workdir\UnpackedTarball\nss\nss\build.log:
checking for cl... cl
configure: error: Could not determine MSC version.
make[2]: *** [Makefile:129: ../nspr/out/config.status] Error 1

workdir\UnpackedTarball\nss\nspr\out\config.log
configure:2543: checking for cl
configure:2570: result: cl
configure:5898: cl  -c   conftest.c >&5
conftest.c
conftest.c(14): error C2065: '__thumb2__'ÿ: identificateur non d‚clar‚
Compilateur d'optimisation Microsoft (R) C/C++ versionÿ19.16.27026.1 pour
x64
Copyright (C) Microsoft Corporation. Tous droits r‚serv‚s.

configure:5898: $? = 2
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define DEBUG 1
| /* end confdefs.h.  */
|
| int
| main ()
| {
| return sizeof(__thumb2__);
|   ;
|   return 0;
| }
configure:7134: error: Could not determine MSC version.

workdir\UnpackedTarball\nss\nspr\configure.orig
        # Determine compiler version

        _MSVC_VER_FILTER='s|.*
\([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'

        CC_VERSION=`${CC} -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
        if test -z "$CC_VERSION"; then
            as_fn_error $? "Could not determine MSC version." "$LINENO" 5
        fi

workdir\UnpackedTarball\nss\nspr\configure.in.orig
        # Determine compiler version
        changequote(,)
        _MSVC_VER_FILTER='s|.*
\([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
        changequote([,])
        CC_VERSION=`${CC} -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
        if test -z "$CC_VERSION"; then
            AC_MSG_ERROR([Could not determine MSC version.])
        fi

workdir\UnpackedTarball\nss\nspr\configure.in
        # Determine compiler version
        changequote(,)
        _MSVC_VER_FILTER='s|.*
\([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
        changequote([,])
        CC_VERSION=`${CC} -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
        if test -z "$CC_VERSION"; then
            AC_MSG_ERROR([Could not determine MSC version.])
        fi

Julien



--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

On 25/01/2019 09:50, julien2412 wrote:

> workdir\UnpackedTarball\nss\nspr\out\config.log
> configure:2543: checking for cl
> configure:2570: result: cl
> configure:5898: cl  -c   conftest.c >&5
> conftest.c
> conftest.c(14): error C2065: '__thumb2__'ÿ: identificateur non d‚clar‚
> Compilateur d'optimisation Microsoft (R) C/C++ versionÿ19.16.27026.1 pour
> x64
> Copyright (C) Microsoft Corporation. Tous droits r‚serv‚s.
>
> configure:5898: $? = 2
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME ""
> | #define PACKAGE_TARNAME ""
> | #define PACKAGE_VERSION ""
> | #define PACKAGE_STRING ""
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL ""
> | #define DEBUG 1
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> | return sizeof(__thumb2__);
> |   ;
> |   return 0;
> | }
> configure:7134: error: Could not determine MSC version.

The __thumb2__ part is a red herring; configure proceeds past it just
fine.  The issue is

>         # Determine compiler version
>         changequote(,)
>         _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
>         changequote([,])
>         CC_VERSION=`${CC} -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
>         if test -z "$CC_VERSION"; then
>             AC_MSG_ERROR([Could not determine MSC version.])
>         fi

at workdir/UnpackedTarball/nss/nspr/configure.in:1931.  For me, it
determines CC_VERSION=19.16.27024.1.  For you, the sed invocation
apparently fails, leading to an empty CC_VERSION, presumably because
your French MSVC outputs something that the code can't cope with.

In the cygwin shell where you do `make`, do the following:

> $ grep CC= config_host.mk
to get the CC=... line, should be something like CC=C:/PROGRA...  Do the
below two commands, with each XXX replaced by the exact value from that
CC= line:

> $ XXX -v

and

> $ XXX -v 2>&1 | sed -ne 's|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'

and provide the output of each.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

sberg wrote

> ...
>
> In the cygwin shell where you do `make`, do the following:
>
>> $ grep CC= config_host.mk
> to get the CC=... line, should be something like CC=C:/PROGRA...  Do the
> below two commands, with each XXX replaced by the exact value from that
> CC= line:
>> $ XXX -v
> and
>
>> $ XXX -v 2>&1 | sed -ne 's|.*
>> \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
> and provide the output of each.

$ grep CC= config_host.mk
export
CC=C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/1416~1.270/bin/HostX64/x64/cl.exe

$
C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/1416~1.270/bin/HostX64/x64/cl.exe
-v
Compilateur d'optimisation Microsoft (R) C/C++ version▒19.16.27026.1 pour
x64
Copyright (C) Microsoft Corporation. Tous droits r▒serv▒s.

cl▒: Ligne de commande warning D9002▒: option '-v' inconnue ignor▒e
cl▒: Ligne de commande error D8003▒: nom de fichier de la source absent


$
C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/1416~1.270/bin/HostX64/x64/cl.exe
-v 2>&1 | sed -ne 's|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'

empty

Julien





--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

On 25/01/2019 10:55, julien2412 wrote:
> $
> C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/1416~1.270/bin/HostX64/x64/cl.exe
> -v
> Compilateur d'optimisation Microsoft (R) C/C++ version▒19.16.27026.1 pour

So that character between "version" and "19" (presumably meant to be a
no-break space) obviously isn't liked by that sed regex in nss's
configure.in; it expects to see a true space before the digit sequence.

In principle, you could add a patch to external/nss to adapt that regex
in nspr/configure (which presumably doesn't get rebuilt from
nspr/configure.in during our build) to handle either a true space or
whatever other character you have there.  In practice, that may be
complicated by cl outputting its text with a different code page than
what your cygwin shell's locale expects, so coming up with a meaningful
regex may be nontrivial.  You could also try to see whether nss upstream
has some fix on offer.

> x64
> Copyright (C) Microsoft Corporation. Tous droits r▒serv▒s.
>
> cl▒: Ligne de commande warning D9002▒: option '-v' inconnue ignor▒e
> cl▒: Ligne de commande error D8003▒: nom de fichier de la source absent
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

sberg wrote

> On 25/01/2019 10:55, julien2412 wrote:
>> $
>> C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/1416~1.270/bin/HostX64/x64/cl.exe
>> -v
>> Compilateur d'optimisation Microsoft (R) C/C++ version▒19.16.27026.1 pour
>
> So that character between "version" and "19" (presumably meant to be a
> no-break space) obviously isn't liked by that sed regex in nss's
> configure.in; it expects to see a true space before the digit sequence.
> ..

Just for curiosity, what's the result for you with the cl commands you
provided me?
I mean I suppose you must have this non break character too and so sed
command should also fail for you, shouldn't it?

I changed the sed command and runned:
$
C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/1416~1.270/bin/HostX64/x64/cl.exe
-v 2>&1 | sed -ne
's|.*\([0-9]\+[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'

I got:
$ 19.16.27026.1

Here's the before/after of sed:
sed -ne 's|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
sed -ne
's|.*\([0-9]\+[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'

Does it seem ok to you?

Julien



--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

On 25/01/2019 11:48, julien2412 wrote:
> Just for curiosity, what's the result for you with the cl commands you
> provided me?
> I mean I suppose you must have this non break character too and so sed
> command should also fail for you, shouldn't it?

I get

> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27024.1 for x64
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
> cl : Command line warning D9002 : ignoring unknown option '-v'
> cl : Command line error D8003 : missing source filename

with a true space.

> I changed the sed command and runned:
> $
> C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/1416~1.270/bin/HostX64/x64/cl.exe
> -v 2>&1 | sed -ne
> 's|.*\([0-9]\+[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
>
> I got:
> $ 19.16.27026.1
>
> Here's the before/after of sed:
> sed -ne 's|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
> sed -ne
> 's|.*\([0-9]\+[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
>
> Does it seem ok to you?

Yeah, that should work, at least as a workaround.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

sberg wrote

> ...
>> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27024.1 for x64
>> Copyright (C) Microsoft Corporation.  All rights reserved.
>>
>> cl : Command line warning D9002 : ignoring unknown option '-v'
>> cl : Command line error D8003 : missing source filename
>
> with a true space.
> ...
> Yeah, that should work, at least as a workaround.

Now to avoid to patch the package, the idea would be to know why I get
something else than a plain space. Perhaps something to configure on Cygwin
(codepage, LC, ...)
Let's dig on Google...

Julien



--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Mike Kaganski Mike Kaganski
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

On 25.01.2019 14:06, julien2412 wrote:
>
> Now to avoid to patch the package, the idea would be to know why I get
> something else than a plain space. Perhaps something to configure on Cygwin
> (codepage, LC, ...)
> Let's dig on Google...

You could change your VS language to English possibly. And file an issue
to the package upstream.

--
Best regards,
Mike Kaganski
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Could not determine MSC version (Visual Studio 2017)

Kaganski Mike wrote
>>...
> You could change your VS language to English possibly. And file an issue
> to the package upstream.

About the issue, I found
https://bugzilla.mozilla.org/show_bug.cgi?id=1238154

So now either we can patch locally waiting for a fix on upstream or change
VS language.

Julien




--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

[SOLVED] Could not determine MSC version (Visual Studio 2017)