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

Error in ydk-gen-master/test/dependencies_centos.sh version check #1078

Closed
fisher-m opened this issue Jan 18, 2023 · 0 comments
Closed

Error in ydk-gen-master/test/dependencies_centos.sh version check #1078

fisher-m opened this issue Jan 18, 2023 · 0 comments

Comments

@fisher-m
Copy link

Expected Behavior

Executing "./install_ydk.sh --cpp --core --venv" on Red Hat 8 executes ydk-gen-master/test/dependencies_centos.sh. It is expected that dependencies_centos.sh will not attempt to install gcc 4.8.1 if there is a newer version of gcc already installed.

Current Behavior

When dependencies_centos.sh runs, it attempts to install gcc 7 when gcc 10.X.X is already installed. The error is with the comparison on line 57 (i.e. if [[ $gcc_version < "4.8.1" ]] ). This line fails when comparing against gcc version 10.X.X. Instead of using the string comparison, you could do something like this to get higher version number:
latestVersion=$(echo "4.8.1 $gcc_version" | gawk '{printf("%s\n%s\n", $1, $2)}' | sort -rV | head -1)
and then check to see if latestVersion equals "4.8.1" and then take the appropriate action. Though, I would recommend revamping this section to be more up to date and use a more recent default compiler version than gcc 7. My work around was to comment this section of the script out and just use the currently installed gcc version.

Steps to Reproduce

Run ./install_ydk.sh --cpp --core --venv on Red Hat 8 per the core installation instructions.

System Information

Python 3.6.8
RHEL 8.6
X86_64

ygorelik pushed a commit to ygorelik/ydk-gen that referenced this issue Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants