Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Problem with CPack #357

Closed
Arcnor opened this issue Mar 15, 2021 · 3 comments
Closed

Problem with CPack #357

Arcnor opened this issue Mar 15, 2021 · 3 comments

Comments

@Arcnor
Copy link

Arcnor commented Mar 15, 2021

Hello,

I've been trying to build an iOS library using Polly & CPack, with the following command line:

polly --config Debug --toolchain ios-nocodesign-13-2-dep-9-3-arm64 --clear --pack ZIP

Although the build finishes correctly, CPack cannot find the compiled library because it's looking for it in the wrong path, probably because EFFECTIVE_PLATFORM_NAME is not being set. I don't know where that is being set, but it seems to work for everything except CPack. This is the output I'm getting:

** BUILD SUCCEEDED **

Execute command: [
  `cpack`
  `-C`
  `Debug`
  `--verbose`
  `-GZIP`
]

[/Users/.../_builds/ios-nocodesign-13-2-dep-9-3-arm64]> "cpack" "-C" "Debug" "--verbose" "-GZIP"

CPack: Enable Verbose
CPack Verbose: Read CPack config file:
CPack Verbose: Read CPack configuration file: /Users/.../_builds/ios-nocodesign-13-2-dep-9-3-arm64/CPackConfig.cmake
CPack Verbose: Specified generator: ZIP
CPack Verbose: Use generator: cmCPackArchiveGenerator
CPack Verbose: For project: MyProj
CPack: Create package using ZIP
CPack Verbose: Read description file: /usr/local/Cellar/cmake/3.19.4/share/cmake/Templates/CPack.GenericDescription.txt
CPack Verbose: [ZIP] requested component grouping = ONE_PER_GROUP
CPack Verbose: Remove toplevel directory: /Users/.../_builds/ios-nocodesign-13-2-dep-9-3-arm64/_CPack_Packages/Darwin/ZIP
CPack: Install projects
CPack: - Install project: MyProj [Debug]
CPack Verbose: Install configuration: "Debug"
CMake Error at /Users/.../_builds/ios-nocodesign-13-2-dep-9-3-arm64/cmake_install.cmake:42 (file):
  file INSTALL cannot find
  "/Users/.../_builds/ios-nocodesign-13-2-dep-9-3-arm64/Debug/libmyproj.a":
  No such file or directory.

The path Debug should be Debug-iphoneos as everything is being compiled inside that path. Looking at those generated cmake files I see that the path is being set as /Debug${EFFECTIVE_PLATFORM_NAME}/ so as mentioned, I'm assuming this is not being set for some reason.

Am I missing something else on my command line, or is this a bug somewhere?

Thanks in advance!

@ruslo
Copy link
Owner

ruslo commented Mar 21, 2021

"cpack" "-C" "Debug" "--verbose" "-GZIP"

That's an issue in CMake, Polly is just a wrapper.

Try --archive instead of --pack.

@Arcnor
Copy link
Author

Arcnor commented Mar 21, 2021

Hi, thanks for your answer!

I understand Polly is a wrapper, but I imagine Polly is also the source of that EFFECTIVE_PLATFORM_NAME variable? --archive only zips/tar-gzs stuff together, while I need a cpack invocation. That seems to work fine except for that variable definition, currently I'm manually adding it and everything works after calling cpack again, but I expect this to be a bug somewhere.

@Arcnor
Copy link
Author

Arcnor commented Mar 22, 2021

So it looks like it's not Polly adding that variable, but Xcode, so I'm closing this as there is a CMake issue related to this (https://gitlab.kitware.com/cmake/cmake/-/issues/20023 which seems to have been patched on CMake 3.19.5 but doesn't work for me for some reason).

Thanks again and sorry for the noise.

@Arcnor Arcnor closed this as completed Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants