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

feat: add libass #2346

Merged
merged 42 commits into from
Aug 14, 2023
Merged

feat: add libass #2346

merged 42 commits into from
Aug 14, 2023

Conversation

DreamOfIce
Copy link
Contributor

@DreamOfIce DreamOfIce commented Jul 19, 2023

  • add libass
  • new version and wasm support for harfbuzz
  • new version and wasm support for fribidi
  • optimize fribidi includes export

@DreamOfIce DreamOfIce changed the base branch from master to dev July 19, 2023 14:33
@DreamOfIce DreamOfIce closed this Jul 19, 2023
@DreamOfIce DreamOfIce reopened this Jul 19, 2023
@DreamOfIce
Copy link
Contributor Author

@waruqi win arm这个是什么原因导致的?

gen.tab\meson.build:32:22: ERROR: No build machine compiler for 'gen.tab/gen-unicode-version.c'

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@waruqi win arm what causes this?

gen.tab\meson.build:32:22: ERROR: No build machine compiler for 'gen.tab/gen-unicode-version.c'

@waruqi
Copy link
Member

waruqi commented Jul 20, 2023

不知道,你要看下它的 meson build 脚本了。。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I don't know, you have to look at its meson build script. .

@DreamOfIce
Copy link
Contributor Author

@waruqi Windows ARM的ci上有没有本机平台(x86_64)的工具链?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@waruqi Is there a toolchain for the native platform (x86_64) on ci for Windows ARM?

@waruqi
Copy link
Member

waruqi commented Jul 21, 2023

@waruqi Windows ARM的ci上有没有本机平台(x86_64)的工具链?

ci上?这个不清楚,你上面 logs 看看。。目前检测到的都是 arm的

checking for cl.exe ... C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\ARM64\cl.exe
checking for the c compiler (cc) ... cl.exe
checking for cl.exe ... C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\ARM64\cl.exe

@waruqi
Copy link
Member

waruqi commented Jul 21, 2023

win arm 的搞不定,可以暂时先不管。。这个目前是实验性的,不过也没事

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@waruqi Is there a toolchain for the native platform (x86_64) on ci for Windows ARM?

Yes, directly vs installer can install arm. . You google it.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Win arm is not sure, you can leave it alone for the time being. . This is currently experimental, but it's okay

@DreamOfIce
Copy link
Contributor Author

@waruqi Windows ARM的ci上有没有本机平台(x86_64)的工具链?

ci上?这个不清楚,你上面 logs 看看。。目前检测到的都是 arm的

checking for cl.exe ... C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\ARM64\cl.exe

checking for the c compiler (cc) ... cl.exe

checking for cl.exe ... C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\ARM64\cl.exe

看了下文档应该是都有的

@DreamOfIce
Copy link
Contributor Author

@waruqi 似乎xmake的autoconf集成在wasm环境下不会使用emconfigure和emmake来代替configure和make?为什么?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@waruqi It seems that xmake's autoconf integration will not use emconfigure and emmake instead of configure and make in the wasm environment? Why?

@DreamOfIce
Copy link
Contributor Author

另外,libass的wasm构建还是有问题,不行我就走xmake port了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


In addition, there is still a problem with the wasm construction of libass. If it doesn’t work, I will use the xmake port

@waruqi
Copy link
Member

waruqi commented Jul 22, 2023

另外,libass的wasm构建还是有问题,不行我就走xmake port了

你试试呗

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


In addition, there is still a problem with the wasm build of libass. If it doesn’t work, I will use the xmake port

try it

@DreamOfIce
Copy link
Contributor Author

@waruqi 移植过程中发现.asm文件没有正确生成,导致ar出错:
asm-error
进一步debug发现, 确实执行了相关命令,但gcc只有一条警告并没有输出任何文件:


/usr/bin/gcc -c -m64 -fvisibility=hidden -O3 -std=gnu99 -Ilibass -Ilibass/c -Ibuild -Ilibass/x86 -DARCH_X86 -DARCH_X86_64 -DCONFIG_ASM -isystem /usr/include/fribidi -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /root/.xmake/packages/z/zlib/v1.2.13/6c2566e3272548ea9aa218b4a6537908/include -o build/.objs/ass/linux/x86_64/release/libass/x86/be_blur.asm.o libass/x86/be_blur.asm
gcc: warning: libass/x86/be_blur.asm: linker input file unused because linking not done

这是什么问题?

@waruqi
Copy link
Member

waruqi commented Jul 26, 2023

看着像是 build/.objs/ass/linux/x86_64/release/libass/x86/be_blur.asm.o 这个文件不存在,你可以看下 汇编器执行后,有没有实际生成这个 .o 文件。。是不是 asm 空代码编译啥的 导致 .o 没实际输出

@DreamOfIce
Copy link
Contributor Author

@waruqi xmake本体dev分支版本的freebsd似乎炸了,缺依赖

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@waruqi The freebsd version of the dev branch of the xmake body seems to be blown up, lacking dependencies

@DreamOfIce
Copy link
Contributor Author

windows 那个是 shared 库,meson 编译生成 dll 时候,里面没有 -lz 导致,,估计也是 meson 的配置问题,你可以看看是否可以打 patch

那我patch下meson.build,如果是win shared就往flags里面加个 /lz ?

@waruqi
Copy link
Member

waruqi commented Aug 13, 2023

windows 那个是 shared 库,meson 编译生成 dll 时候,里面没有 -lz 导致,,估计也是 meson 的配置问题,你可以看看是否可以打 patch

那我patch下meson.build,如果是win shared就往flags里面加个 /lz ?

可以,也可以直接传 ldflags 进去 tools.meson 试试。。参考其他包

@DreamOfIce
Copy link
Contributor Author

呃:

cl : Command line warning D9002 : ignoring unknown option '/lz'

@waruqi
Copy link
Member

waruqi commented Aug 13, 2023

呃:

cl : Command line warning D9002 : ignoring unknown option '/lz'

msvc flag 不是 /l 还是 gcc 的。。直接 z.lib 就行了

@DreamOfIce
Copy link
Contributor Author

msvc flag 不是 /l 还是 gcc 的。。直接 z.lib 就行了

要不你来吧,我现在在外面

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


msvc flag is not /l or gcc's. . Just z.lib directly

Why don't you come, I'm outside now

@DreamOfIce
Copy link
Contributor Author

@waruqi 有什么头绪了嘛

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@waruqi any clue

@waruqi
Copy link
Member

waruqi commented Aug 13, 2023

found pkg-config 'C:\Strawberry\perl\bin\pkg-config.BAT' but it is Strawberry Perl and thus broken. Ignoring...
Found Pkg-config: NO
Found CMake: C:\Program Files\CMake\bin\cmake.EXE (3.27.1)
Run-time dependency freetype2 found: NO (tried pkgconfig and cmake)
Run-time dependency freetype found: YES 2.13.1

meson 找错了 pkg-config 。。找到系统 perl 的 pkg-config.bat 里面去了。。

按理 meson 的包,得配置 pkgconf 。。优先用这个的。。但是 find_tool pkgconf 没找到。。有点问题,需要调试下

@DreamOfIce
Copy link
Contributor Author

怪不得我复现不了,可能因为我系统只有那一个pkg-config

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


No wonder I can't reproduce it, maybe because my system only has that one pkg-config

@waruqi waruqi marked this pull request as ready for review August 14, 2023 10:40
@waruqi waruqi merged commit f6735eb into xmake-io:dev Aug 14, 2023
43 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants