lordgamez commented on PR #2130:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2130#issuecomment-4027012100

   > I really don't like this change, because when dependencies are broken, 
pinning package versions is a hacky workaround that doesn't fix the underlying 
problem, only makes it work temporarily. But I couldn't really tell you that 
earlier, without offering a better alternative solution or workaround, which 
requires digging deeper than usual code review. I did that today.
   > 
   > The problem is not specific to github actions or their ubuntu image: it 
seems that in their APT repo, LLVM changed their versioned libc++ packages 
(like libc++1-20, libc++-20-dev, libc++abi.*) to be an empty package with 
dependency on the main libc++ package, but with a version spec of version = 20. 
Since we've enabled both llvm-toolchain-jammy and llvm-toolchain-jammy-20, 
installing libc++-20 from llvm-toolchain-jammy-20 resulted in its libc++1 
dependency to be found in llvm-toolchain-jammy, with version = 23, which didn't 
meet the version requirement. I'm not actually sure about this part, APT errors 
are cryptic.
   > 
   > I believe LLVM made a mistake by changing their packages to depend on an 
unversioned libc++ with a package version restriction. According to [this 
comment](https://github.com/llvm/llvm-project/issues/144501#issuecomment-2982743493),
 the change was intentional, their thinking being that libc++ has an ABI 
backwards compatibility guarantee, so using a newer libc++ will provide the 
same functionality, which makes sense, but for some reason, the availability of 
the newer package causes installation issues anyway with APT. But there is a 
better alternative workaround:
   > 
   > Remove the lines adding the llvm-toolchain-jammy repos to the repo file. 
Adding them seems to be a mistake that stems from the confusing docs on 
apt.llvm.org. They are not necessary to install clang-20 and its dependencies, 
and removing it prevents apt finding the newer libc++ version that causes the 
dependency issues.
   > 
   > I've tested the change here: 
[szaszm@4d6f4c5#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fL283](https://github.com/szaszm/nifi-minifi-cpp/commit/4d6f4c54023e65bf97a95117008b8b9345df5c57#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fL283)
   
   Thanks for checking up on this and the detailed explanation, I removed the 
unnecessary repository from the apt sources in 
https://github.com/apache/nifi-minifi-cpp/pull/2130/commits/28dc7e565a19b2e02b12fdba6363c69b1367d71c
 Still a bit strange how it only became an issue now when the change seems to 
be there for months. There were some changes recently in the github runner 
images but it's unclear what caused the sudden package conflicts. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to