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

vscode server: cope with multiple libc/libc++ installations #204032

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

notnoop
Copy link
Contributor

@notnoop notnoop commented Feb 1, 2024

Allow running vscode remote server in environments where there are multiple libc or libc++ candidate paths. For determining the library version, use the first one reported in ldconfig -p.

For context, I'm running vscode server in a container with two libc packages: default one from libc6:amd64 package, and another from libc6-prof:amd64 (compiled with frame pointers) - both targeting x86:

# /sbin/ldconfig -p | grep libc.so.6
        libc.so.6 (libc6,x86-64, OS ABI: Linux 3.2.0) => /lib/libc6-prof/x86_64-linux-gnu/libc.so.6
        libc.so.6 (libc6,x86-64, OS ABI: Linux 3.2.0) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (libc6, OS ABI: Linux 3.2.0) => /lib32/libc.so.6

Currently, the script fails silently. $libc_path contains two paths, and readlink -f "$libc_path" fails with exit code 1.

@gjsjohnmurray
Copy link
Contributor

pinging @deepak1556 in case you haven't already seen this

@deepak1556 deepak1556 assigned deepak1556 and unassigned Yoyokrazy Feb 2, 2024
@deepak1556 deepak1556 added this to the February 2024 milestone Feb 2, 2024
Copy link
Collaborator

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

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

Thanks!

@deepak1556 deepak1556 enabled auto-merge (squash) February 2, 2024 13:43
@deepak1556 deepak1556 merged commit 929edab into microsoft:main Feb 2, 2024
6 checks passed
@n8falke
Copy link

n8falke commented Feb 2, 2024

An extra sort -r | before 'head -n1` is not required.

The idea was to get latest installed version first.
Liker camper42 mentioned in #203967 he has /usr/lib/gcc/x86_64-pc-linux-gnu/13/libstdc++.so.6 and /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.1/libstdc++.so.6 in his system. The sort -rwould then prefer version 13 before 10.3.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants