PMExtra opened a new issue, #888:
URL: https://github.com/apache/maven-mvnd/issues/888
I found some issues and resolved them when building mvnd for Linux on
aarch64.
I'm using docker image `ubuntu:22.04` on aarch64 machine.
This is my patch:
```patch
diff --git a/client/pom.xml b/client/pom.xml
index 679cc23d..3a900043 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -228,6 +228,8 @@
-H:-ParseRuntimeOptions
-H:+AddAllCharsets
-H:+ReportExceptionStackTraces
+ -H:+TraceNativeToolUsage
+ -H:PageSize=65536
-ea</buildArgs>
</configuration>
<executions>
diff --git a/client/src/main/resources/glibc/dynamic-libc-start.c
b/client/src/main/resources/glibc/dynamic-libc-start.c
index 2272b255..09097cbc 100644
--- a/client/src/main/resources/glibc/dynamic-libc-start.c
+++ b/client/src/main/resources/glibc/dynamic-libc-start.c
@@ -27,8 +27,8 @@
#include <dlfcn.h>
#include <stdint.h>
-__asm__(".symver dlsym,dlsym@GLIBC_2.2.5");
-__asm__(".symver dlvsym,dlvsym@GLIBC_2.2.5");
+__asm__(".symver dlsym,dlsym@GLIBC_2.17");
+__asm__(".symver dlvsym,dlvsym@GLIBC_2.17");
/* __libc_csu_init is statically linked into each program, and passed to
__libc_start_main
* when the program is running with an old glibc (<2.34).
diff --git a/client/src/main/resources/glibc/glibc.redef
b/client/src/main/resources/glibc/glibc.redef
index 10342159..4d330e02 100644
--- a/client/src/main/resources/glibc/glibc.redef
+++ b/client/src/main/resources/glibc/glibc.redef
@@ -15,21 +15,21 @@
# specific language governing permissions and limitations
# under the License.
__libc_start_main __dynamic_libc_start_main
-clock_gettime clock_gettime@GLIBC_2.2.5
-dlopen dlopen@GLIBC_2.2.5
-dlsym dlsym@GLIBC_2.2.5
-memcpy memcpy@GLIBC_2.2.5
-posix_spawn posix_spawn@GLIBC_2.2.5
-pthread_attr_getguardsize pthread_attr_getguardsize@GLIBC_2.2.5
-pthread_attr_getstack pthread_attr_getstack@GLIBC_2.2.5
-pthread_attr_setstacksize pthread_attr_setstacksize@GLIBC_2.2.5
-pthread_condattr_setclock pthread_condattr_setclock@GLIBC_2.3.3
-pthread_create pthread_create@GLIBC_2.2.5
-pthread_getattr_np pthread_getattr_np@GLIBC_2.2.5
-pthread_join pthread_join@GLIBC_2.2.5
-pthread_kill pthread_kill@GLIBC_2.2.5
-pthread_setname_np pthread_setname_np@GLIBC_2.12
-sem_destroy sem_destroy@GLIBC_2.2.5
-sem_init sem_init@GLIBC_2.2.5
-sem_post sem_post@GLIBC_2.2.5
-sem_wait sem_wait@GLIBC_2.2.5
+clock_gettime clock_gettime@GLIBC_2.17
+dlopen dlopen@GLIBC_2.17
+dlsym dlsym@GLIBC_2.17
+memcpy memcpy@GLIBC_2.17
+posix_spawn posix_spawn@GLIBC_2.17
+pthread_attr_getguardsize pthread_attr_getguardsize@GLIBC_2.17
+pthread_attr_getstack pthread_attr_getstack@GLIBC_2.17
+pthread_attr_setstacksize pthread_attr_setstacksize@GLIBC_2.17
+pthread_condattr_setclock pthread_condattr_setclock@GLIBC_2.17
+pthread_create pthread_create@GLIBC_2.17
+pthread_getattr_np pthread_getattr_np@GLIBC_2.17
+pthread_join pthread_join@GLIBC_2.17
+pthread_kill pthread_kill@GLIBC_2.17
+pthread_setname_np pthread_setname_np@GLIBC_2.17
+sem_destroy sem_destroy@GLIBC_2.17
+sem_init sem_init@GLIBC_2.17
+sem_post sem_post@GLIBC_2.17
+sem_wait sem_wait@GLIBC_2.17
```
After the patch, it builds successfully and works fine on my machine.
I'm looking forward to the official release of Linux aarch64 pre-built
distribution. But until then, this patch may help some people in need, so I
share it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]