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

CMake Warning at /usr/lib/cmake/grpc/modules/Findre2.cmake:64 #125

Closed
longwuyuan opened this issue Mar 23, 2022 · 7 comments
Closed

CMake Warning at /usr/lib/cmake/grpc/modules/Findre2.cmake:64 #125

longwuyuan opened this issue Mar 23, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@longwuyuan
Copy link

longwuyuan commented Mar 23, 2022

Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.

Steps to reproduce

What is the expected behavior?

  • build should succeed

What is the actual behavior?

  • build fails

Additional context

  • The linked issue has the details
@esigo
Copy link
Member

esigo commented Mar 23, 2022

Hi @longwuyuan thanks for reaching out to us. Any reason for not installing re2?
I could get the build working by installing re2 and re2-dev.

You may consider upgrading to the latest version of opentelemetry 1.2.0.
Also clone was slow, you may consider using
git clone --branch v$OPENTELEMETRY_CPP_VERSION --depth=1 --recursive https://github.com/open-telemetry/opentelemetry-cpp opentelemetry-cpp-$OPENTELEMETRY_CPP_VERSION

@longwuyuan
Copy link
Author

longwuyuan commented Mar 24, 2022

@esigo thanks a lot. I added re2 and re2-dev to the apk add command in build.sh and that error was resolved.

However I am curious you had a working build. I get below error when I run docker build -t my image . ;

...
...
#9 151.2   nginx http fastcgi temporary files: "fastcgi_temp"                                                                                                                                                                                           
#9 151.2   nginx http uwsgi temporary files: "uwsgi_temp"                                                                                                                                                                                               
#9 151.2   nginx http scgi temporary files: "scgi_temp"                                                                                                                                                                                                 
#9 151.2                                                                                                                                                                                                                                                
#9 151.2 make -f objs/Makefile modules                                                                                                                                                                                                                  
#9 151.2 make[1]: Entering directory '/tmp/build/nginx-1.19.10'                                                                                                                                                                                         
#9 151.2 cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \                                                        
#9 151.2        -o objs/addon/src/agent_config.o \                                                                                                                                                                                                      
#9 151.2        /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/agent_config.cpp                                                                                                                
#9 151.2 cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \                                                        
#9 151.2        -o objs/addon/src/nginx_config.o \                                                                                                                                                                                                      
#9 151.2        /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/nginx_config.cpp                                                                                                                
#9 151.3 cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \                                                        
#9 151.3        -o objs/addon/src/otel_ngx_module.o \                                                                                                                                                                                                   
#9 151.3        /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/otel_ngx_module.cpp                                                                                                             
#9 151.7 cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \                                                        
#9 151.7        -o objs/addon/src/propagate.o \                                                                                                                                                                                                         
#9 151.7        /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/propagate.cpp                                                                                                                   
#9 153.4 In file included from /usr/include/absl/synchronization/mutex.h:73,                                                                                                                                                                            
#9 153.4                  from /usr/include/grpcpp/impl/codegen/sync.h:32,                                                                                                                                                                              
#9 153.4                  from /usr/include/grpcpp/impl/codegen/client_context.h:55,                                                                                                                                                                    
#9 153.4                  from /usr/include/grpcpp/impl/codegen/call_op_set.h:34,                                                                                                                                                                       
#9 153.4                  from /usr/include/grpcpp/impl/codegen/server_context.h:35,                                                                                                                                                                    
#9 153.4                  from /usr/include/grpcpp/impl/codegen/async_stream.h:26,                                                                                                                                                                      
#9 153.4                  from /usr/include/grpcpp/impl/codegen/async_generic_service.h:26,                                                                                                                                                             
#9 153.4                  from /usr/local/include/opentelemetry/proto/collector/trace/v1/trace_service.grpc.pb.h:25,                                                                                                                                    
#9 153.4                  from /usr/local/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h:11,                                                                                                                                                 
#9 153.4                  from /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/otel_ngx_module.cpp:21:                                                                                          
#9 153.4 /usr/include/absl/synchronization/internal/per_thread_sem.h:84:10: error: reference to 'base_internal' is ambiguous                                                                                                                            
#9 153.4    84 |   friend absl::base_internal::ThreadIdentity* CreateThreadIdentity();                                                                                                                                                                  
#9 153.4       |          ^~~~                                                                                                 
...
...

@lalitb
Copy link
Member

lalitb commented Mar 24, 2022

Looks like the alpine 3.15 package repository comes with a newer abseil library. This can be causing conflict between the abseil library used internally in opentelemetry-cpp sdk and one coming from the repository. This can be resolved by changing the order of header includes in nginx instrumentation as described here.
As this change would be required in nginx instrumentation, would let @seemk to further reply on that :)

@longwuyuan
Copy link
Author

Thanks @lalitb , will wait for @seemk comments

@lalitb
Copy link
Member

lalitb commented Apr 1, 2022

@longwuyuan Just to add, if you don't want to wait for fix in nginx instrumentation, the alternate solution would be to build opentelemetry-cpp using externally installed abseil library. This can be achieved by adding -DWITH_ABSEIL=ON cmake option in opentelemetry-cpp build here.

@longwuyuan
Copy link
Author

@lalitb thank you very much for the update. We have, for now, used alpine v3.14.4 to release ingress-nginx-controller v1.1.3, to get the openssl & libxml CVE patches.

After this activity settles, I expect that an attempt at moving to alpine v3.15.X+ will occur in near future .

@dmathieu is working on kubernetes/ingress-nginx#7621 so tagging here @rikatz

@longwuyuan
Copy link
Author

All done by "@esigo" in ingress-nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants