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

liblas: fix build with boost 1.86 #369334

Merged
merged 1 commit into from
Dec 31, 2024
Merged

Conversation

imincik
Copy link
Contributor

@imincik imincik commented Dec 30, 2024

Disable setting of C++98 standard which was dropped in boost 1.84.0.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Copy link
Contributor

@paparodeo paparodeo left a comment

Choose a reason for hiding this comment

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

alternatively can fix the compile error by removing `-std=c++98'.

diff --git a/pkgs/by-name/li/libLAS/package.nix b/pkgs/by-name/li/libLAS/package.nix
index 5bec9b5f2075..f5e3ce2b0e84 100644
--- a/pkgs/by-name/li/libLAS/package.nix
+++ b/pkgs/by-name/li/libLAS/package.nix
@@ -45,6 +45,11 @@ stdenv.mkDerivation rec {
     })
   ];
 
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace-fail 'set(CMAKE_CXX_FLAGS "''${CMAKE_CXX_FLAGS} -std=c++98 -ansi")' '#'
+  '';
+
   nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
   buildInputs = [
     boost

@imincik
Copy link
Contributor Author

imincik commented Dec 30, 2024

alternatively can fix the compile error by removing `-std=c++98'.

diff --git a/pkgs/by-name/li/libLAS/package.nix b/pkgs/by-name/li/libLAS/package.nix
index 5bec9b5f2075..f5e3ce2b0e84 100644
--- a/pkgs/by-name/li/libLAS/package.nix
+++ b/pkgs/by-name/li/libLAS/package.nix
@@ -45,6 +45,11 @@ stdenv.mkDerivation rec {
     })
   ];
 
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace-fail 'set(CMAKE_CXX_FLAGS "''${CMAKE_CXX_FLAGS} -std=c++98 -ansi")' '#'
+  '';
+
   nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
   buildInputs = [
     boost

Thank you @paparodeo , looks as a good idea.

@ofborg ofborg bot requested review from sikmir, nialov, nh2, willcohen, autra and l0b0 December 30, 2024 15:29
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1 10.rebuild-linux: 1 labels Dec 30, 2024
@imincik
Copy link
Contributor Author

imincik commented Dec 31, 2024

I guess the problem is related to dropped support of C++98 in boost 1.84.0.

@lucasew
Copy link
Contributor

lucasew commented Dec 31, 2024

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 369334


x86_64-linux

⏩ 5 packages marked as broken and skipped:
  • gnuk
  • kdePackages.umbrello
  • kdePackages.umbrello.debug
  • kdePackages.umbrello.dev
  • kdePackages.umbrello.devtools
⏩ 1 package blacklisted:
  • nixos-install-tools
❌ 16 packages failed to build:
  • affine
  • ananicy
  • clatd
  • ikiwiki-full
  • libretranslate (python312Packages.libretranslate)
  • libretranslate.dist (python312Packages.libretranslate.dist)
  • looking-glass-client
  • nanoboyadvance
  • python312Packages.ltpycld2
  • python312Packages.ltpycld2.dist
  • python313Packages.ltpycld2
  • python313Packages.ltpycld2.dist
  • schedtool
  • spike
  • tayga
  • weylus
✅ 86 packages built:
  • anydesk
  • apacheHttpdPackages.subversion
  • apacheHttpdPackages.subversion.dev
  • apacheHttpdPackages.subversion.man
  • armTrustedFirmwareTools
  • biboumi
  • bonsai
  • cabal2nix
  • circt
  • circt.dev
  • circt.lib
  • dnsdbq
  • easytier
  • fusee-launcher
  • gdu
  • git-doc (git-doc.debug ,git-doc.doc ,gitFull.doc)
  • gitFull
  • gitFull.debug
  • gitSVN
  • gitSVN.debug
  • gitSVN.doc
  • hareThirdParty.hare-ev
  • hydra
  • hydra.doc
  • kdePackages.kdev-php
  • kdePackages.kdev-php.debug
  • kdePackages.kdev-php.dev
  • kdePackages.kdev-php.devtools
  • kdePackages.kdev-python
  • kdePackages.kdev-python.debug
  • kdePackages.kdev-python.dev
  • kdePackages.kdev-python.devtools
  • kdePackages.kdevelop
  • kdePackages.kdevelop.debug
  • kdePackages.kdevelop.dev
  • kdePackages.kdevelop.devtools
  • kdesvn
  • klipper-firmware
  • klipper-flash
  • lazyjournal
  • lgogdownloader
  • libLAS
  • livekit-libwebrtc
  • luarocks-packages-updater
  • luarocks-packages-updater.dist
  • mangojuice
  • nitrokey-trng-rs232-firmware
  • nix-prefetch-scripts
  • nix-prefetch-svn
  • nix-update-source
  • nix-update-source.dist
  • obs-do
  • opencomposite
  • owmods-cli
  • patroni
  • patroni.dist
  • perl538Packages.SVNSimple
  • perl538Packages.SVNSimple.devdoc
  • perl540Packages.SVNSimple
  • perl540Packages.SVNSimple.devdoc
  • pkgsite
  • python312Packages.pysvn
  • ydiff (python312Packages.ydiff)
  • ydiff.dist (python312Packages.ydiff.dist)
  • python313Packages.pysvn
  • python313Packages.ydiff
  • python313Packages.ydiff.dist
  • qmk
  • qmk.dist
  • rapidsvn
  • simavr
  • slackdump
  • subversion
  • subversion.dev
  • subversion.man
  • subversionClient
  • subversionClient.dev
  • subversionClient.man
  • svn-all-fast-export
  • svn2git
  • svnfs
  • thcrap-steam-proton-wrapper
  • vcstool
  • vcstool.dist
  • wp4nix
  • zed-editor

Disable setting of C++98 standard which was dropped in boost 1.84.0.

Co-authored-by: Reno Dakota <[email protected]
@imincik imincik changed the title liblas: pin boost version liblas: fix build with boost 1.86 Dec 31, 2024
@imincik
Copy link
Contributor Author

imincik commented Dec 31, 2024

@paparodeo , I replaced my fix with yours. Thank you ! Please review.

@imincik
Copy link
Contributor Author

imincik commented Dec 31, 2024

Result of nixpkgs-review pr 369334 run on x86_64-linux 1

1 package built:
  • libLAS

@imincik
Copy link
Contributor Author

imincik commented Dec 31, 2024

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 369334

x86_64-linux

⏩ 5 packages marked as broken and skipped:
⏩ 1 package blacklisted:
❌ 16 packages failed to build:
✅ 86 packages built:

@lucasew , looks like this report belongs to some other PR.

@imincik imincik requested a review from paparodeo December 31, 2024 09:33
Copy link
Contributor

@paparodeo paparodeo left a comment

Choose a reason for hiding this comment

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

LGTM. built on aarch64-darwin

@imincik
Copy link
Contributor Author

imincik commented Dec 31, 2024

Great thanks for help @paparodeo .

@imincik imincik merged commit 5bf9539 into NixOS:master Dec 31, 2024
46 checks passed
@imincik imincik deleted the liblas-pin-boost branch December 31, 2024 14:46
@lucasew
Copy link
Contributor

lucasew commented Dec 31, 2024

nixpkgs-review result

Generated using nixpkgs-review.
Command: nixpkgs-review pr 369334

x86_64-linux

⏩ 5 packages marked as broken and skipped:
⏩ 1 package blacklisted:
❌ 16 packages failed to build:
✅ 86 packages built:

@lucasew , looks like this report belongs to some other PR.

It looks like a ZFS issue. It's probably fixed by now.

imincik added a commit to imincik/geospatial-nix.repo that referenced this pull request Jan 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 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants