pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/54526: lang/rust does not build on Darwin



>Number:         54526
>Category:       pkg
>Synopsis:       lang/rust does not build on Darwin
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 05 21:55:01 +0000 2019
>Originator:     Jonathan Schleifer
>Release:        HEAD
>Organization:
>Environment:
>Description:
lang/rust does not build for Darwin (fails after hours), breaking librsvg, breaking in turn almost every Gtk software.

    Rust is ready to roll.

< Rustc { stage: 2, target: "x86_64-apple-darwin", host: "x86_64-apple-darwin" }
Build completed successfully in 0:17:32
otool -XL /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/cargo-miri | /usr/bin/grep '@rpath' | while read rpath rest; do		 install_name_tool -change $rpath			 `echo $rpath | /opt/pkg/bin/nbsed -e 's,@rpath,/opt/pkg/lib,g'`  /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/cargo-miri;			 done
otool -XL /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/clippy-driver			 | /usr/bin/grep '@rpath' | while read rpath rest; do	 install_name_tool -change $rpath			 `echo $rpath | /opt/pkg/bin/nbsed -e 's,@rpath,/opt/pkg/lib,g'`  /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/clippy-driver;			 done
otool -XL /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/miri	 | /usr/bin/grep '@rpath' | while read rpath rest; do		 install_name_tool -change $rpath			 `echo $rpath | /opt/pkg/bin/nbsed -e 's,@rpath,/opt/pkg/lib,g'`  /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/miri;			 done
otool -XL /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rls	 | /usr/bin/grep '@rpath' | while read rpath rest; do		 install_name_tool -change $rpath			 `echo $rpath | /opt/pkg/bin/nbsed -e 's,@rpath,/opt/pkg/lib,g'`  /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rls;			 done
otool -XL /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc	 | /usr/bin/grep '@rpath' | while read rpath rest; do		 install_name_tool -change $rpath			 `echo $rpath | /opt/pkg/bin/nbsed -e 's,@rpath,/opt/pkg/lib,g'`  /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc;
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/js/Devel/pkgsrc/lang/rust/work/.destdir/opt/pkg/bin/rustc (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
*** Error code 1

Stop.
bmake[3]: stopped in /Users/js/Devel/pkgsrc/lang/rust
*** Error code 1

Stop.
bmake[2]: stopped in /Users/js/Devel/pkgsrc/lang/rust
*** Error code 1
>How-To-Repeat:
Build lang/rust
>Fix:
The problematic part seems not be rust itself, but pkgsrc, in particular the following in the Makefile:

fix-darwin-install-name:
.  for bin in cargo-miri clippy-driver miri rls rustc rustdoc
        otool -XL ${DESTDIR}${PREFIX}/bin/${bin}                        \
            | ${GREP} '@rpath' | while read rpath rest; do              \
                install_name_tool -change $$rpath                       \
                    `${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib,g'` \
                    ${DESTDIR}${PREFIX}/bin/${bin};                     \
        done
.  endfor
.  for libdir in lib lib/rustlib/${RUST_ARCH}/lib lib/rustlib/${RUST_ARCH}/codegen-backends
        for f in ${DESTDIR}${PREFIX}/${libdir}/lib*.dylib; do           \
                [ ! -f $$f ] && continue;                               \
                install_name_tool -id `${ECHO} $$f | ${SED} -e 's,${DESTDIR},,g'` $$f; \
                otool -XL $$f | grep '@rpath' | while read rpath rest; do \
                        install_name_tool -change $$rpath \
                            `${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib,g'` \
                            $$f;                                        \
                done;                                                   \
        done
.  endfor
.endif

This cannot work, as @rpath is shorter than any possible path. There's no linker flags being added to reserve more space for the install name as well.



Home | Main Index | Thread Index | Old Index