Giter VIP home page Giter VIP logo

Comments (14)

railwaycat avatar railwaycat commented on September 7, 2024 2

@chuxubank 感谢思路,我用这个 entitlement 搞定了!

emacs-mac 新的 cask release 已经可以使用 dynamic module 了。

from emacs-rime.

railwaycat avatar railwaycat commented on September 7, 2024 1

vterm 也有同样的问题,但找不到好的办法…感觉目前可行的只有不给 cask 做签名了

railwaycat/homebrew-emacsmacport#192

from emacs-rime.

chuxubank avatar chuxubank commented on September 7, 2024 1

vterm 也有同样的问题,但找不到好的办法…感觉目前可行的只有不给 cask 做签名了

railwaycat/homebrew-emacsmacport#192

https://github.com/eraserhd/parinfer-rust/blob/master/extra-docs/MacOS-Code-Signing.adoc

之前看到这篇文章说可能是 Entitlements 的问题?

com.apple.security.cs.disable-library-validation entitlement

from emacs-rime.

DogLooksGood avatar DogLooksGood commented on September 7, 2024

猜测有没有可能是 Cask 的 Emacs 和 dylib 不是在同一个机器编译导致的?

from emacs-rime.

chuxubank avatar chuxubank commented on September 7, 2024

应该不是主要原因?
因为原先在 cask 版本上使用 liberime 没有问题
另外我 build 出来 是.so 文件,这个有关系吗?

from emacs-rime.

DogLooksGood avatar DogLooksGood commented on September 7, 2024

build 出来是 .so 的似乎是 mac emacs 26 的 module-file-suffix.so,27 里面修正了这个问题。

可能需要比对一下 liberime 最后构建的命令和 emacs-rime 在 mac 上面的区别。目前没有什么头绪。

from emacs-rime.

chuxubank avatar chuxubank commented on September 7, 2024

好的,不着急,开 issue 主要是想记录一下,我有时间的话自己研究研究

from emacs-rime.

wsw0108 avatar wsw0108 commented on September 7, 2024

https://stackoverflow.com/questions/13695466/mac-os-x-code-signing-and-executable-validation

可能liberime用的cmake处理了这个code signature

from emacs-rime.

cnsunyour avatar cnsunyour commented on September 7, 2024

这可能不是个案问题,我注意到 libvterm 在 brew cask 安装的 emacs-mac 里也是不能正常编译的。(好像也是可以编译,不能加载)

from emacs-rime.

chuxubank avatar chuxubank commented on September 7, 2024

可能liberime用的cmake处理了这个code signature

有可能, 今天大致看了一下 liberime 的 CMakeLists.txt, 感觉可能是

add_library(erime-core SHARED "")

这个设置会产生影响 (全凭猜测, 没咋用过 make 和 cmake).
以及参考 @cnsunyour 所说 libvterm 也不能加载的问题, 对比 libvterm 用的是

add_library(vterm-module MODULE vterm-module.c utf8.c elisp.c)

最后贴一下 CMake 的文档 add_library.
但是依然不知道和 macOS 的签名有什么联系...

from emacs-rime.

wsw0108 avatar wsw0108 commented on September 7, 2024

其他地方有个类似的问题,Shougo/vimproc.vim#284 (comment)

要是能让cask把Emacs安装到其他路径,可能就可以了。
没有mac环境,仅作参考。

from emacs-rime.

chuxubank avatar chuxubank commented on September 7, 2024

但 cask 其实就是装了个 Emacs.app/Applications 目录下, 然后软链接 /usr/local/bin/emacs

==> Artifacts
Emacs.app (App)
/Applications/Emacs.app/Contents/MacOS/Emacs.sh -> emacs (Binary)
/Applications/Emacs.app/Contents/MacOS/bin/ebrowse (Binary)
/Applications/Emacs.app/Contents/MacOS/bin/emacsclient (Binary)
/Applications/Emacs.app/Contents/MacOS/bin/etags (Binary)

这些应该都不是受 SIP 保护的目录...

eraserhd/parinfer-rust#42 (comment)

感觉也可能是新 emacs-mac 的 cask 的锅?

~ codesign -d -v /usr/local/bin/emacs
Executable=/Applications/Emacs.app/Contents/MacOS/Emacs.sh
Identifier=Emacs
Format=generic
CodeDirectory v=20200 size=165 flags=0x10000(runtime) hashes=1+2 location=embedded
Signature size=8993
Timestamp=Mar 25, 2020 at 10:25:25 AM
Info.plist=not bound
TeamIdentifier=3L5CAL23RF
Sealed Resources=none
Internal requirements count=2 size=220
➜  ~ codesign -d --entitlements - /usr/local/bin/emacs                           
Executable=/Applications/Emacs.app/Contents/MacOS/Emacs.sh

也就是文中的 A Signed Emacs with No Entitlements

from emacs-rime.

chuxubank avatar chuxubank commented on September 7, 2024

今天再次确认了一下, liberime 在 emacs-mac 的 cask 版本中也无法使用, 而在 formular 版中则可以使用, 基本确定是新 cask 的锅.

from emacs-rime.

DogLooksGood avatar DogLooksGood commented on September 7, 2024

随着 dynamic module 的使用变多,我觉得这个问题应该会很快得到修复。

from emacs-rime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.