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

ponyc build error summary on windows #3544

Closed
damon-kwok opened this issue May 8, 2020 · 5 comments
Closed

ponyc build error summary on windows #3544

damon-kwok opened this issue May 8, 2020 · 5 comments

Comments

@damon-kwok
Copy link
Contributor

damon-kwok commented May 8, 2020

LLVM build error and fix method

PS D:\msys64\home\damon\.ome_local\repo\ponyc-git> .\make.ps1 libs Source directory: D:\msys64\home\damon\.ome_local\repo\ponyc-git Build directory: D:\msys64\home\damon\.ome_local\repo\ponyc-git\build\build Libs directory: D:\msys64\home\damon\.ome_local\repo\ponyc-git\build\libs Output directory: D:\msys64\home\damon\.ome_local\repo\ponyc-git\build\release Temp directory: C:\Users\damon\AppData\Local\Temp make.ps1 libs -Config Release -Generator "Visual Studio 16 2019" -Prefix "D:\msys64\home\damon\.ome_local\repo\ponyc-git\build\install" -Version "0.34.1-87b473d" Configuring libraries... cmake.exe -B "D:\msys64\home\damon\.ome_local\repo\ponyc-git\build\build_libs" -S "D:\msys64\home\damon\.ome_local\repo\ponyc-git\lib" -G "Visual Studio 16 2019" -A x64 -Thost=x64 -DCMAKE_INSTALL_PREFIX="D:\msys64\home\damon\.ome_local\repo\ponyc-git\build\libs" -DCMAKE_BUILD_TYPE=Release -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.18363. -- Updating submodules... Applying patches... Checking D:/msys64/home/damon/.ome_local/repo/ponyc-git/lib/llvm/patches/2019-12-23-01-jit-eh-frames.diff Already applied D:/msys64/home/damon/.ome_local/repo/ponyc-git/lib/llvm/patches/2019-12-23-01-jit-eh-frames.diff Checking D:/msys64/home/damon/.ome_local/repo/ponyc-git/lib/llvm/patches/2020-01-07-01-c-exports.diff Already applied D:/msys64/home/damon/.ome_local/repo/ponyc-git/lib/llvm/patches/2020-01-07-01-c-exports.diff -- The ASM compiler identification is unknown -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.26.28720/bin/Hostx64/x64/cl.exe CMake Error at llvm/src/llvm/CMakeLists.txt:49 (project): The CMAKE_ASM_COMPILER:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.26.28720/bin/Hostx64/x64/cl.exe

is not a full path to an existing compiler tool.

-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "D:/msys64/home/damon/.ome_local/repo/ponyc-git/build/build_libs/CMakeFiles/CMakeOutput.log".
See also "D:/msys64/home/damon/.ome_local/repo/ponyc-git/build/build_libs/CMakeFiles/CMakeError.log".
Exception: D:\msys64\home\damon.ome_local\repo\ponyc-git\make.ps1:157
Line |
157 | if ($err -ne 0) { throw "Error: exit code $err" }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Error: exit code 1

  • Fix method:
    lib\llvm\src\llvm:51
project(LLVM
  VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
  LANGUAGES C CXX ASM_MASM) # `ASM` change to:`ASM_MASM`

I also know that if ARM is supported on Windows, it needs to be changed to: ASM_MARMASM

libponyrt build error and fix method

libponyrt/mem/pool.c:82

typedef struct pool_block_t
{ pool_block_t(){} // Added: pool_block_t(){}
  struct pool_block_t* prev;
  union
  {
    struct pool_block_t* next;
    PONY_ATOMIC(struct pool_block_t*) global; //Note,  PONY_ATOMIC(T) is a  `std::atomic<T>` it need a Constructor
  };
  size_t size;
  PONY_ATOMIC(bool) acquired;
} pool_block_t;

This problem will occur in the context of vs2019. I found that the CI system of pony did not find this problem, or maybe other problems. I am not sure whether it is worth the PR.

vs2019 preview build ponyc problem and fix method

make.ps1:56

$cmakePath = $(Get-Item $( Invoke-Expression '& "$vswhere" -prerelease -latest -requires Microsoft.VisualStudio.Component.VC.CMake.Project -find Common7/IDE/**/cmake.exe ' )).Directory.FullName
# "$vswhere" -latest change to: "$vswhere" -prerelease -latest

But considering that vs2019 preview is not an official version, I am not sure if this is worth PR

@SeanTAllen
Copy link
Member

everything in lib/llvm/src is LLVM source code and you would need to get a change into LLVM. That isn't source that we have control over.

I find it hard to understand what your changes are, can you please provide diffs instead?

@SeanTAllen
Copy link
Member

@damon-kwok the CI doesn't find the problems because they aren't problems with the systems that we support.

@SeanTAllen
Copy link
Member

@damon-kwok here are what we support for Windows:

https://github.com/ponylang/ponyc/blob/master/BUILD.md#windows

If you would like to expand what is supported, please provide a PR that works shows that it continues to work with those and will also works for you.

@SeanTAllen
Copy link
Member

Without your changes, what is the error you get?

@damon-kwok
Copy link
Contributor Author

damon-kwok commented Jul 8, 2020

@SeanTAllen
problem-1 : The latest code does not appear. This may be due to my testing problem at the time, and if it appears again, I will submit an issue alone.
problem-2: @kulibali solved it in #3576
problem-3: I solved it in #3587 (Without my changed,It will prompt "No Visual Studio 2017+ was found in the system.")
So, if #3578 is successfully merged, this issue can be closed.

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

No branches or pull requests

2 participants