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

gNMI service installation on Centos 8.2 fails due to C++ compiler error #1062

Closed
ygorelik opened this issue Apr 22, 2022 · 1 comment
Closed
Assignees

Comments

@ygorelik
Copy link
Collaborator

This issue has been reported in YDK Community.

Current Behavior

On Centos 8.2 or Centos Stream 8 platform try to install gNME service:

[root@a586efe6601f ydk-gen]# ./install_ydk.sh --all --service gnmi
*** Fri Apr 22 21:55:34 UTC 2022 *** install_ydk.sh | YDKGEN_HOME is set to /root/ydk-gen 
YDK-0.8.6.3 installation options:
 - use system Python installation
 - programming language = all
 - install dependencies = yes
 - install core package = no
 - install service package = gnmi
*** Fri Apr 22 21:55:34 UTC 2022 *** install_ydk.sh | Running OS type: Linux 
*** Fri Apr 22 21:55:34 UTC 2022 *** install_ydk.sh | OS info: CentOS Stream release 8
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
CentOS Stream release 8
CentOS Stream release 8 
*** Fri Apr 22 21:55:34 UTC 2022 *** install_ydk.sh | LD_LIBRARY_PATH is set to: /root/grpc/libs/opt:/root/protobuf-3.5.0/src/.libs::/usr/local/lib:/usr/local/lib64:/usr/lib64 
*** Fri Apr 22 21:55:34 UTC 2022 *** install_ydk.sh | Running: /root/ydk-gen/test/dependencies_centos.sh 
*** Fri Apr 22 21:55:34 UTC 2022 *** dependencies_centos.sh | Installing dependencies 
*** Fri Apr 22 21:55:38 UTC 2022 *** dependencies_centos.sh | Running: sudo yum install pcre-devel -y 
Last metadata expiration check: 3:46:45 ago on Fri 22 Apr 2022 06:08:54 PM UTC.
Package pcre-devel-8.42-6.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
*** Fri Apr 22 21:56:29 UTC 2022 *** dependencies_centos.sh | Running Centos/RHEL version 8 
Last metadata expiration check: 3:47:35 ago on Fri 22 Apr 2022 06:08:54 PM UTC.
Package dnf-plugins-core-4.0.21-11.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
CentOS Stream 8 - PowerTools                                                                                                    7.5 kB/s | 4.4 kB     00:00    
Package doxygen-1:1.8.14-12.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
/usr/bin/gcc
*** Fri Apr 22 21:56:32 UTC 2022 *** dependencies_centos.sh | Current gcc/g++ version is 8.5.0 
*** Fri Apr 22 21:56:32 UTC 2022 *** dependencies_centos.sh | Current Go version is 1.13.1 
/root/ydk-gen/3d_party/linux/ubuntu/lib/libssh_threads.so.4.5.0
/usr/lib64/libssh_threads.so
/usr/lib64/libssh_threads.so.4
/usr/lib64/libssh_threads.so.4.8.7
*** Fri Apr 22 21:56:32 UTC 2022 *** install_ydk.sh | Running: /root/ydk-gen/test/dependencies_linux_gnmi.sh 
*** Fri Apr 22 21:56:33 UTC 2022 *** dependencies_linux_gnmi.sh | Downloading protobuf and protoc 
--2022-04-22 21:56:33--  https://github.com/google/protobuf/releases/download/v3.5.0/protobuf-cpp-3.5.0.zip
Resolving github.com (github.com)... 192.30.255.113
...
*** Fri Apr 22 22:05:17 UTC 2022 *** dependencies_linux_gnmi.sh | Downloading grpc 
Cloning into 'grpc'...
remote: Enumerating objects: 632840, done.
remote: Counting objects: 100% (88/88), done.
remote: Compressing objects: 100% (59/59), done.
remote: Total 632840 (delta 39), reused 54 (delta 29), pack-reused 632752
Receiving objects: 100% (632840/632840), 323.50 MiB | 875.00 KiB/s, done.
Resolving deltas: 100% (505044/505044), done.
Note: switching to 'd45132a2e9246b11ddd0b70c07160076d5cbbb12'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Submodule 'third_party/abseil-cpp' (https://github.com/abseil/abseil-cpp) registered for path 'third_party/abseil-cpp'
Submodule 'third_party/benchmark' (https://github.com/google/benchmark) registered for path 'third_party/benchmark'
Submodule 'third_party/bloaty' (https://github.com/google/bloaty.git) registered for path 'third_party/bloaty'
Submodule 'third_party/boringssl' (https://github.com/google/boringssl.git) registered for path 'third_party/boringssl'
Submodule 'third_party/boringssl-with-bazel' (https://github.com/google/boringssl.git) registered for path 'third_party/boringssl-with-bazel'
Submodule 'third_party/cares/cares' (https://github.com/c-ares/c-ares.git) registered for path 'third_party/cares/cares'
Submodule 'third_party/gflags' (https://github.com/gflags/gflags.git) registered for path 'third_party/gflags'
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/googletest'
Submodule 'third_party/protobuf' (https://github.com/google/protobuf.git) registered for path 'third_party/protobuf'
Submodule 'third_party/zlib' (https://github.com/madler/zlib) registered for path 'third_party/zlib'
Cloning into '/root/grpc/third_party/abseil-cpp'...
Cloning into '/root/grpc/third_party/benchmark'...
Cloning into '/root/grpc/third_party/bloaty'...
Cloning into '/root/grpc/third_party/boringssl'...
Cloning into '/root/grpc/third_party/boringssl-with-bazel'...
Cloning into '/root/grpc/third_party/cares/cares'...
Cloning into '/root/grpc/third_party/gflags'...
Cloning into '/root/grpc/third_party/googletest'...
Cloning into '/root/grpc/third_party/protobuf'...
Cloning into '/root/grpc/third_party/zlib'...
Submodule path 'third_party/abseil-cpp': checked out 'cc4bed2d74f7c8717e31f9579214ab52a9c9c610'
Submodule path 'third_party/benchmark': checked out '5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8'
Submodule path 'third_party/bloaty': checked out '73594cde8c9a52a102c4341c244c833aa61b9c06'
Submodule path 'third_party/boringssl': checked out 'be2ee342d3781ddb954f91f8a7e660c6f59e87e5'
Submodule path 'third_party/boringssl-with-bazel': checked out '886e7d75368e3f4fab3f4d0d3584e4abfc557755'
Submodule path 'third_party/cares/cares': checked out '3be1924221e1326df520f8498d704a5c4c8d0cce'
Submodule path 'third_party/gflags': checked out '30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e'
Submodule path 'third_party/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780'
Submodule path 'third_party/protobuf': checked out '2761122b810fe8861004ae785cc3ab39f384d342'
Submodule path 'third_party/zlib': checked out 'cacf7f1d4e3d44d871b605da3b647f07d718623f'
*** Fri Apr 22 22:22:14 UTC 2022 *** dependencies_linux_gnmi.sh | Compiling grpc 
third_party/cares/cares/ares_init.c: In function ‘ares_dup’:
third_party/cares/cares/ares_init.c:301:17: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
           sizeof(src->local_dev_name));
                 ^
third_party/cares/cares/ares_init.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-invalid-source-encoding’ [-Werror]
cc1: all warnings being treated as errors
make: *** [Makefile:2606: /root/grpc/objs/opt/third_party/cares/cares/ares_init.o] Error 1
*** Fri Apr 22 22:22:17 UTC 2022 *** dependencies_linux_gnmi.sh | Failed to compile grpc code; exiting 
*** Fri Apr 22 22:22:17 UTC 2022 *** install_ydk.sh | Exiting '/root/ydk-gen/test/dependencies_linux_gnmi.sh' with status=2 

System Information

YDK-0.8.6.3 on Centos Stream 8 platform

@ygorelik ygorelik self-assigned this Apr 22, 2022
@ygorelik
Copy link
Collaborator Author

Workaround. Have this environment setting before the installation command:

export CFLAGS=-Wno-error
export CXXFLAGS=-Wno-error

ygorelik pushed a commit to ygorelik/ydk-gen that referenced this issue Apr 22, 2022
@ygorelik ygorelik added the ready label Apr 27, 2022
@ygorelik ygorelik removed the ready label May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant