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

dmd: pull in missing libgcc.so dependency #228219

Closed
wants to merge 1 commit into from
Closed

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Apr 25, 2023

Without the change autopatchelf fails to find the dependency as:

searching for dependencies of ...-dmd-bootstrap-2.090.1/bin/dmd
    libgcc_s.so.1 -> not found!
auto-patchelf: 6 dependencies could not be satisfied

Full build log: https://hydra.nixos.org/log/plma45m19p0cm1i04c4qzmfi54n38ydk-dmd-bootstrap-2.090.1.drv

Description of changes
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.05 Release Notes (or backporting 22.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.

Without the change autopatchelf fails to find the dependency as:

    searching for dependencies of ...-dmd-bootstrap-2.090.1/bin/dmd
        libgcc_s.so.1 -> not found!
    auto-patchelf: 6 dependencies could not be satisfied

Full build log: https://hydra.nixos.org/log/plma45m19p0cm1i04c4qzmfi54n38ydk-dmd-bootstrap-2.090.1.drv
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Apr 25, 2023
@trofi
Copy link
Contributor Author

trofi commented Apr 26, 2023

dmd bootstrap binary now gets patchelfed successfully. But the dmd fails one test in testsuite:

       > FAILED targets:
       > - runnable_cxx/cppa.d
       > make: *** [Makefile:210: run_all_tests] Error 1

At least we have some forward progress.

@trofi
Copy link
Contributor Author

trofi commented Apr 26, 2023

The link failure itself looks like a dmd problem in locating correct libstdc++:

Test 'runnable_cxx/cppa.d' failed. The logged output:
g++ -m64 -c runnable_cxx/extra-files/cppb.cpp -o test_results/runnable_cxx/cppb.cpp.o -std=c++11
/build/dmd/generated/linux/release/64/dmd -conf= -m64 -Irunnable_cxx -checkaction=C  -fPIC -L-lstdc++ -L--no-demangle  -odtest_results/runnable_cxx -oftest_results/runnable_cxx/cppa_0  runnable_cxx/cppa.d test_results/runnable_cxx/cppb.cpp.o 
/nix/store/f4qnwzv6y0nq8lix33jr5ykkyybs6fxf-binutils-2.40/bin/ld: test_results/runnable_cxx/cppa_0.o: in function `_ZNSaIiE10deallocateEPim':
runnable_cxx/cppa.d:(.text._ZNSaIiE10deallocateEPim[_ZNSaIiE10deallocateEPim]+0x5): undefined reference to `_ZN9__gnu_cxx13new_allocatorIiE10deallocateEPim'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

@trofi trofi closed this Apr 27, 2023
@trofi trofi deleted the dmd-libgcc branch April 27, 2023 21:28
@trofi
Copy link
Contributor Author

trofi commented Apr 28, 2023

Added #206907 (comment) to fix dmd's test suite first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant