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

clang++ --print-file-name is no longer functional #214651

Closed
redvers opened this issue Feb 5, 2023 · 4 comments
Closed

clang++ --print-file-name is no longer functional #214651

redvers opened this issue Feb 5, 2023 · 4 comments
Labels
0.kind: bug Something is broken

Comments

@redvers
Copy link
Member

redvers commented Feb 5, 2023

Describe the bug

The command-line flag '--print-file-name` should return the full path to the wanted file.

Working example:

[nix-shell:~]$ clang++ --print-file-name='libstdc++.a'
/nix/store/sxdx80lmk4zkhb51f4x5dgqvxgmx55wl-gcc-11.3.0/lib64/gcc/x86_64-unknown-linux-gnu/11.3.0/../../../../lib64/libstdc++.a

This is used in some build systems (including ponyc which is broken and I am currently trying to fix).

Steps To Reproduce

On master, note no path provided:

[nix-shell:~/projects]$ clang++ --print-file-name=libstdc++.a
libstdc++.a

Expected behavior

The correct path should be returned:

[nix-shell:~]$ clang++ --print-file-name='libstdc++.a'
/nix/store/sxdx80lmk4zkhb51f4x5dgqvxgmx55wl-gcc-11.3.0/lib64/gcc/x86_64-unknown-linux-gnu/11.3.0/../../../../lib64/libstdc++.a

Notify maintainers

llvm team: @Ericson2314 @sternenseemann @lovek323 @dtzWill @primeos

Metadata

[red@blimpofevil:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.91, NixOS, 23.05 (Stoat), 23.05pre451105.06999209d7a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.2`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

I have a machine that was last updated from master on Jan 2nd (3302bc3) which is functional. I'm starting to bisect, I'll update if/when I find the commit that broke it.

Thanks.

@redvers redvers added the 0.kind: bug Something is broken label Feb 5, 2023
@redvers
Copy link
Member Author

redvers commented Feb 5, 2023

Okay, the commit that breaks it is:

commit e4957a85c9db87ed5124310dfbb5f4c9886c1b75
Merge: 7f299adbdd1 66bb8338fc1
Author: Vladimír Čunát <v@cunat.cz>
Date:   Tue Jan 31 09:42:28 2023 +0100

    Merge #211923: staging-next 2023-01-21
[red@blimpofevil:~/projects/nixpkgs]$ git checkout 7f299adbdd1cb798a3639350c8cba6bdeab7ab53
Previous HEAD position was e4957a85c9d Merge #211923: staging-next 2023-01-21
HEAD is now at 7f299adbdd1 Merge pull request #213689 from r-ryantm/auto-update/azure-storage-azcopy

[red@blimpofevil:~/projects/nixpkgs]$ nix-shell -I nixpkgs=. -p clang_11

[nix-shell:~/projects/nixpkgs]$ clang++ --print-file-name='libstdc++.a'
/nix/store/z1yw9cw97bcdfmxz5wk7j1bycw42r1mw-gcc-11.3.0/lib64/gcc/x86_64-unknown-linux-gnu/11.3.0/../../../../lib64/libstdc++.a
[nix-shell:~/projects/nixpkgs]$ git checkout e4957a85c9db87ed5124310dfbb5f4c9886c1b75
Previous HEAD position was 7f299adbdd1 Merge pull request #213689 from r-ryantm/auto-update/azure-storage-azcopy
HEAD is now at e4957a85c9d Merge #211923: staging-next 2023-01-21

[nix-shell:~/projects/nixpkgs]$ 
exit

[red@blimpofevil:~/projects/nixpkgs]$ nix-shell -I nixpkgs=. -p clang_11

[nix-shell:~/projects/nixpkgs]$ clang++ --print-file-name='libstdc++.a'
libstdc++.a

@redvers
Copy link
Member Author

redvers commented Feb 5, 2023

Bisecting the staging-next branch…

@redvers
Copy link
Member Author

redvers commented Feb 5, 2023

Looks like it will be fixed after this hits master:

#213185

@redvers
Copy link
Member Author

redvers commented Feb 13, 2023

This was fixed by #214010

@redvers redvers closed this as completed Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant