Skip to content

ifcopenshell: 240611 -> 0.7.10, fix build and activate most tests #312381

Merged
SuperSandro2000 merged 3 commits intoNixOS:masterfrom
autra:fix_ifcopenshell_build
Oct 8, 2024
Merged

ifcopenshell: 240611 -> 0.7.10, fix build and activate most tests #312381
SuperSandro2000 merged 3 commits intoNixOS:masterfrom
autra:fix_ifcopenshell_build

Conversation

@autra
Copy link
Contributor

@autra autra commented May 17, 2024

Description of changes

Fix the ifcopenshell build.

Fix #312380

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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 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.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label May 17, 2024
@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label May 17, 2024
@ofborg ofborg bot requested a review from fehnomenal May 17, 2024 07:47
@ofborg ofborg bot added 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. labels May 17, 2024
@autra autra force-pushed the fix_ifcopenshell_build branch from 2ae653e to 94650c5 Compare May 17, 2024 17:20
@autra
Copy link
Contributor Author

autra commented May 17, 2024

Ok now it's compiling, but I have a weird problem with the runtime lib. libxml2 is missing at runtime:

 ❯ ldd result/bin/IfcConvert
        linux-vdso.so.1 (0x00007ffed5cc0000)
        libTKernel.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKernel.so.7 (0x00007f73733f4000)
        libTKMath.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKMath.so.7 (0x00007f7373000000)
        libTKBRep.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKBRep.so.7 (0x00007f73732c5000)
        libTKGeomBase.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKGeomBase.so.7 (0x00007f7372a00000)
        libTKGeomAlgo.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKGeomAlgo.so.7 (0x00007f7372400000)
        libTKG3d.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKG3d.so.7 (0x00007f7372ed8000)
        libTKG2d.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKG2d.so.7 (0x00007f73729a1000)
        libTKShHealing.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKShHealing.so.7 (0x00007f7372000000)
        libTKTopAlgo.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKTopAlgo.so.7 (0x00007f7371c00000)
        libTKMesh.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKMesh.so.7 (0x00007f73722ed000)
        libTKPrim.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKPrim.so.7 (0x00007f737293a000)
        libTKBool.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKBool.so.7 (0x00007f7371600000)
        libTKBO.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKBO.so.7 (0x00007f7371200000)
        libTKFillet.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKFillet.so.7 (0x00007f7370e00000)
        libTKSTEP.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKSTEP.so.7 (0x00007f7370a00000)
        libTKSTEPBase.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKSTEPBase.so.7 (0x00007f7370600000)
        libTKSTEPAttr.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKSTEPAttr.so.7 (0x00007f7371a39000)
        libTKXSBase.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKXSBase.so.7 (0x00007f7370200000)
        libTKSTEP209.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKSTEP209.so.7 (0x00007f7371f57000)
        libTKIGES.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKIGES.so.7 (0x00007f736fc00000)
        libTKOffset.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKOffset.so.7 (0x00007f737004c000)
        libTKHLR.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKHLR.so.7 (0x00007f73710d9000)
        libTKBin.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKBin.so.7 (0x00007f7373290000)
        libhdf5_cpp.so.310 => /nix/store/l34mr0cav6k6798gfx99hz02w5wwv1as-hdf5-cpp-1.14.3/lib/libhdf5_cpp.so.310 (0x00007f7371580000)
        libhdf5.so.310 => /nix/store/l34mr0cav6k6798gfx99hz02w5wwv1as-hdf5-cpp-1.14.3/lib/libhdf5.so.310 (0x00007f736f600000)
        libz.so.1 => /nix/store/zph9xw0drmq3rl2ik5slg0n2frw9lw5m-zlib-1.3.1/lib/libz.so.1 (0x00007f7372eba000)
        libboost_system.so.1.79.0 => /nix/store/mcj6hbf8amfq4ii6kqi510d43xgjq6as-boost-1.79.0/lib/libboost_system.so.1.79.0 (0x00007f7373289000)
        libboost_program_options.so.1.79.0 => /nix/store/mcj6hbf8amfq4ii6kqi510d43xgjq6as-boost-1.79.0/lib/libboost_program_options.so.1.79.0 (0x00007f7371eeb000)
        libboost_regex.so.1.79.0 => /nix/store/mcj6hbf8amfq4ii6kqi510d43xgjq6as-boost-1.79.0/lib/libboost_regex.so.1.79.0 (0x00007f737152f000)
        libboost_thread.so.1.79.0 => /nix/store/mcj6hbf8amfq4ii6kqi510d43xgjq6as-boost-1.79.0/lib/libboost_thread.so.1.79.0 (0x00007f737291c000)
        libboost_date_time.so.1.79.0 => /nix/store/mcj6hbf8amfq4ii6kqi510d43xgjq6as-boost-1.79.0/lib/libboost_date_time.so.1.79.0 (0x00007f7372917000)
        libxml2.so.2 => not found
        libpcre.so.1 => /nix/store/pq0cj8f364jvv16yqvkc43cz2vwcwg03-pcre-8.45/lib/libpcre.so.1 (0x00007f7370d86000)
        libstdc++.so.6 => /nix/store/c2yb135iv4maadia5f760b3xhbh6jh61-gcc-13.2.0-lib/lib/libstdc++.so.6 (0x00007f736f200000)
        libm.so.6 => /nix/store/ddwyrxif62r8n6xclvskjyy6szdhvj60-glibc-2.39-5/lib/libm.so.6 (0x00007f737091d000)
        libgcc_s.so.1 => /nix/store/c2yb135iv4maadia5f760b3xhbh6jh61-gcc-13.2.0-lib/lib/libgcc_s.so.1 (0x00007f73722c8000)
        libc.so.6 => /nix/store/ddwyrxif62r8n6xclvskjyy6szdhvj60-glibc-2.39-5/lib/libc.so.6 (0x00007f736f013000)
        /nix/store/ddwyrxif62r8n6xclvskjyy6szdhvj60-glibc-2.39-5/lib/ld-linux-x86-64.so.2 => /nix/store/anlf335xlh41yjhm114swi87406mq5pw-glibc-2.38-44/lib64/ld-linux-x86-64.so.2 (0x00007f73735e5000)
        libpthread.so.0 => /nix/store/ddwyrxif62r8n6xclvskjyy6szdhvj60-glibc-2.39-5/lib/libpthread.so.0 (0x00007f7372910000)
        librt.so.1 => /nix/store/ddwyrxif62r8n6xclvskjyy6szdhvj60-glibc-2.39-5/lib/librt.so.1 (0x00007f737290b000)
        libdl.so.2 => /nix/store/ddwyrxif62r8n6xclvskjyy6szdhvj60-glibc-2.39-5/lib/libdl.so.2 (0x00007f7372904000)
        libTKCAF.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKCAF.so.7 (0x00007f7370556000)
        libTKBinL.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKBinL.so.7 (0x00007f73708bf000)
        libTKLCAF.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKLCAF.so.7 (0x00007f736fb04000)
        libTKCDF.so.7 => /nix/store/p2y06mqk94i5sapgja08fvf9g5lzabxb-opencascade-occt-7.6.2/lib/libTKCDF.so.7 (0x00007f73704f7000)
        libicudata.so.73 => /nix/store/qwnmd1a9zxfjqgkhv3jyyf86r9jm4gsq-icu4c-73.2/lib/libicudata.so.73 (0x00007f736d000000)
        libicui18n.so.73 => /nix/store/qwnmd1a9zxfjqgkhv3jyyf86r9jm4gsq-icu4c-73.2/lib/libicui18n.so.73 (0x00007f736cc00000)
        libicuuc.so.73 => /nix/store/qwnmd1a9zxfjqgkhv3jyyf86r9jm4gsq-icu4c-73.2/lib/libicuuc.so.73 (0x00007f736c800000)

I have no idea how to fix this problem, for me buildInputs was supposed to do the job (and it does so for opencascade)... @fehnomenal any idea?

@autra autra force-pushed the fix_ifcopenshell_build branch from 94650c5 to 350b351 Compare May 21, 2024 06:25
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/fixing-ifcopenshell-libxml2-not-found-by-linker-at-runtime/45764/1

@autra
Copy link
Contributor Author

autra commented May 22, 2024

Ok so I fixed my libxml2 issue by making this a regular package and not a python package (see last temp commit). So it's something to do with the way python packages are made.

Can I - and should I - split the lib and the python packaging into 2 derivations? That would allow freecad to depend only on one of them for instance.

@autra
Copy link
Contributor Author

autra commented May 22, 2024

That being said, my end goal is freecad ifc support, and apparently this needs python bindings, so I might not personnally need the split.

@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 22, 2024
@autra
Copy link
Contributor Author

autra commented May 23, 2024

I feel that I need mkDerivation (because it executes the patchElf phase) and buildPythonPackage. How can I combine the 2?

@autra autra force-pushed the fix_ifcopenshell_build branch from fa560fb to 192e18c Compare June 19, 2024 06:27
@autra autra force-pushed the fix_ifcopenshell_build branch from 192e18c to 689d08e Compare June 20, 2024 17:13
@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Jun 20, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Jun 20, 2024
@autra autra force-pushed the fix_ifcopenshell_build branch from 689d08e to f0b8a76 Compare July 2, 2024 09:09
@github-actions github-actions bot removed the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Jul 2, 2024
@autra autra mentioned this pull request Jul 2, 2024
12 tasks
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 6, 2024
@autra autra force-pushed the fix_ifcopenshell_build branch from f0b8a76 to af35a90 Compare July 10, 2024 17:11
@ofborg ofborg bot added 8.has: clean-up This PR removes packages or removes other cruft and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Jul 10, 2024
@autra autra force-pushed the fix_ifcopenshell_build branch from af35a90 to 67d241e Compare July 10, 2024 18:28
@autra autra force-pushed the fix_ifcopenshell_build branch from 67d241e to 640e0fc Compare July 23, 2024 16:36
@autra
Copy link
Contributor Author

autra commented Jul 23, 2024

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

2 packages failed to build:
  • python311Packages.ifcopenshell
  • python312Packages.ifcopenshell

@autra
Copy link
Contributor Author

autra commented Sep 6, 2024

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

2 packages built:
  • python311Packages.ifcopenshell
  • python312Packages.ifcopenshell

@autra
Copy link
Contributor Author

autra commented Sep 6, 2024

@natsukium hi! If I'm not mistaken, you're the code owner for this. Fehnomenal already approved it and I'm now maintainer. I think it's ready to get merged. Thanks!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4583

@autra autra removed the 8.has: package (new) This PR adds a new package label Sep 16, 2024
Copy link
Member

Choose a reason for hiding this comment

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

Can we use pytestCheckHook?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just for this line or for the whole checkPhase? I remembered I couldn't make it work, but as I don't remember why, I'll try again :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've kept the python tests.py thing in a preCheck, and used pytestCheckHook. Can you check if the way I did it is ok? I'm not quite sure...

@autra autra force-pushed the fix_ifcopenshell_build branch from 77ad89e to f197f9b Compare September 17, 2024 09:44
@autra
Copy link
Contributor Author

autra commented Sep 18, 2024

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

2 packages built:
  • python311Packages.ifcopenshell
  • python312Packages.ifcopenshell

@autra
Copy link
Contributor Author

autra commented Sep 18, 2024

@SuperSandro2000 @Artturin thanks for the comments! I've adressed them, please review again 😺

@autra autra removed the 12.first-time contribution This PR is the author's first one; please be gentle! label Sep 28, 2024
@autra autra force-pushed the fix_ifcopenshell_build branch 5 times, most recently from b3a0f4e to 0db6f1c Compare September 30, 2024 09:52
@autra
Copy link
Contributor Author

autra commented Sep 30, 2024

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

2 packages built:
  • python311Packages.ifcopenshell
  • python312Packages.ifcopenshell

@autra
Copy link
Contributor Author

autra commented Sep 30, 2024

@SuperSandro2000 this is ready again. Because for python release, ifcopenshell doesn't use the default tag scheme, I have added an updateScript. Please review again 😃

@autra autra force-pushed the fix_ifcopenshell_build branch from 0db6f1c to 922e530 Compare October 5, 2024 11:14
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

LGTM

@autra autra force-pushed the fix_ifcopenshell_build branch from 92f414e to 7e80e03 Compare October 5, 2024 18:21
@autra
Copy link
Contributor Author

autra commented Oct 5, 2024

Thanks @SuperSandro2000, updated with your suggestion!

@autra autra requested a review from SuperSandro2000 October 6, 2024 16:56
@SuperSandro2000 SuperSandro2000 merged commit 8a2d4e7 into NixOS:master Oct 8, 2024
@trofi
Copy link
Contributor

trofi commented Oct 9, 2024

tests.version needs a package parameter. Otherwise the eval fails as:

@autra autra deleted the fix_ifcopenshell_build branch October 9, 2024 12:59
@autra autra mentioned this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 8.has: clean-up This PR removes packages or removes other cruft 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. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ifcopenshell build is broken

8 participants