build: Harmless “which: no x86_64-w64-mingw32-g++-posix…” message during depends download #24056

issue laanwj openend this issue on January 13, 2022
  1. laanwj commented at 11:19 am on January 13, 2022: member

    Probably introduced in #22093.

     0Found macOS SDK at '/home/guest/sdk-path/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers', using...                                                                                                                            
     1Checking that we can connect to the guix-daemon...                                                                                                                                                                                  
     2                                                                                                                                                                                                                                    
     3Hint: If this hangs, you may want to try turning your guix-daemon off and on                                                                                                                                                        
     4      again.                                                                                                                                                                                                                        
     5                                                                                                                                                                                                                                    
     6make: Entering directory '/home/guest/bitcoin/depends'                                                                                                                                                                              
     7make[1]: Entering directory '/home/guest/bitcoin/depends'                                                                                                                                                                           
     8make[1]: Leaving directory '/home/guest/bitcoin/depends'                                                                                                                                                                            
     9make: Leaving directory '/home/guest/bitcoin/depends'                                                                                                                                                                               
    10make: Entering directory '/home/guest/bitcoin/depends'                                                                                                                                                                              
    11make[1]: Entering directory '/home/guest/bitcoin/depends'                                                                                                                                                                           
    12make[1]: Leaving directory '/home/guest/bitcoin/depends'                                                                                                                                                                            
    13make: Leaving directory '/home/guest/bitcoin/depends'                                                                                                                                                                               
    14make: Entering directory '/home/guest/bitcoin/depends'                                                                                                                                                                              
    15make[1]: Entering directory '/home/guest/bitcoin/depends'                                                                                                                                                                           
    16make[1]: Leaving directory '/home/guest/bitcoin/depends'
    17make: Leaving directory '/home/guest/bitcoin/depends'
    18make: Entering directory '/home/guest/bitcoin/depends'
    19make[1]: Entering directory '/home/guest/bitcoin/depends' 
    20make[1]: Leaving directory '/home/guest/bitcoin/depends'
    21make: Leaving directory '/home/guest/bitcoin/depends'
    22make: Entering directory '/home/guest/bitcoin/depends'
    23make[1]: Entering directory '/home/guest/bitcoin/depends' 
    24make[1]: Leaving directory '/home/guest/bitcoin/depends'
    25make: Leaving directory '/home/guest/bitcoin/depends'
    26make: Entering directory '/home/guest/bitcoin/depends'
    27make[1]: Entering directory '/home/guest/bitcoin/depends' 
    28make[1]: Leaving directory '/home/guest/bitcoin/depends'
    29make: Leaving directory '/home/guest/bitcoin/depends'
    30make: Entering directory '/home/guest/bitcoin/depends'
    31make[1]: Entering directory '/home/guest/bitcoin/depends' 
    32which: no x86_64-w64-mingw32-g++-posix in (/run/setuid-programs:/home/guest/.config/guix/current/bin:/home/guest/.guix-profile/bin:/home/guest/.guix-profile/sbin:/run/current-system/profile/bin:/run/current-system/profile/sbin)
    33make[1]: Leaving directory '/home/guest/bitcoin/depends'
    34make: Leaving directory '/home/guest/bitcoin/depends'
    35make: Entering directory '/home/guest/bitcoin/depends'
    36make[1]: Entering directory '/home/guest/bitcoin/depends' 
    37make[1]: Leaving directory '/home/guest/bitcoin/depends'
    38make: Leaving directory '/home/guest/bitcoin/depends'
    

    I think it’s harmless (the which command tends to be noisy), but it did make me wonder. Clearly the cross-compiler is unnecessary when fetching the tarballs.

  2. laanwj added the label Build system on Jan 13, 2022
  3. hebasto commented at 11:50 am on January 13, 2022: member
    Cannot reproduce it neither on Debian 11.2 nor on Ubuntu 22.04.
  4. hebasto commented at 12:05 pm on January 13, 2022: member
    @laanwj What is your system?
  5. fanquake commented at 0:54 am on January 14, 2022: member
    I haven’t looked yet, but even if it is harmless, we don’t want random / spurious messages emitted during our release builds. We’ll want to have this fixed prior to the next release.
  6. fanquake added this to the milestone 23.0 on Jan 14, 2022
  7. fanquake deleted a comment on Jan 20, 2022
  8. laanwj commented at 2:50 pm on January 25, 2022: member

    @hebasto I am running the builds on a minimal GUIX VM. It doesn’t have x86_64-w64-mingw32-g++-posix installed.

    Thanks for trying to reproduce. It’s strange that you don’t get the message. Maybe it has a different, noisier version of which?

    Edit: FWIW, I still see it when building current master.

  9. laanwj commented at 3:08 pm on January 25, 2022: member

    Yes, it seems a difference in which.

    GUIX:

    0guest@gnu ~$ which x86_64-w64-mingw32-g++-posix
    1which: no x86_64-w64-mingw32-g++-posix in (/run/setuid-programs:/home/guest/.config/guix/current/bin:/home/guest/.guix-profile/bin:/home/guest/.guix-profile/sbin:/run/current-system/profile/bin:/run/current-system/profile/sbin)
    

    Ubuntu 20.04:

    0$ which x86_64-w64-mingw32-g++-posix
    1[nothing]
    

    Debian testing:

    0$ which x86_64-w64-mingw32-g++-posix
    1/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
    

    Edit: Apparently, on debian, which is deprecated for use in scripts. Could we use command -v instead? Or doesn’t that work in makefiles?

  10. hebasto commented at 3:26 pm on January 25, 2022: member

    @laanwj

    Does this patch

    0--- a/depends/hosts/mingw32.mk
    1+++ b/depends/hosts/mingw32.mk
    2@@ -1,4 +1,4 @@
    3-ifneq ($(shell which $(host)-g++-posix),)
    4+ifneq ($(shell command -v $(host)-g++-posix 2> /dev/null),)
    5 mingw32_CXX := $(host)-g++-posix
    6 endif
    

    work for you?

  11. laanwj commented at 3:30 pm on January 25, 2022: member
    @hebasto It doesn’t give the warning message anymore (nor any other), at least!
  12. hebasto commented at 3:33 pm on January 25, 2022: member

    Could we use command -v instead? Or doesn’t that work in makefiles?

    It is POSIX compatible.

    Will add some more tests and then submit a pr.

  13. hebasto commented at 8:51 pm on January 25, 2022: member

    Hmm, from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993582 it follows that migrating from which to command in Make $(shell ...) function seems premature for now.

    But suppressing stderr output of the which command makes sense.

  14. hebasto commented at 9:37 pm on January 25, 2022: member
    Fixed in #24156.
  15. laanwj commented at 5:34 pm on January 26, 2022: member

    mm, from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993582 it follows that migrating from which to command in Make $(shell …) function seems premature for now.

    [endless screaming]

    But suppressing stderr output of the which command makes sense.

    Yes, makes sense then.

  16. fanquake commented at 2:35 am on January 27, 2022: member

    Hmm, from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993582 it follows that migrating from which to command in Make $(shell …) function seems premature for now.

    Why? We are already using command -v in depends.

  17. laanwj closed this on Feb 2, 2022

  18. sidhujag referenced this in commit c4670fbe58 on Feb 3, 2022
  19. DrahtBot locked this on Feb 2, 2023


laanwj hebasto fanquake

Labels
Build system

Milestone
23.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-29 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me