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

macos尝试构建失败 #76

Closed
ghost opened this issue Oct 15, 2022 · 8 comments
Closed

macos尝试构建失败 #76

ghost opened this issue Oct 15, 2022 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ghost
Copy link

ghost commented Oct 15, 2022

描述问题

预期行为:使用github actions编译

实际行为:编译失败

日志
详细:https://github.com/tdjnodj/nekoray/actions/runs/3254351545/jobs/5342488251

节选:
cannot execute binary file
[2/68] Automatic MOC for target qhotkey
ninja: build stopped: subcommand failed.
Error: Process completed with exit code 1.

请问一下这个怎么解决

@arm64v8a
Copy link
Contributor

FAILED: go/gen/libcore.pb.h go/gen/libcore.pb.cc /Users/runner/work/nekoray/nekoray/build/go/gen/libcore.pb.h /Users/runner/work/nekoray/nekoray/build/go/gen/libcore.pb.cc 
cd /Users/runner/work/nekoray/nekoray/build && /Users/runner/work/nekoray/nekoray/libs/deps/built/bin/protoc-3.21.4.0 --cpp_out :/Users/runner/work/nekoray/nekoray/build -I /Users/runner/work/nekoray/nekoray /Users/runner/work/nekoray/nekoray/go/gen/libcore.proto
/bin/sh: /Users/runner/work/nekoray/nekoray/libs/deps/built/bin/protoc-3.21.4.0: cannot execute binary file

应该是下载到 Linux 的 Cache 了,所以无法执行。

https://github.com/tdjnodj/nekoray/blob/ad03a5a94f95662842a33cde17dbec1821fee064/.github/workflows/build-qv2ray-cmake.yml#L101-L111

这里改成

        with:
          path: libs/deps
          key: DepsCache-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.qt_version }}-${{ hashFiles('libs/build_deps_*.sh') }}

另外有些功能还需要适配,我不确定编译出来的是否工作

@ghost
Copy link
Author

ghost commented Oct 15, 2022

FAILED: go/gen/libcore.pb.h go/gen/libcore.pb.cc /Users/runner/work/nekoray/nekoray/build/go/gen/libcore.pb.h /Users/runner/work/nekoray/nekoray/build/go/gen/libcore.pb.cc 
cd /Users/runner/work/nekoray/nekoray/build && /Users/runner/work/nekoray/nekoray/libs/deps/built/bin/protoc-3.21.4.0 --cpp_out :/Users/runner/work/nekoray/nekoray/build -I /Users/runner/work/nekoray/nekoray /Users/runner/work/nekoray/nekoray/go/gen/libcore.proto
/bin/sh: /Users/runner/work/nekoray/nekoray/libs/deps/built/bin/protoc-3.21.4.0: cannot execute binary file

应该是下载到 Linux 的 Cache 了,所以无法执行。

https://github.com/tdjnodj/nekoray/blob/ad03a5a94f95662842a33cde17dbec1821fee064/.github/workflows/build-qv2ray-cmake.yml#L101-L111

这里改成

        with:
          path: libs/deps
          key: DepsCache-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.qt_version }}-${{ hashFiles('libs/build_deps_*.sh') }}

另外有些功能还需要适配,我不确定编译出来的是否工作

又失败了。。。
https://github.com/tdjnodj/nekoray/actions/runs/3255471291/jobs/5344822128

@arm64v8a
Copy link
Contributor

https://github.com/MatsuriDayo/nekoray/actions/runs/3259871387

这里编译通过了,但是还没有打包,QT库也没有带。你看看怎么打包好?

据我所知macOS有某种沙箱机制,运行的时候可以带上 -appdata。如果必须要这样才能运行,会考虑为mac系统强制启用这个选项。

@arm64v8a arm64v8a mentioned this issue Oct 18, 2022
@arm64v8a arm64v8a added enhancement New feature or request help wanted Extra attention is needed labels Oct 18, 2022
@arm64v8a
Copy link
Contributor

arm64v8a commented Oct 18, 2022

已经打包成dmg,并且强制开启了 -appdata
不过core可能还起不来。没有设备测试。

https://github.com/MatsuriDayo/nekoray/suites/8850716114/artifacts/403726741

@ghost
Copy link
Author

ghost commented Oct 21, 2022

已经打包成dmg,并且强制开启了 -appdata 不过core可能还起不来。没有设备测试。

https://github.com/MatsuriDayo/nekoray/suites/8850716114/artifacts/403726741

error:
您使用的是 macOS %@。该应用程序要求 macOS %@ 或更高版本。

@ghost ghost closed this as completed Oct 21, 2022
@ghost ghost reopened this Oct 21, 2022
@arm64v8a
Copy link
Contributor

这个是在 macos11 编译的。你的系统足够新吗?

用目前 actions 最旧的 10.15 重新编译了。

https://github.com/MatsuriDayo/nekoray/suites/8893681697/artifacts/406812671

@ghost
Copy link
Author

ghost commented Oct 21, 2022

这个是在 macos11 编译的。你的系统足够新吗?

用目前 actions 最旧的 10.15 重新编译了。

https://github.com/MatsuriDayo/nekoray/suites/8893681697/artifacts/406812671

好吧,我的问题,我的版本太旧了,qt都装不了

@ghost ghost closed this as completed Oct 21, 2022
@ghost
Copy link
Author

ghost commented Oct 21, 2022

这个是在 macos11 编译的。你的系统足够新吗?

用目前 actions 最旧的 10.15 重新编译了。

https://github.com/MatsuriDayo/nekoray/suites/8893681697/artifacts/406812671

可以参考qv2ray,原版编译出来就没限制版本,而这个分支编译出来的就不行。

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant