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

otel-webserver support for arm64 #343

Open
gaurav-basesolve opened this issue Nov 28, 2023 · 1 comment · May be fixed by #400
Open

otel-webserver support for arm64 #343

gaurav-basesolve opened this issue Nov 28, 2023 · 1 comment · May be fixed by #400
Labels
Webserver This represents the otel-webserver-module in the instrumentation directory

Comments

@gaurav-basesolve
Copy link

I am running into issue with running nginx along with ngx_http_opentelemetry_module.so on amazon linux v2 aarch64 system.

Following this https://opentelemetry.io/blog/2022/instrument-nginx/ and running the container fails with following error.

[emerg] 1#1: dlopen() "/opt/opentelemetry-webserver-sdk/WebServerModule/Nginx/1.23.1/ngx_http_opentelemetry_module.so" failed (/opt/opentelemetry-webserver-sdk/WebServerModule/Nginx/1.23.1/ngx_http_opentelemetry_module.so: cannot open shared object file: No such file or directory) in /etc/nginx/nginx.conf:1

@gaurav-basesolve gaurav-basesolve changed the title arm64 support for otel-webserver otel-webserver support for arm64 Nov 28, 2023
@DebajitDas DebajitDas added the Webserver This represents the otel-webserver-module in the instrumentation directory label Mar 14, 2024
@Fydon
Copy link

Fydon commented Mar 14, 2024

Using docker compose --profile ubuntu20.04 build on Windows 11 with Docker Desktop 4.28.0 on the main branch results in a successful build. However attempting to build for ARM64 by changing this first line in instrumentation\otel-webserver-module\docker\ubuntu20.04\Dockerfile from FROM ubuntu:20.04 to FROM --platform=linux/arm64 ubuntu:20.04 and running docker compose --profile ubuntu20.04 build results in the following error when attempting what is currently line 198.

 > Task :buildApacheModule
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x -m64  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel/ApacheTracing.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel/ApacheTracing.o ../../../src/apache/ApacheTracing.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x -m64  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel/ExcludedModules.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel/ExcludedModules.o ../../../src/apache/ExcludedModules.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x -m64  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel/ApacheConfig.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel/ApacheConfig.o ../../../src/apache/ApacheConfig.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x -m64  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel/ApacheHooks.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel/ApacheHooks.o ../../../src/apache/ApacheHooks.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x -m64  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel/HookContainer.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel/HookContainer.o ../../../src/apache/HookContainer.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel22/ApacheTracing.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel22/ApacheTracing.o ../../../src/apache/ApacheTracing.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel22/ApacheConfig.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel22/ApacheConfig.o ../../../src/apache/ApacheConfig.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.4.23/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x -m64  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel/mod_apache_otel.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel/mod_apache_otel.o ../../../src/apache/mod_apache_otel.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel22/ExcludedModules.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel22/ExcludedModules.o ../../../src/apache/ExcludedModules.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel22/ApacheHooks.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel22/ApacheHooks.o ../../../src/apache/ApacheHooks.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel22/HookContainer.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel22/HookContainer.o ../../../src/apache/HookContainer.cpp
   g++  -I../../../src/apache/../../include/core -I../../../src/apache/../../include/util -I../../../src/apache/../../include/apache -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include -I/otel-webserver-module/build/linux-aarch64/httpd-2.2.31/include/../os/unix -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr/1.7.0/include/apr-1 -I/otel-webserver-module/build/linux-aarch64/module-dependencies/apr-util/1.6.1/include/apr-1   -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -pipe -Wall -Wp,-O1 -D_FORTIFY_SOURCE=1 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fno-strict-aliasing -Wno-unused-local-typedefs -std=c++0x  -MMD -MF out/Default/.deps/out/Default/obj.target/mod_apache_otel22/mod_apache_otel.o.d.raw  -c -o out/Default/obj.target/mod_apache_otel22/mod_apache_otel.o ../../../src/apache/mod_apache_otel.cpp
 g++: error: unrecognized command line option '-m64'
 g++: error: unrecognized command line option '-m64'
 g++: error: unrecognized command line option '-m64'
 g++: error: unrecognized command line option '-m64'
 make: *** [mod_apache_otel.target.mk:51: out/Default/obj.target/mod_apache_otel/ApacheHooks.o] Error 1
 make: *** Waiting for unfinished jobs....
 make: *** [mod_apache_otel.target.mk:51: out/Default/obj.target/mod_apache_otel/ExcludedModules.o] Error 1
 make: *** [mod_apache_otel.target.mk:51: out/Default/obj.target/mod_apache_otel/ApacheTracing.o] Error 1
 make: *** [mod_apache_otel.target.mk:51: out/Default/obj.target/mod_apache_otel/HookContainer.o] Error 1
 g++: error: unrecognized command line option '-m64'
 g++: error: unrecognized command line option '-m64'
 make: *** [mod_apache_otel.target.mk:51: out/Default/obj.target/mod_apache_otel/ApacheConfig.o] Error 1
 make: *** [mod_apache_otel.target.mk:51: out/Default/obj.target/mod_apache_otel/mod_apache_otel.o] Error 1
 <command-line>: warning: "_FORTIFY_SOURCE" redefined
 <built-in>: note: this is the location of the previous definition
 <command-line>: warning: "_FORTIFY_SOURCE" redefined
 <built-in>: note: this is the location of the previous definition
 <command-line>: warning: "_FORTIFY_SOURCE" redefined
 <command-line>: warning: "_FORTIFY_SOURCE" redefined
 <built-in>: note: this is the location of the previous definition
 <built-in>: note: this is the location of the previous definition
 <command-line>: warning: "_FORTIFY_SOURCE" redefined
 <built-in>: note: this is the location of the previous definition
 <command-line>: warning: "_FORTIFY_SOURCE" redefined
 <built-in>: note: this is the location of the previous definition
 ../../../src/apache/ApacheTracing.cpp: In static member function 'static void ApacheTracing::logStartupTrace(server_rec*)':
 ../../../src/apache/ApacheTracing.cpp:85:66: warning: format not a string literal and no format arguments [-Wformat-security]
    85 |             ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, it->c_str());
       |                                                                  ^

 > Task :buildApacheModule FAILED

 FAILURE: Build failed with an exception.
 
 * What went wrong:
 Execution failed for task ':buildApacheModule'.
 > Process 'command 'make'' finished with non-zero exit value 2

 * Try:
 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

 * Get more help at https://help.gradle.org

 Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.        
 Use '--warning-mode all' to show the individual deprecation warnings.
 See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings 

 BUILD FAILED in 18m 18s
 12 actionable tasks: 12 executed

Trying the same using version 1.0.4 produces the same result.

@Fydon Fydon linked a pull request Mar 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Webserver This represents the otel-webserver-module in the instrumentation directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants