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

Dependency error when porting (minizip[bzip2]) #18416

Closed
playgithub opened this issue Jun 13, 2021 · 11 comments · Fixed by #18472
Closed

Dependency error when porting (minizip[bzip2]) #18416

playgithub opened this issue Jun 13, 2021 · 11 comments · Fixed by #18472
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@playgithub
Copy link
Contributor

When porting xlsxio, link error as below, but minizip[bzip2] as a dependency has been installed with the same triplet

minizip.lib(unzip.c.obj) : error LNK2019: unresolved external symbol __imp_BZ2_bzDecompressInit referenced in function unzOpenCurrentFile3
minizip.lib(unzip.c.obj) : error LNK2019: unresolved external symbol __imp_BZ2_bzDecompress referenced in function unzReadCurrentFile
minizip.lib(unzip.c.obj) : error LNK2019: unresolved external symbol __imp_BZ2_bzDecompressEnd referenced in function unzCloseCurrentFile
xlsxio_read.dll : fatal error LNK1120: 3 unresolved externals

vcpkg.json for port xlsxio

{
  "name": "xlsxio",
  "version-string": "commit-e3acace39e5fb153f5ce3500a4952c2bf93175bd",
  "port-version": 1,
  "description": "Cross-platform C library for reading values from and writing values to .xlsx files",
  "homepage": "https://github.com/brechtsanders/xlsxio",
  "dependencies": [
    "expat",
    {
      "name": "minizip",
      "features": [
        "bzip2"
      ]
    }
  ],
  "features": {
    "libzip": {
      "description": "use libzip instead of minizip",
      "dependencies": [
        {
          "name": "libzip",
          "features": [
            "bzip2"
          ]
        }
      ]
    },
    "wide": {
      "description": "also build utf-16 library"
    }
  }
}
@playgithub
Copy link
Contributor Author

Problem located
#18448

@Neumann-A
Copy link
Contributor

Problem located

not really. Reopen this and close #18448

@playgithub playgithub reopened this Jun 15, 2021
@playgithub
Copy link
Contributor Author

playgithub commented Jun 15, 2021

Problem located

not really. Reopen this and close #18448

Alright, compiling succeeds, but linking fails.

ports/minizip/CONTROL

Source: minizip
Version: 1.2.11
Port-Version: 8
Build-Depends: zlib
Homepage: https://github.com/madler/zlib
Description: Zip compression library
Supports: !uwp

Feature: bzip2
Build-Depends: bzip2
Description: Support compression using bzip2 library

minizip[bzip2] depends on bzip2, the port xlsxio depends on minizip[bzip2], but port xlsxio depend on bzip2 implicitly, is it a bug?

@Neumann-A
Copy link
Contributor

Alright, compiling succeeds, but linking fails.

Two reasons:
a) no find_dependency(BZip2) in the minizipConfig.cmake
a) no linkage against the BZip2 target in the minizipTargets.cmake

@playgithub
Copy link
Contributor Author

Alright, compiling succeeds, but linking fails.

Two reasons:
a) no find_dependency(BZip2) in the minizipConfig.cmake
a) no linkage against the BZip2 target in the minizipTargets.cmake

I'm not so familiar with cmake and vcpkg. Hope someone to fix it.
I'm learning CMake now.
Thanks

@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label Jun 16, 2021
@JackBoosY
Copy link
Contributor

Please test my changes in #18472.

Thanks.

@playgithub
Copy link
Contributor Author

playgithub commented Jun 16, 2021

Please test my changes in #18472.

Thanks.

It has passed all the checks, I'll test it when the PR is merged.

Thanks

@playgithub
Copy link
Contributor Author

playgithub commented Jun 17, 2021

@JackBoosY
I've tested, still the same probem.

@ras0219-msft
The problem seems not fixed, could you reopen this?

@JackBoosY
Copy link
Contributor

JackBoosY commented Jun 17, 2021

@playgithub It passed on my machine.
Can you please also provide the related logs?

@JackBoosY JackBoosY reopened this Jun 17, 2021
@playgithub
Copy link
Contributor Author

playgithub commented Jun 17, 2021

@playgithub It passed on my machine.
Can you please also provide the related logs?

The logs for the errors are exactly the same.
https://dev.azure.com/vcpkg/public/_build/results?buildId=55036&view=logs&jobId=c7e67a25-2047-5d01-7913-57de0573f534&j=c7e67a25-2047-5d01-7913-57de0573f534

@JackBoosY
Copy link
Contributor

I can confirm this issue was fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants