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 klayout.exe #1114

Closed
kongfu1994 opened this issue Jul 7, 2022 · 11 comments
Closed

Failed to run klayout.exe #1114

kongfu1994 opened this issue Jul 7, 2022 · 11 comments

Comments

@kongfu1994
Copy link

Compiled according to the steps, run Klayout.exe, can not open without any error

@klayoutmatthias
Copy link
Collaborator

Please provide more information about your system, the build environment, version etc.

@nikosavola
Copy link
Contributor

Compiled according to the steps, run Klayout.exe, can not open without any error

I recently had problems with missing DLL-files in #1108.
It is easiest to open klayout.exe from the MSYS terminal in this case.

@klayoutmatthias
Copy link
Collaborator

Well, building, running and debugging binaries takes some knowledge. I can't help with that - you need to be familiar with how DLLs are managed and how to debug DLL problems (Dependencies is my friend).

In the sources you will find a script (scripts/deploy-win-mingw.sh) which does packaging for you - provided you have installed NSIS for creating the installer. This script needs to be run from MSYS2 prompt and is finally the one I use to create the binary distributions with.

As @kongfu1994 has not yet explained what his actual problem is, I tend to close this issue.

@kongfu1994
Copy link
Author

image

I use MSYS2 to build klayout,and install the packages with pacman:pacman -S make zip mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-python3 mingw-w64-x86_64-qt5 mingw-w64-x86_64-ruby

and run this script ./scripts/deploy-win-mingw.sh -64

why cannot run compiler 'g++'

@klayoutmatthias
Copy link
Collaborator

klayoutmatthias commented Jul 13, 2022

Please read the documentation carefully: Either you proceed like on Linux with "build.sh" (on MSYS2 MinGW 64 shell) or you use "./scripts/deploy-win-mingw.sh". In the latter case, use a standard MSYS2 shell, not MSYS MinGW. You will also need NSIS installed and it may be required to patch the build script to point it to NSIS.

I recomment build.sh.

I just checked myself and compilation passed with "build.sh". However, I found that with g++ 12.1 from current MSYS there is a problem with the instantiation of certain objects and klayout.exe will not start. I do not know yet if that is a compiler issue and whether there is a workaround.

@klayoutmatthias
Copy link
Collaborator

Update: the problem isn't a KLayout issue but appears to be related to std::type_info::before which does does not indicate some type info structures as different which in fact they are. Both type infos come from different DLL's, so I assume the handling of such type infos inside gcc 12.1/MinGW is broken.

So bottom line is: for building KLayout MSYS2 with gcc 12.1 KLayout needs a patch.

@kongfu1994
Copy link
Author

kongfu1994 commented Jul 15, 2022

image

Thanks for the reply. Now, I have successfully compiled version 0.28 and version 0.27.10 with msys2 on windows10 system, but there is a common problem. After double-clicking klayout.exe, there is no response. In the task manager, the Klayout Application flashed by.

This is the log:
log.txt

@klayoutmatthias
Copy link
Collaborator

This is what I mean by the analysis above. The problem is rooted in the latest compiler that MSYS2 comes with. I am analysing the problem and I think I have a patch. But it takes some more testing before I can publish it.

@kongfu1994
Copy link
Author

Please let me know when the patch is released, thanks

@klayoutmatthias
Copy link
Collaborator

I have published a patch which makes master and 0.27 branches build on latest MSYS2. I hope this will stay so for some more rolling MSYS updates.

I have also updated the instructions: https://www.klayout.de/build.html#build_windows_msys

Please note the part about creating a file defining the Python paths.

Matthias

@kongfu1994
Copy link
Author

Thanks for the support, klayout can run normally based on the latest code

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

3 participants