[problem help] WSL 的deepin,xmake无法使用
Tofloor
poster avatar
雪松2020
deepin
2024-02-23 09:51
Author

刚刚新安装了 wsl 的 deepin,用 apt 安装 xmake 后,使用 xmake create 创建了一个项目,不改任何代码,进入项目根目录后运行xmake,输出如下:

checking for platform ... linux
checking for architecture ... x86_64
[ 25%]: cache compiling.release src/main.cpp
[ 50%]: linking.release testxmake
error: cannot import module: private.check.checkers.api.target.license, not found!

大家帮忙看下是什么问题?在网上没找到相关的情况。。。

Reply Favorite View the author
All Replies
雪松2020
deepin
2024-02-23 09:54
#1

使用g++ 直接编译是可以通过的,系统本身的编译工具链没问题。

Reply View the author
翻过山峰看见云
deepin
2024-02-23 10:07
#2

https://github.com/xmake-io/xmake/issues/3685

看到个类似的,需要切换到非root用户

Reply View the author
owen_337
deepin testing team
2024-02-23 10:12
#3

楼主你好,楼上说的对,用普通用户create可以成功,

截图_选择区域_20240223101127.png

image.png

Reply View the author
雪松2020
deepin
2024-02-23 11:15
#4
It has been deleted!
雪松2020
deepin
2024-02-23 11:22
#5

感谢大佬们回复!

在我别的电脑上独立安装的deepin系统,xmake是可以使用的。现在是在windows 11 的wsl2 中,安装微软商店中的deepin wsl 版,使用的是系统默认用户执行的xmake;

检查root目录,ls -al输出如下,没有xmake相关文件:

total 20
drwx------ 3 root root 4096 Feb 22 16:27 .
drwxr-xr-x 22 root root 4096 Feb 23 09:08 ..
-rw-r--r-- 1 root root 571 Nov 23 2022 .bashrc
-rw-r--r-- 1 root root 161 Nov 23 2022 .profile
drwx------ 2 root root 4096 Feb 22 16:27 .ssh

检查默认用户的家目录,没有 .xmake 字样的文件夹

使用adduser新建一个用户,设置都是默认值,切换新用户并进入到新用户家目录中,执行 xmake create testxmake 输出

‘’‘

create testxmake ...
[+]: xmake.lua
[+]: src/main.cpp
[+]: .gitignore
create ok!

‘’‘

进入到testxmake目录中执行xmake,仍然输出:

'''

checking for platform ... linux
checking for architecture ... x86_64
[ 25%]: cache compiling.release src/main.cpp
[ 50%]: linking.release testxmake
error: cannot import module: private.check.checkers.api.target.license, not found!

'''

Reply View the author
ruki
deepin
2024-03-06 22:34
#6

这是由于上游 debian 的打包配置中,有一行配置,把 xmake 内部的 license.lua 脚本文件给误删了导致

后来,上游 debian 修复了这个问题,我在 deepin 上也反馈过这个问题,但似乎 deepin 这边一直没有同步修复

https://github.com/linuxdeepin/developer-center/issues/6886#issuecomment-1895848982

这个错误,不影响编译和日常使用,但是每次构建会有这个错误。。

具体解决办法,就是修改 debian 的打包脚本,忽略对 license.lua 的剔除。

相关 patch 参考

https://salsa.debian.org/xmake-team/xmake/-/commit/81103ad8416f7983b05f2f1d9dca27688691a861
https://salsa.debian.org/xmake-team/xmake/-/commit/73346623a87e303d5c642cfb6ba67605787a0236

Reply View the author
ruki
deepin
2024-03-06 22:36
#7
owen_337

楼主你好,楼上说的对,用普通用户create可以成功,

截图_选择区域_20240223101127.png

image.png

创建工程不会触发这个错误,只有在每次 xmake build 构建工程时候,才会触发到

Reply View the author
owen_337
deepin testing team
2024-03-07 11:07
#8
ruki

这是由于上游 debian 的打包配置中,有一行配置,把 xmake 内部的 license.lua 脚本文件给误删了导致

后来,上游 debian 修复了这个问题,我在 deepin 上也反馈过这个问题,但似乎 deepin 这边一直没有同步修复

https://github.com/linuxdeepin/developer-center/issues/6886#issuecomment-1895848982

这个错误,不影响编译和日常使用,但是每次构建会有这个错误。。

具体解决办法,就是修改 debian 的打包脚本,忽略对 license.lua 的剔除。

相关 patch 参考

https://salsa.debian.org/xmake-team/xmake/-/commit/81103ad8416f7983b05f2f1d9dca27688691a861
https://salsa.debian.org/xmake-team/xmake/-/commit/73346623a87e303d5c642cfb6ba67605787a0236

好的,这个情况会跟踪解决,感谢反馈。

@longlong 麻烦大佬看下这个情况哈

Reply View the author
longlong
deepin
Developer
2024-03-07 11:08
#9
ruki

这是由于上游 debian 的打包配置中,有一行配置,把 xmake 内部的 license.lua 脚本文件给误删了导致

后来,上游 debian 修复了这个问题,我在 deepin 上也反馈过这个问题,但似乎 deepin 这边一直没有同步修复

https://github.com/linuxdeepin/developer-center/issues/6886#issuecomment-1895848982

这个错误,不影响编译和日常使用,但是每次构建会有这个错误。。

具体解决办法,就是修改 debian 的打包脚本,忽略对 license.lua 的剔除。

相关 patch 参考

https://salsa.debian.org/xmake-team/xmake/-/commit/81103ad8416f7983b05f2f1d9dca27688691a861
https://salsa.debian.org/xmake-team/xmake/-/commit/73346623a87e303d5c642cfb6ba67605787a0236

稍后我更新下源里面的xmake 把这俩patch加上

Reply View the author
owen_337
deepin testing team
2024-03-08 13:55
#10
ruki

创建工程不会触发这个错误,只有在每次 xmake build 构建工程时候,才会触发到

目前已经得到修复,请关注官方推送公告哈,感谢你的反馈与支持。
截图_选择区域_20240308134439.png

Reply View the author
雪松2020
deepin
2024-03-13 10:31
#11

感谢大佬们关注修复这个问题,更新后,已经可以正常使用了😃

Reply View the author