这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@tesuji
Copy link
Owner

@tesuji tesuji commented Oct 15, 2020

No description provided.

@tesuji tesuji force-pushed the i2358-meson-rc-msvc branch 2 times, most recently from ea4bb81 to 16a0e03 Compare October 16, 2020 12:27
@tesuji tesuji force-pushed the i2358-meson-rc-msvc branch from 16a0e03 to 82a7b75 Compare October 16, 2020 12:32
@tesuji
Copy link
Owner Author

tesuji commented Oct 16, 2020

Hi @o-mdr, I somewhat fixed the issue in .rc file preprocessor. However, I am stuck with some unresolved symbols,
as you can see in CI. I'm using msvc compiler without visual studio:

[48/60] Linking target programs/zstd.exe
FAILED: programs/zstd.exe programs/zstd.pdb 
"link"  /MACHINE:x64 /OUT:programs/zstd.exe programs/programs_.._.._.._build_VS2010_zstd_zstd.rc_zstd.res programs/zstd.exe.p/.._.._.._programs_zstdcli.c.obj programs/zstd.exe.p/.._.._.._programs_util.c.obj programs/zstd.exe.p/.._.._.._programs_timefn.c.obj programs/zstd.exe.p/.._.._.._programs_fileio.c.obj programs/zstd.exe.p/.._.._.._programs_benchfn.c.obj programs/zstd.exe.p/.._.._.._programs_benchzstd.c.obj programs/zstd.exe.p/.._.._.._programs_datagen.c.obj programs/zstd.exe.p/.._.._.._programs_dibio.c.obj "/nologo" "/release" "/nologo" "/DEBUG" "/PDB:programs\zstd.pdb" "lib\zstd.lib" "C:/vcpkg/packages/zlib_x64-windows/lib/pkgconfig/../../lib/zlib.lib" "C:/Strawberry/c/lib/pkgconfig/../../lib/liblzma.a" "C:/lz4/lib/lz4.lib" "/SUBSYSTEM:CONSOLE" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib"
.._.._.._programs_fileio.c.obj : error LNK2019: unresolved external symbol ZSTD_cycleLog referenced in function FIO_adjustParamsForPatchFromMode
.._.._.._programs_benchzstd.c.obj : error LNK2019: unresolved external symbol ZSTD_XXH64 referenced in function BMK_benchMemAdvancedNoAlloc
.._.._.._programs_dibio.c.obj : error LNK2019: unresolved external symbol ZDICT_trainFromBuffer_unsafe_legacy referenced in function DiB_trainFromFiles
programs\zstd.exe : fatal error LNK1120: 3 unresolved externals

Copy link

@o-mdr o-mdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi! I know you are working on this, I thought I'd share some thoughts in case you may find them helpful.

pip install -U meson
- run: |
git clone https://github.com/lzutao/lz4/ third-party\lz4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, do we want to use your version of lz4 and not the official one? In case your version becomes out of date?

meson setup `
--buildtype=release `
-Ddefault_library=shared `
-Dprefix=C:\lz4 `
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some machines may not have disk C. Will this be used anywhere outside of build machine? If so, will it be better to use a relative path for this?

- run: |
git clone https://github.com/lzutao/lz4/ third-party\lz4
cd third-party\lz4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think lz4 is in vcpkg, like zlib below. Will be great to use the same approach for the dependencies

-Dbin_programs=true `
-Dbin_contrib=true `
-Ddefault_library=shared `
-Dpkg_config_path="C:\vcpkg\packages\zlib_x64-windows\lib\pkgconfig;C:\lz4\lib\pkgconfig" `
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relying on hard coded paths, may not work on all the systems. Consider replacing with ENV variable, or there's a way vcpkg installs things

@tesuji
Copy link
Owner Author

tesuji commented Oct 19, 2020

Thank you for your reviews. My goal with CI changes is to create an environment
to check my change in meson config. I have no intend to include them
in Zstd CI config.

Actually, I want to use vcpkg too. But as you could see:

  • vcpkg is slower than manual installing lz4
  • I'm not an advanced Windows and CMake users, the lz4 packages installed by vcpkg
    doesn't include .pc file. Also its installed cmake config is not standard. I don't think
    meson is able to understand vcpkg yet.

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