{"id":25578476,"url":"https://github.com/apache/activemq-artemis-native","last_synced_at":"2025-04-12T16:07:52.413Z","repository":{"id":44566418,"uuid":"172993063","full_name":"apache/activemq-artemis-native","owner":"apache","description":"Apache activemq artemis native","archived":false,"fork":false,"pushed_at":"2022-09-09T08:12:43.000Z","size":517,"stargazers_count":8,"open_issues_count":3,"forks_count":14,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-05-21T07:20:49.958Z","etag":null,"topics":["activemq","c","cplusplus","csharp","java","network-client","network-server","perl","php","python","ruby"],"latest_commit_sha":null,"homepage":"https://activemq.apache.org/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-27T21:27:43.000Z","updated_at":"2024-02-28T18:29:54.000Z","dependencies_parsed_at":"2022-07-19T12:58:25.885Z","dependency_job_id":null,"html_url":"https://github.com/apache/activemq-artemis-native","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Factivemq-artemis-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Factivemq-artemis-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Factivemq-artemis-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Factivemq-artemis-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/activemq-artemis-native/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239946915,"owners_count":19723018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activemq","c","cplusplus","csharp","java","network-client","network-server","perl","php","python","ruby"],"created_at":"2025-02-21T03:15:37.802Z","updated_at":"2025-02-21T03:15:38.566Z","avatar_url":"https://github.com/apache.png","language":"Java","readme":"# Introduction\n\n\nThis is a simple tutorial about building and packaging the libartemis-native library. The libartemis-native is a thin\nlayer library that interface with Linux' lib AIO library as part of the journaling feature of the broker when operating\nwith AIO journal.\n\nThe lib AIO is a Linux-specific dependency, therefore having a relatively modern Linux operating system is assumed for\nthe purpose of this documentation.\n\nThere are two ways to build the native libraries:\n\n- Using a container image created during the build phase\n- Bare Metal\n\n## Docker and Podman\n\nYou can use either Docker or Podman to compile the native bits in a container created during the build phase before running the tests.\n\nYou can do this using the -Pdocker profile with maven:\n\n```bash\n$ mvn install -Pdocker\n```\n\nOr you can use the -Ppodman profile with maven:\n\n```bash\n$ mvn install -Ppodman\n```\n\nAlternatively, you can run the related scripts directly to execute the container native compilation only:\n\n```bash\n$ ./scripts/compile-using-docker.sh\n```\n\nor\n\n```bash\n$ ./scripts/compile-using-podman.sh\n```\n\n\n## Bare Metal Dependencies\n\nIn order to build the package, make sure you install these packages:\n\n- The GNU compiler library container both the C and C++ compiler\n- The GNU C library\n- The respective libaio package for your Linux distribution\n- JDK (full JDK)\n\n\nFor example, on Fedora Linux, compilation of the library requires the following specific packages:\n\n- glibc-devel\n- libaio-devel\n- gcc\n- gcc-g++\n- java-1.8.0-openjdk-devel\n\n### Cross compilation\n\nUsing a 64-bit Linux OS, it is possible to cross-compile the 32-bit version of the library. For this, the 32-bits\nversion of the GNU C Library and lib AIO should be installed.\n\nOnce again using Fedora Linux as an example, it would mean that the following packages need to be installed:\n\n- glibc-devel.i686\n- libaio-devel.i686\n\n\n### Scripts on Bare Metal\n\nYou can use the ./scripts/compile-native.sh script. This script is using cross compilation towards 64 bits and 32 bits from a Linux environment.\n\nNote you must first have the java compiler generate the .h header manually by running:\n\n```bash\n$ mvn generate-sources\n```\n\nThen call the script to compile the native libs:\n\n```bash\n$ ./scripts/compile-native.sh\n```\n\nAlternatively you can just use the bare-metal profile for maven which combines both of those steps in one operation before running the tests:\n\n```bash\n$ mvn install -Pbare-metal\n```\n\n## Lib AIO Information\n\nThe Lib AIO is the Linux' Kernel Asynchronous I/O Support Library. It is part of the kernel project. The library makes\nsystem calls on the kernel layer.\n\nThis is the project information:\n\nGit Repository:  git://git.kernel.org/pub/scm/libs/libaio/libaio.git\nMailing List:    linux-aio@kvack.org\n\n## Manual steps to build (via Docker)\n\nFrom the project base directory, run:\n\n```docker build -f src/main/docker/Dockerfile-centos -t artemis-native-builder . \u0026\u0026 docker run -v $PWD/target/lib:/work/target/lib artemis-native-builder \u0026\u0026 sudo chown -Rv $USER:$GID target/lib```\n\n\n## Steps to build it manually\n\n1. Make sure you have JAVA_HOME defined, and pointing to the root of your JDK:\n\nExample:\n\n```export JAVA_HOME=/usr/share/jdk11```\n\n2. Run mvn generate-sources to genrate the .h header file needed:\n $\u003e  mvn generate-sources\n\n3. Call compile-native.sh. Bootstrap will call all the initial scripts you need\n $\u003e  ./compile-native.sh\n\nif you are missing any dependencies, autoconf would tell you what you're missing.\n\n\n### Compiled File\n\nThe generated jar will include the ./lib/\n\n### Advanced Compilation Methods and Developer-specific Documentation\n\nPassing additional options to the compiler:\n```cmake -DCMAKE_USER_C_FLAGS=\"-fomit-frame-pointer\" -DCMAKE_VERBOSE_MAKEFILE=On .```\n\nCompiling with debug options:\n```cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=On .```\n\nCross-compilation:\n```cmake -DCMAKE_VERBOSE_MAKEFILE=On -DCMAKE_USER_C_FLAGS=\"-m32\" -DARTEMIS_CROSS_COMPILE=On -DARTEMIS_CROSS_COMPILE_ROOT_PATH=/usr/lib .```\n\nCross-compilation with debugging symbols:\n```cmake -DCMAKE_VERBOSE_MAKEFILE=On -DCMAKE_USER_C_FLAGS=\"-m32\" -DARTEMIS_CROSS_COMPILE=On -DARTEMIS_CROSS_COMPILE_ROOT_PATH=/usr/lib .```\n\n\n## Lib AIO Documentation\n\nThe User Manual, chapter 38 (Libaio Native Libraries) will provide more details about our native libraries on libaio.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Factivemq-artemis-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Factivemq-artemis-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Factivemq-artemis-native/lists"}