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

deploy issue #48

Open
dsus4wang opened this issue Feb 9, 2023 · 5 comments
Open

deploy issue #48

dsus4wang opened this issue Feb 9, 2023 · 5 comments

Comments

@dsus4wang
Copy link

Hi Kazzz-S,
I am a M1 Mac user. After I update MacOS from 13.0 to 13.2, there comes a few problems in deploy(build4mac.py -y) procedure and I can not run the newly deployed klayout.app.
(1):
qt5Brew.build.macos-Ventura-release-RsysPnil.log
This is the log file of compiling the program, It seems no error output.
-----(If I excute build4mac.py -q qt5brew -r sys -p nil -Y)-----
(2.1):
deploy_log.log
This is the log file of deploying the .app ,There are so many warnings about install_name_tool.
(2.2):
Then I ran the klayout.app, It crashed immediately, it is an EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid)).Logs are below
crash_log.log
-----(If I excute build4mac.py -q qt5brew -r sys -p nil -y)-----
deploy_ex.log
This is the log file of deploying the .app, There are many warnings about install_name_tool, too.
But after finishing deploying ,I successfully open the klayout app.

I found this link, they discuss may the same problem.
Could you please help me solve this problem? Thanks!
Ethan

@Kazzz-S
Copy link
Owner

Kazzz-S commented Feb 9, 2023

Hi @dsus4wang,

Let's examine them one by one.

(1):
qt5Brew.build.macos-Ventura-release-RsysPnil.log
This is the log file of compiling the program, It seems no error output.

First of all, your compilation was NOT successful.
There are 3 errors detected while compiling as shown below.
3errors

These are the same errors I showed in #46 (comment)

You can confirm a successful build by the last build log messages generated by the main "build.sh" like:

:
:
:
Build successfully done. <===
Artefacts were installed to /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release <===

Without a successful build, deployment is meaningless.

You need to modify the Ruby header files as follows.

===================================================================================================
(base) Ventura2{kazzz-s} ruby (1)% pwd
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/\
System/Library/Frameworks/Ruby.framework/Headers/ruby

(base) Ventura2{kazzz-s} ruby (2)% ll | grep config
-rw-r--r--  1 root wheel 13236  1  3 07:44 config.h     <=== modified
-rw-r--r--  1 root wheel 13020 11 13 05:59 config.h.org <=== original

(base) Ventura2{kazzz-s} ruby (3)% diff config.h*
422,426c422,423
< // #define RUBY_ARCH "universal-"RUBY_PLATFORM_OS
< // #define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
< // Ref. https://github.com/brianmario/charlock_holmes/issues/146#issuecomment-884448326
< #define RUBY_ARCH "universal-" RUBY_PLATFORM_OS
< #define RUBY_PLATFORM "universal." RUBY_PLATFORM_CPU "-" RUBY_PLATFORM_OS
---
> #define RUBY_ARCH "universal-"RUBY_PLATFORM_OS
> #define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
===================================================================================================
(base) Ventura2{kazzz-s} ruby (4)% ll | grep intern
-rw-r--r--  2 root wheel 36652  1  3 07:45 intern.h
-rw-r--r--  1 root wheel 36616 11  5 14:01 intern.h.org

(base) Ventura2{kazzz-s} ruby (5)% diff intern.h*
56,57c56
< //void rb_mem_clear(register VALUE*, register long);
< void rb_mem_clear(VALUE*,  long);
---
> void rb_mem_clear(register VALUE*, register long);
===================================================================================================

Whenever Xcode is upgraded, these changes are reset. Therefore, we need to modify them again!
My Xcode version is:
Xcode

Good luck.

Kazzz-S

@dsus4wang
Copy link
Author

qt5Brew.build.macos-Ventura-release-RsysPnil.log
Sorry for the mistake.Here is the correct log file.

@Kazzz-S
Copy link
Owner

Kazzz-S commented Feb 9, 2023

OK, I understood. No worry.
Let me check.

@Kazzz-S
Copy link
Owner

Kazzz-S commented Feb 9, 2023

I've built 0.28.5 on my Intel Mac with ./build4mac.py -q qt5brew -r sys -p nil, then, deployed with both -Y and -y options.

There were no such warnings in both deployments.
deploy-with-y-for-EX.log
deploy-with-Y-for-LW.log

And both the "klayout.app" bundles start up normally.
I've also run a simple DRC Ruby macro, which works fine, too.
Therefore, I could not obtain any useful information.

It is apparent that the present build system for macOS is not compliant with the latest macOS supporting M1|M2.
Without an actual M1|M2 machine, it is almost impossible to debug and test this issue.
So far, I do not have the plan to buy a new Mac with M1|M2.

Would you be willing to take on this problem if possible?

Kazzz-S

@dsus4wang
Copy link
Author

Hi,
I found a new point(It solve the problem but I don't know why):When I excute ./build4mac.py -q qt5brew -r sys -p nil -y (FULLY DEPLOY) , the deployed "EX-qt5Brew.pkg.macos-Ventura-release-RsysPnil/klayout.app" works well.

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

No branches or pull requests

2 participants