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

[WIP] gcc: put target-specific libs in lib output #58606

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkgs/development/compilers/gcc/7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ stdenv.mkDerivation ({

libc_dev = stdenv.cc.libc_dev;

# set this var to use in builder.sh
target_triple = targetPlatform.config;
Copy link
Member

Choose a reason for hiding this comment

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

you can use targetConfig below, actually

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this also need to be done for later gccs (8, 9) for this PR to apply to them?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, but as @matthewbauer wrote, this variable should probably be removed replaced with targetConfig, which is already defined.

Copy link
Contributor

Choose a reason for hiding this comment

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

@matthewbauer @lopsided98 I made a branch with this change applied (delete target_triple binding and use targetConfig in the script), and master merged: https://github.com/eamsden/nixpkgs/tree/eamsden/gcc-cross-contamination

It fails with a long list of attempts to mv files to the same directory:

Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libasan.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libasan.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libasan.so.5 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libasan.so.5
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libasan.so.5.0.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libasan.so.5.0.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libatomic.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libatomic.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libatomic.so.1 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libatomic.so.1
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libatomic.so.1.2.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libatomic.so.1.2.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libcc1.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libcc1.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libcc1.so.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libcc1.so.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libcc1.so.0.0.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libcc1.so.0.0.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libgcc_s.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgcc_s.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libgcc_s.so.1 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgcc_s.so.1
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libgomp.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgomp.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libgomp.so.1 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgomp.so.1
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libgomp.so.1.0.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgomp.so.1.0.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libitm.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libitm.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libitm.so.1 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libitm.so.1
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libitm.so.1.0.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libitm.so.1.0.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/liblsan.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/liblsan.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/liblsan.so.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/liblsan.so.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/liblsan.so.0.0.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/liblsan.so.0.0.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libquadmath.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libquadmath.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libquadmath.so.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libquadmath.so.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libquadmath.so.0.0.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libquadmath.so.0.0.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libssp.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libssp.so.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp.so.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libssp.so.0.0.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp.so.0.0.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libstdc++.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libstdc++.so.6 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.so.6
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libstdc++.so.6.0.27 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.so.6.0.27
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libstdc++.so.6.0.27-gdb.py to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.so.6.0.27-gdb.py
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libtsan.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libtsan.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libtsan.so.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libtsan.so.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libtsan.so.0.0.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libtsan.so.0.0.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libubsan.so to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libubsan.so
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libubsan.so.1 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libubsan.so.1
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libubsan.so.1.0.0 to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libubsan.so.1.0.0
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libasan.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libasan.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libatomic.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libatomic.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libcc1.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libcc1.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libgomp.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgomp.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libitm.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libitm.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/liblsan.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/liblsan.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libquadmath.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libquadmath.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libssp.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libssp_nonshared.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp_nonshared.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libstdc++.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libstdc++fs.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++fs.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libsupc++.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libsupc++.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libtsan.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libtsan.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
Moving /nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0//lib/libubsan.la to /nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libubsan.la
rmdir: failed to remove '/nix/store/s5rz11azrvlmsc9392r75wi79akygn88-gcc-9.2.0/lib': Directory not empty
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libasan.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libasan.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libasan.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libasan.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libasan.so.5' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libasan.so.5' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libasan.so.5.0.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libasan.so.5.0.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libatomic.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libatomic.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libatomic.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libatomic.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libatomic.so.1' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libatomic.so.1' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libatomic.so.1.2.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libatomic.so.1.2.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libcc1.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libcc1.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libcc1.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libcc1.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libcc1.so.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libcc1.so.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libcc1.so.0.0.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libcc1.so.0.0.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgcc_s.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libgcc_s.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgcc_s.so.1' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libgcc_s.so.1' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgomp.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libgomp.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgomp.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libgomp.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgomp.so.1' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libgomp.so.1' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libgomp.so.1.0.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libgomp.so.1.0.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libitm.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libitm.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libitm.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libitm.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libitm.so.1' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libitm.so.1' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libitm.so.1.0.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libitm.so.1.0.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/liblsan.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/liblsan.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/liblsan.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/liblsan.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/liblsan.so.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/liblsan.so.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/liblsan.so.0.0.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/liblsan.so.0.0.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libquadmath.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libquadmath.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libquadmath.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libquadmath.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libquadmath.so.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libquadmath.so.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libquadmath.so.0.0.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libquadmath.so.0.0.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libssp.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libssp.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp.so.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libssp.so.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp.so.0.0.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libssp.so.0.0.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libssp_nonshared.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libssp_nonshared.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libstdc++.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libstdc++.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.so.6' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libstdc++.so.6' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.so.6.0.27' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libstdc++.so.6.0.27' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++.so.6.0.27-gdb.py' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libstdc++.so.6.0.27-gdb.py' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libstdc++fs.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libstdc++fs.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libsupc++.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libsupc++.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libtsan.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libtsan.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libtsan.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libtsan.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libtsan.so.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libtsan.so.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libtsan.so.0.0.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libtsan.so.0.0.0' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libubsan.la' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libubsan.la' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libubsan.so' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libubsan.so' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libubsan.so.1' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libubsan.so.1' are the same file
mv: '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib//lib/libubsan.so.1.0.0' and '/nix/store/4dq9a667f3hsrk3lc6h5177i0nj1y297-gcc-9.2.0-lib/lib/libubsan.so.1.0.0' are the same file
builder for '/nix/store/6fiigj3xj5bm7h23kz4x6iws8fvws12c-gcc-9.2.0.drv' failed with exit code 1

(command: nix-build ./. -A pkgsCross.armv7l-hf-multiplatform.buildPackages.gcc-unwrapped)

This same attribute path builds successfully (though of course with all the cross-contamination) on unpatched nixpkgs master

Copy link
Contributor

Choose a reason for hiding this comment

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

targetConfig is empty during native builds, so you need to add -n "${targetConfig}" to the if statements in builder.sh

Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively you could just add target_triple to GCC 9 if that is easier.

Copy link
Member

Choose a reason for hiding this comment

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

I think this one works: matthewbauer@16951cf


hardeningDisable = [ "format" "pie" ];

# This should kill all the stdinc frameworks that gcc and friends like to
Expand Down
21 changes: 18 additions & 3 deletions pkgs/development/compilers/gcc/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,24 @@ preInstall() {

postInstall() {
# Move runtime libraries to $lib.
moveToOutput "lib/lib*.so*" "$lib"
moveToOutput "lib/lib*.la" "$lib"
moveToOutput "lib/lib*.dylib" "$lib"
if [[ -d "$out/$target_triple/lib" && -n "$(ls -A $out/$target_triple/lib)" ]]; then
Copy link
Member Author

Choose a reason for hiding this comment

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

i should check if $target_triple is defined first

moveToOutput "$target_triple/lib/lib*.so*" "$lib"
moveToOutput "$target_triple/lib/lib*.la" "$lib"
moveToOutput "$target_triple/lib/lib*.dylib" "$lib"
mv "$lib/$target_triple"/lib/* "$lib/lib/"
rmdir -p --ignore-fail-on-non-empty "$lib/$target_triple/lib" || :
elif [[ -d "$out/$target_triple/lib64" && -n "$(ls -A $out/$target_triple/lib64)" ]]; then
moveToOutput "$target_triple/lib64/lib*.so*" "$lib"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can remove the special handling of lib64 if you replace $out with $out/$targetConfig in the preInstall hook above. This should cause the libraries to be installed into lib rather than lib64, and since $targetConfig is empty during native builds, it will work for both native and cross.

moveToOutput "$target_triple/lib64/lib*.la" "$lib"
moveToOutput "$target_triple/lib64/lib*.dylib" "$lib"
mv "$lib/$target_triple"/lib64/* "$lib/lib/"
rmdir -p --ignore-fail-on-non-empty "$lib/$target_triple/lib64" || :
else
moveToOutput "lib/lib*.so*" "$lib"
moveToOutput "lib/lib*.la" "$lib"
moveToOutput "lib/lib*.dylib" "$lib"
fi

moveToOutput "share/gcc-*/python" "$lib"

for i in "$lib"/lib/*.{la,py}; do
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/glibc/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,6 @@ stdenv.mkDerivation ({

# To avoid a dependency on the build system 'bash'.
preFixup = ''
rm -f $bin/bin/{ldd,tzselect,catchsegv,xtrace}
rm -f $bin/bin/{ldd,tzselect,catchsegv,xtrace,sotruss}
'';
})