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

opencollada: include pcre.h (KhronosGroup/OpenCOLLADA#570) #44126

Merged

Conversation

eadwu
Copy link
Member

@eadwu eadwu commented Jul 26, 2018

Motivation for this change

Fixes build (or at least on nixOS)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@bendlas
Copy link
Contributor

bendlas commented Jul 31, 2018

attached patch fails against latest master

building '/nix/store/8fpiy3j76r10zs33r7ixp87s3n6d03xa-opencollada-1.6.63.drv'...
unpacking sources
unpacking source archive /nix/store/r1hcnhfaa8yjpxk6np664qypsh1c2aa5-source
source root is source
patching sources
applying patch /nix/store/baqax7h47drcc4iy2dn9kgyklad5pxn1-pcre.patch
patching file COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
Hunk #1 FAILED at 3 (different line endings).
Hunk #2 FAILED at 13 (different line endings).
Hunk #3 FAILED at 25 (different line endings).
Hunk #4 FAILED at 36 (different line endings).
4 out of 4 hunks FAILED -- saving rejects to file COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h.rej
builder for '/nix/store/8fpiy3j76r10zs33r7ixp87s3n6d03xa-opencollada-1.6.63.drv' failed with exit code 1
cannot build derivation '/nix/store/l82m8j90a0wd78z9y0hs6g6sxdgn34rj-blender-2.79b.drv': 1 dependencies couldn't be built
error: build of '/nix/store/l82m8j90a0wd78z9y0hs6g6sxdgn34rj-blender-2.79b.drv' failed

Looking at it, there seem to be some superflous whitespace changes in the attached patch. Maybe the merge conflict can be resolved, by just adding the PCRE include?

Could you link the original ticket(s), for reference?

@eadwu eadwu force-pushed the opencollada/resolve-pcre-declarations branch from 90bbd16 to e9198c8 Compare July 31, 2018 12:31
@eadwu
Copy link
Member Author

eadwu commented Jul 31, 2018

Does the new commit work? I guess I successfully isolated the hunk, though if I try to change the file endings in the hunk, it fails to get patched on mine, which results in the patch having unix line endings for the file but dos line endings in the hunk. (Original Issue: KhronosGroup/OpenCOLLADA#570)

@matthewbauer

This comment has been minimized.

@matthewbauer
Copy link
Member

@GrahamcOfBorg build opencollada

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: opencollada

Partial log (click to expand)

                                ^
/tmp/nix-build-opencollada-1.6.63.drv-0/source/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h:17:26: note: previous definition is here
typedef struct real_pcre pcre;
                         ^
1 error generated.
make[2]: *** [COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/build.make:76: COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/src/COLLADABUURI.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:362: COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
builder for '/nix/store/kji4l8dqj0cab5x1nhprqx97dp409v8p-opencollada-1.6.63.drv' failed with exit code 2
error: build of '/nix/store/kji4l8dqj0cab5x1nhprqx97dp409v8p-opencollada-1.6.63.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: opencollada

Partial log (click to expand)

-- Installing: /nix/store/yf2v0cs1dqxh7kvqabih9zh649bdyyn3-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWTexture.h
-- Installing: /nix/store/yf2v0cs1dqxh7kvqabih9zh649bdyyn3-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWValueType.h
-- Installing: /nix/store/yf2v0cs1dqxh7kvqabih9zh649bdyyn3-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWVertices.h
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/yf2v0cs1dqxh7kvqabih9zh649bdyyn3-opencollada-1.6.63
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/yf2v0cs1dqxh7kvqabih9zh649bdyyn3-opencollada-1.6.63/lib
patching script interpreter paths in /nix/store/yf2v0cs1dqxh7kvqabih9zh649bdyyn3-opencollada-1.6.63
checking for references to /build in /nix/store/yf2v0cs1dqxh7kvqabih9zh649bdyyn3-opencollada-1.6.63...
/nix/store/yf2v0cs1dqxh7kvqabih9zh649bdyyn3-opencollada-1.6.63

@eadwu
Copy link
Member Author

eadwu commented Aug 2, 2018

Does the build on darwin build without this PR? Don't have a machine with macOS currently installed so can't really test darwin builds.

@matthewbauer
Copy link
Member

Yeah macOS is broken too so it won't be a blocker.

@@ -21,6 +21,8 @@ stdenv.mkDerivation rec {

enableParallelBuilding = true;

patches = [ ./pcre.patch ];

patchPhase = lib.optionalString stdenv.isDarwin ''
Copy link
Member

Choose a reason for hiding this comment

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

@eadwu Change this to postPatch and it should fix macOS building.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh didn't see patchPhase, just added it to patchPhase

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: opencollada

Partial log (click to expand)

-- Installing: /nix/store/nsn4v9aky0qgz2n6spr6bn9dcfkwn4cc-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWTexture.h
-- Installing: /nix/store/nsn4v9aky0qgz2n6spr6bn9dcfkwn4cc-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWValueType.h
-- Installing: /nix/store/nsn4v9aky0qgz2n6spr6bn9dcfkwn4cc-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWVertices.h
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/nsn4v9aky0qgz2n6spr6bn9dcfkwn4cc-opencollada-1.6.63
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/nsn4v9aky0qgz2n6spr6bn9dcfkwn4cc-opencollada-1.6.63/lib
patching script interpreter paths in /nix/store/nsn4v9aky0qgz2n6spr6bn9dcfkwn4cc-opencollada-1.6.63
checking for references to /build in /nix/store/nsn4v9aky0qgz2n6spr6bn9dcfkwn4cc-opencollada-1.6.63...
/nix/store/nsn4v9aky0qgz2n6spr6bn9dcfkwn4cc-opencollada-1.6.63

@eadwu eadwu force-pushed the opencollada/resolve-pcre-declarations branch from e9198c8 to 6f62bf3 Compare August 2, 2018 02:05
@pSub pSub mentioned this pull request Aug 2, 2018
@matthewbauer matthewbauer force-pushed the opencollada/resolve-pcre-declarations branch from 6f62bf3 to 2df3073 Compare August 2, 2018 20:18
@matthewbauer
Copy link
Member

I just pushed a commit showing you what is preferred. It's a little bit hard to explain but usually using patches is preferred because it is much easier to extend.

@GrahamcOfBorg build opencollada

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: opencollada

Partial log (click to expand)

-- Installing: /nix/store/kr8aq34jiqz7mf5lskcyikbfw3c64r7p-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWTexture.h
-- Installing: /nix/store/kr8aq34jiqz7mf5lskcyikbfw3c64r7p-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWValueType.h
-- Installing: /nix/store/kr8aq34jiqz7mf5lskcyikbfw3c64r7p-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWVertices.h
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/kr8aq34jiqz7mf5lskcyikbfw3c64r7p-opencollada-1.6.63
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/kr8aq34jiqz7mf5lskcyikbfw3c64r7p-opencollada-1.6.63/lib
patching script interpreter paths in /nix/store/kr8aq34jiqz7mf5lskcyikbfw3c64r7p-opencollada-1.6.63
checking for references to /build in /nix/store/kr8aq34jiqz7mf5lskcyikbfw3c64r7p-opencollada-1.6.63...
/nix/store/kr8aq34jiqz7mf5lskcyikbfw3c64r7p-opencollada-1.6.63

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: opencollada

Partial log (click to expand)

-- Installing: /nix/store/wvhbv5xr0hgn55vc2c2sljk3479r6vlv-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWTexture.h
-- Installing: /nix/store/wvhbv5xr0hgn55vc2c2sljk3479r6vlv-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWValueType.h
-- Installing: /nix/store/wvhbv5xr0hgn55vc2c2sljk3479r6vlv-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWVertices.h
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/wvhbv5xr0hgn55vc2c2sljk3479r6vlv-opencollada-1.6.63
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/wvhbv5xr0hgn55vc2c2sljk3479r6vlv-opencollada-1.6.63/lib
patching script interpreter paths in /nix/store/wvhbv5xr0hgn55vc2c2sljk3479r6vlv-opencollada-1.6.63
checking for references to /build in /nix/store/wvhbv5xr0hgn55vc2c2sljk3479r6vlv-opencollada-1.6.63...
/nix/store/wvhbv5xr0hgn55vc2c2sljk3479r6vlv-opencollada-1.6.63

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: opencollada

Partial log (click to expand)

-- Installing: /nix/store/k0zg0yxl1jic228x9a1j5lbrbzzydy3w-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWTechnique.h
-- Installing: /nix/store/k0zg0yxl1jic228x9a1j5lbrbzzydy3w-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWTechniqueFX.h
-- Installing: /nix/store/k0zg0yxl1jic228x9a1j5lbrbzzydy3w-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWTexture.h
-- Installing: /nix/store/k0zg0yxl1jic228x9a1j5lbrbzzydy3w-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWValueType.h
-- Installing: /nix/store/k0zg0yxl1jic228x9a1j5lbrbzzydy3w-opencollada-1.6.63/include/opencollada/COLLADAStreamWriter/COLLADASWVertices.h
post-installation fixup
strip is /nix/store/qfxcr8c4fg7lkybrny9n2sb77bmippdx-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/k0zg0yxl1jic228x9a1j5lbrbzzydy3w-opencollada-1.6.63/lib
patching script interpreter paths in /nix/store/k0zg0yxl1jic228x9a1j5lbrbzzydy3w-opencollada-1.6.63
/nix/store/k0zg0yxl1jic228x9a1j5lbrbzzydy3w-opencollada-1.6.63

@eadwu eadwu force-pushed the opencollada/resolve-pcre-declarations branch from 2df3073 to 6f62bf3 Compare August 2, 2018 20:27
@matthewbauer matthewbauer merged commit 117680b into NixOS:master Aug 2, 2018
@matthewbauer
Copy link
Member

Thanks!

@eadwu eadwu deleted the opencollada/resolve-pcre-declarations branch November 17, 2020 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants