Skip to content

Conversation

@chpatrick
Copy link
Contributor

@chpatrick chpatrick commented Aug 30, 2025

I'm picking up #390412 by @usertam. This PR additionally upgrades to the unstable OpenImageIO branch.

Outstanding problems:

COLMAP uses FreeImage which is very insecure and abandoned, although they intend to replace it with OpenImageIO (3384). This is in progress: colmap/colmap#3459

libjpeg-turbo in nixpkgs recently dropped support for FreeImage (608422bd4ba434d02278602bc74c46d10bfde2ba). This is totally understandable, but unfortunately it means people can't build COLMAP even at their own risk. I've reverted this now, but I'm not sure that's the best thing to do.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@chpatrick chpatrick requested a review from nh2 August 30, 2025 17:04
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Aug 30, 2025
@chpatrick chpatrick force-pushed the colmap-3.12.5 branch 2 times, most recently from bbbee45 to 470bfa5 Compare August 30, 2025 18:42
@chpatrick chpatrick changed the title colmap: 3.9.1 -> 3.12.5, poselib: init at 2.0.4 colmap: 3.9.1 -> 3.12.5, poselib: init at 2.0.4, python3Packages.colmap: init at 3.12.5 Aug 31, 2025
@nixpkgs-ci nixpkgs-ci bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Aug 31, 2025
@nix-owners nix-owners bot requested a review from natsukium August 31, 2025 14:16
Copy link
Contributor

@nh2 nh2 left a comment

Choose a reason for hiding this comment

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

Overall look good to me. I reviewed and did not test.

I mark as "Request changes" only because:

  • the formatting CI fails; OK to merge from my side once that's fixed
  • this needs to target staging because of 10.rebuild-linux: 5001+ ; probably because of the libjpeg_turbo patch removal revert

@chpatrick chpatrick force-pushed the colmap-3.12.5 branch 3 times, most recently from 0479796 to 289992c Compare September 8, 2025 19:04
@chpatrick chpatrick changed the title colmap: 3.9.1 -> 3.12.5, poselib: init at 2.0.4, python3Packages.colmap: init at 3.12.5 colmap: 3.9.1 -> unstable-2025-08-21, poselib: init at 2.0.4, python3Packages.colmap: init at unstable-2025-08-21 Sep 8, 2025
@chpatrick
Copy link
Contributor Author

chpatrick commented Sep 8, 2025

Per discussions on matrix I switched it to the latest state of the COLMAP OpenImageIO branch. This depends on #419220 or #438171.

@nixpkgs-ci nixpkgs-ci bot removed 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. labels Sep 8, 2025
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. and removed 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Sep 28, 2025
Copy link
Contributor

@nh2 nh2 left a comment

Choose a reason for hiding this comment

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

Generally looks good but the mega-patch needs some handling. Godo to merged after that in my opinion.

Comment on lines +57 to +58
cudatoolkit
cudaPackages.cuda_cudart.static
Copy link
Contributor

Choose a reason for hiding this comment

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

While moving this code and in case you're interested in picking up maintainership of colmap:

  • cudaPackagages.cudatoolkit is a symlinkJoin of a bunch of other things and we try to avoid it
  • lib.getStatic

Copy link
Contributor

Choose a reason for hiding this comment

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

Also a bit confusing to call these pythonDeps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That all sounds good but I'm not sure how that works and it sounds like it would need upstream to switch to FindCudaToolkit. We can do it, but I'd like to get the package unbroken first.

]
++ lib.optionals cudaSupport [
autoAddDriverRunpath
];

passthru.updateScript = gitUpdater { };
passthru.pythonDeps = pythonDeps;
Copy link
Contributor

Choose a reason for hiding this comment

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

Passthru are weird about splicing... I wonder if the better choice would be to just add a dev output and use propagatedBuildInputs (propagatedNativeBuildInputs for cuda_nvcc)

Copy link
Contributor

Choose a reason for hiding this comment

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

(even though, conceptually, I wish Nixpkgs used propagatedBuildInputs less, and passthru more)

Copy link
Contributor

Choose a reason for hiding this comment

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

@SomeoneSerge What exactly do you mean by "weird about splicing"?

In any case, it seems acceptable to me to do it this way for now to unbreak the package; if a different way is cleaner, we can still do that as a follow-up.

@chpatrick chpatrick changed the title colmap: 3.9.1 -> unstable-2025-08-21, poselib: init at 2.0.4, python3Packages.colmap: init at unstable-2025-08-21 colmap: 3.9.1 -> unstable-3.12.5-openimageio, poselib: init at 2.0.4 Oct 2, 2025
@chpatrick chpatrick changed the base branch from staging to master October 2, 2025 22:54
@nixpkgs-ci nixpkgs-ci bot closed this Oct 2, 2025
@nixpkgs-ci nixpkgs-ci bot reopened this Oct 2, 2025
@chpatrick
Copy link
Contributor Author

chpatrick commented Oct 2, 2025

I have decided to take pycolmap out for now since that depends on pybind 3.0.1 and also on sizmailov/pybind11-stubgen#263. Let's merge this to master first then do pycolmap when the dependencies are solved.

@chpatrick chpatrick changed the title colmap: 3.9.1 -> unstable-3.12.5-openimageio, poselib: init at 2.0.4 colmap: 3.9.1 -> 3.12.5-unstable-openimageio, poselib: init at 2.0.4 Oct 2, 2025
@chpatrick chpatrick force-pushed the colmap-3.12.5 branch 2 times, most recently from f46528f to 68417b2 Compare October 2, 2025 23:02
@nixpkgs-ci nixpkgs-ci bot removed the 6.topic: python Python is a high-level, general-purpose programming language. label Oct 2, 2025
@chpatrick chpatrick changed the title colmap: 3.9.1 -> 3.12.5-unstable-openimageio, poselib: init at 2.0.4 colmap: 3.9.1 -> 3.12.5-unstable-openimageio, poselib: init at 2.0.5 Oct 2, 2025
Copy link
Contributor

@nh2 nh2 left a comment

Choose a reason for hiding this comment

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

My requests regarding the patch were addressed, I verified it, and the package builds and runs. Merging.

@nh2
Copy link
Contributor

nh2 commented Oct 3, 2025

The ofborg darwin builds are still queued (for 20h by now) amd are blocking the merge button.

So I'll click

[x] Merge without waiting for requirements to be met (bypass rules)

for that, as in the past I have also waited extremely long for Darwin ofborg.

If that's wrong, somebody tell me.

If the package fails on Darwin on Hydra, we can take it out as a follow-up.

@nh2 nh2 merged commit 5be2221 into NixOS:master Oct 3, 2025
30 of 32 checks passed
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants