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

gcc: disable glibc<->libgcc circularity workaround for windows and LLVM #243249

Merged
1 commit merged into from Jul 13, 2023
Merged

gcc: disable glibc<->libgcc circularity workaround for windows and LLVM #243249

1 commit merged into from Jul 13, 2023

Conversation

ghost
Copy link

@ghost ghost commented Jul 13, 2023

Description of changes

This essentially reverts #238154 if isWindows or useLLVM, the two cases where it caused breakage.

Since #238154 exists mainly for isGNU (i.e. due to the glibc<->libgcc circular dependency) disabling it here isn't a big deal.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.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.

This essentially reverts #238154 if `isWindows` or `useLLVM`, the
two cases where it caused breakage:

  #238154 (comment)

Since #238154 exists mainly for `isGNU` (i.e. due to the
glibc<->libgcc circular dependency) disabling it here isn't a big deal.
@wegank
Copy link
Member

wegank commented Jul 13, 2023

1 package failed to build:
pkgsLLVM.stdenv

47 packages built:
dxvk dxvk.bin dxvk.lib exactaudiocopy grapejuice grapejuice.dist pipelight playonlinux q4wine vkd3d vkd3d-proton winbox wine wine-staging wine-wayland wine64 wine64Packages.base wine64Packages.stagin
g wine64Packages.stagingFull wine64Packages.unstable wine64Packages.unstableFull wine64Packages.wayland wine64Packages.waylandFull winePackages.base winePackages.staging winePackages.unstable winePac
kages.unstableFull winePackages.wayland wineWow64Packages.base wineWow64Packages.full wineWow64Packages.staging wineWow64Packages.stagingFull wineWow64Packages.unstable wineWow64Packages.unstableFull
 wineWow64Packages.wayland wineWow64Packages.waylandFull wineWowPackages.base wineWowPackages.full wineWowPackages.staging wineWowPackages.stagingFull wineWowPackages.unstable wineWowPackages.unstabl
eFull wineWowPackages.wayland wineWowPackages.waylandFull wineasio yabridge yabridgectl

@wegank
Copy link
Member

wegank commented Jul 13, 2023

@ofborg build pkgsLLVM.stdenv

@wegank
Copy link
Member

wegank commented Jul 13, 2023

pkgsLLVM.stdenv still fails, with

/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash ../../../gcc-12.3.0/libgcc/../mkinstalldirs .
/build/build/./gcc/xgcc -B/build/build/./gcc/   -O2  -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map  -o ./libgcc_s.so.1.tmp  -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o cpuinfo_s.o sfp-exceptions_s.o _divhc3_s.o _mulhc3_s.o addtf3_s.o divtf3_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendhfsf2_s.o extendhfdf2_s.o extendhftf2_s.o extendhfxf2_s.o extendsfdf2_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfhf2_s.o truncxfhf2_s.o truncdfhf2_s.o truncsfhf2_s.o trunctfsf2_s.o truncdfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o fixhfti_s.o fixunshfti_s.o floattihf_s.o floatuntihf_s.o eqhf2_s.o getf2_s.o letf2_s.o eqtf2_s.o _divtc3_s.o _multc3_s.o _powitf2_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && (echo "/* GNU ld script"; echo "   Use the shared library, but some functions are only in"; echo "   the static library.  */"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) > ./libgcc_s.so
/nix/store/ksh1a7hrczax7754qp8g5gmkh07w3fxr-x86_64-unknown-linux-gnu-binutils-2.40/bin/x86_64-unknown-linux-gnu-ld: cannot find crti.o: No such file or directory
/nix/store/ksh1a7hrczax7754qp8g5gmkh07w3fxr-x86_64-unknown-linux-gnu-binutils-2.40/bin/x86_64-unknown-linux-gnu-ld: cannot find -lc: No such file or directory
/nix/store/ksh1a7hrczax7754qp8g5gmkh07w3fxr-x86_64-unknown-linux-gnu-binutils-2.40/bin/x86_64-unknown-linux-gnu-ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:995: libgcc_s.so] Error 1
make[1]: Leaving directory '/build/build/x86_64-unknown-linux-gnu/libgcc'
make: *** [Makefile:12947: all-target-libgcc] Error 2
error: builder for '/nix/store/q8sn7rh64fk83arvpymyqiqg0b4rhi60-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0.drv' failed with exit code 2;

@ghost
Copy link
Author

ghost commented Jul 13, 2023

pkgsLLVM.stdenv still fails, with

Latest push should fix that.

@ofborg build pkgsLLVM.stdenv

@ghost
Copy link
Author

ghost commented Jul 13, 2023

@ghost
Copy link
Author

ghost commented Jul 13, 2023

pkgsLLVM.stdenv on x86_64-linux — Success Details

@ghost ghost requested review from trofi and wegank July 13, 2023 18:57
@trofi trofi removed their request for review July 13, 2023 19:00
@ghost ghost merged commit 3512318 into NixOS:master Jul 13, 2023
@ghost ghost deleted the fix-gccNoLibc2 branch July 13, 2023 19:20
This pull request was closed.
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.

pkgsLLVM, pkgsCross.mingwW64 broken by #238154
1 participant