Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to run custom build command for mozjs_sys v0.68.1 #26010

Open
santoshpavan opened this issue Mar 22, 2020 · 7 comments
Open

failed to run custom build command for mozjs_sys v0.68.1 #26010

santoshpavan opened this issue Mar 22, 2020 · 7 comments
Labels

Comments

@santoshpavan
Copy link
Contributor

@santoshpavan santoshpavan commented Mar 22, 2020

I am not sure what is causing this error while building. Build worked fine a few days ago.
Windows 10 OS.
Here is the entire error-
https://gist.github.com/santoshpavan/cd7bffa5ae1491df9c2d5d1a25f4fbe9

I have tried removing python 3 from path as mentioned in this Issue - #13550
It hasn't worked for me.

Any help is much appreciated. Thank you.

@jdm
Copy link
Member

@jdm jdm commented Mar 22, 2020

cargo:warning=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\yvals_core.h(294,5):  error: STL1000: Unexpected compiler version, expected Clang 7 or newer.
cargo:warning=   #error STL1000: Unexpected compiler version, expected Clang 7 or newer.

This is strange, since the Servo build system sets up clang 8 to be in the path before the build begins. This suggests to me that you may have another version of LLVM installed that is conflicting; is it possible to uninstall that?

@santoshpavan
Copy link
Contributor Author

@santoshpavan santoshpavan commented Mar 22, 2020

I had installed LLVM as it was mentioned in the pre-requisites that it would speed the build up on windows.
I uninstalled it now and ran the build again.
It has failed and the same error has been shown.
The error in detail - https://gist.github.com/santoshpavan/7190cb869a55fc512160eaf9fce98d98

@jdm
Copy link
Member

@jdm jdm commented Mar 22, 2020

Try and figure out what clang-cl.exe is actually pointing to? It seems to believe there's an older version of clang installed still.

@jdm
Copy link
Member

@jdm jdm commented Mar 22, 2020

Maybe you installed clang through visual studio as well?

@CYBAI CYBAI added the P-windows label Mar 23, 2020
@santoshpavan
Copy link
Contributor Author

@santoshpavan santoshpavan commented Mar 23, 2020

I found that the clang that is being mapped is the clang that belongs to Anaconda.
Anaconda seems to be hijacking the clang. So, I have uninstalled it and tried the build.
(If I understand right, I should not installed the clang separately as it is taken care of during the build. Please correct me if I am wrong here.)

  1. Just to make sure, I uninstalled and installed the Visual Studio carefully using chocolaty.
  2. I also cloned the repo again to build from the beginning.
  3. I checked if clang was indeed already there using clang --version which showed that it is not there.

The build has failed. The complete error build can be found here - https://gist.github.com/santoshpavan/5cf98dc67ee5fdda12ce797e61d176f0
If I am understanding right, the error is because of Python 2.7? But I checked, it is in the environment variables.
Can you please suggest what is to be done in this case?
Thank you.

@jdm
Copy link
Member

@jdm jdm commented Mar 23, 2020

The error is:

DEBUG: Executing: `c:/servo/.servo/msvc-dependencies/llvm/8.0.1/bin/clang-cl.exe -Xclang -std=gnu99 -I 'C:/Program Files (x86)/Windows Kits/10/include/10.0.17763.0/um' -I 'C:/Program Files (x86)/Windows Kits/10/include/10.0.17763.0/shared' -E 'c:\users\santo\appdata\local\temp\conftest.z9mzyg.c'`
INFO: 0x0a00 in 'C:\Program Files (x86)\Windows Kits\10\'
INFO: checking for Universal CRT SDK...
INFO: 10.0.17763.0 in 'C:\Program Files (x86)\Windows Kits\10\'
ERROR: GetShortPathName returned a long path name: `c:/PROGRA~2/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe`. Use `fsutil file setshortname' to create a short name for any components of this path that have spaces.

I've never seen that before!

@skrzyp1
Copy link
Contributor

@skrzyp1 skrzyp1 commented Jun 8, 2020

I had same problem while setting env in fresh VM.
Using suggested solution actually worked:
fsutil file setshortname "C:/PROGRA~2/Windows Kits" wk~1
I had to use it one more time on another path with spaces and build passed.
fsutil file setshortname "C:/PROGRA~2/Microsoft Visual Studio" msvs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.