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

[BUG][Windows] librime-emacs.dll 在默认的makefile下windows平台无法编译通过 #227

Open
Yatogaii opened this issue Dec 22, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Yatogaii
Copy link

问题描述

使用scoop安装emacs,librime,官网安装器安装小狼毫。
使用straight包管理器(doom)安装完毕rime后,进入emacs执行 rime-compile-module 报错 Compile Rime dynamic module failedshell-command-output 信息如下:

gcc lib.c -o librime-emacs.dll -fPIC -O2 -Wall -I C:\Scoop\apps\librime\current\include/ -I c:/Scoop/apps/emacs/current/include/ -shared -L C:\Scoop\apps\librime\current\lib/ -Wl,-rpath C:\Scoop\apps\librime\current\lib/ -lrime
process_begin: CreateProcess(NULL, gcc lib.c -o librime-emacs.dll -fPIC -O2 -Wall -I C:\Scoop\apps\librime\current\include/ -I c:/Scoop/apps/emacs/current/include/ -shared -L C:\Scoop\apps\librime\current\lib/ -Wl,-rpath C:\Scoop\apps\librime\current\lib/ -lrime, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:40: lib] Error 2

把这一个命令放到PowerShell里执行报错是 -Wl,rpath 这里有问题,手动删掉这一部分后能正常编译出 librime-emacs.dll 文件。

之后尝试手动修改makefile,但是修改完makefile之后进入emacs仍然编译失败,看了看日志是修改的makefile没有生效,不知道为什么。

请问有什么办法解决吗?

Emacs中的配置

(use-package rime
  :custom
  (default-input-method "rime"))

复现方式(安装遇到问题时省略)

复现问题所需的操作

是否可在 emacs -Q 中复现

是/否

截图

image

环境信息

  • 操作系统:windows11
  • Emacs版本:29.1
  • Librime版本:1.8.5-1
  • Librime安装方式:Scoop
  • 安装方式:Straight(doom)
@Yatogaii Yatogaii added the bug Something isn't working label Dec 22, 2023
@Yatogaii
Copy link
Author

Update: 使用powershell手动在 ~/.emacs.d/.local/straight/build/emacs-29.1/rime 这个路径里面编译出来 librime-emacs.dll 可以跳过在emacs里编译dll这一步,能正常用了。

但是仍然不知道这算不算是一个需要修复的BUG。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant