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

Freeimage fails to compile under package.install_locally #5821

Open
01Pollux opened this issue Nov 24, 2024 · 3 comments
Open

Freeimage fails to compile under package.install_locally #5821

01Pollux opened this issue Nov 24, 2024 · 3 comments
Labels

Comments

@01Pollux
Copy link
Contributor

Xmake Version

v2.9.6+HEAD.abd15c255

Operating System Version and Architecture

Windows 11 23H2

Describe Bug

when enabling package.install_locally, the freeimage package fails to be built.

Expected Behavior

the freeimage package to be built.

Project Configuration

add_rules("mode.debug")

set_policy("package.install_locally", true)
add_requires("freeimage", {configs = {shared = true, rgb = true}})

-- add target
target("sample")
    set_kind("binary")
    add_packages("freeimage")
    add_files("*.cpp")

Additional Information and Error Logs

freeimage.txt

@01Pollux 01Pollux added the bug label Nov 24, 2024
@star-hengxing
Copy link
Contributor

I can't reproduce it. Maybe a bug caused by windows MAX_PATH.
Try this code in freeimage package.

if is_host("windows") then
    set_policy("platform.longpaths", true)
end

@star-hengxing
Copy link
Contributor

star-hengxing commented Nov 26, 2024

Another way, we can unbundle the package dep (libwebp) to fix it. A lot of work, but conan is done. We can "steal" this patch.
https://github.com/conan-io/conan-center-index/tree/f6c9cffc94ab4251d6c61cc20bc64115b381854c/recipes/freeimage/all/patches

@01Pollux
Copy link
Contributor Author

I can't reproduce it. Maybe a bug caused by windows MAX_PATH. Try this code in freeimage package.

if is_host("windows") then
    set_policy("platform.longpaths", true)
end

Unfortunately, this didn't fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants