PengZheng commented on code in PR #640:
URL: https://github.com/apache/celix/pull/640#discussion_r1320938255


##########
documents/building/README.md:
##########
@@ -40,16 +40,62 @@ git clone --single-branch --branch master 
https://github.com/apache/celix.git
 ```
 
 ## Building and installing
-Apache Celix uses [CMake](https://cmake.org) as build system. CMake can 
generate (among others) makefiles.
+Apache Celix can be build using [Conan](https://conan.io) as package 
manager/build system or by directly using
+[CMake](https://cmake.org).
 
-### Building and installing with preinstalled libraries
+### Building Apache Celix using Conan
 The following packages (libraries + headers) should be installed on your 
system:
 
 * Development Environment
     * build-essentials (gcc/g++ or clang/clang++) 
     * java or zip (for packaging bundles)
     * make (3.14 or higher)
     * git
+    * cmake (3.18 or higher)
+    * Conan (2 or higher)
+
+For Ubuntu 20.04, use the following commands:
+```bash
+sudo apt-get install -yq --no-install-recommends \
+    build-essential \
+    git \
+    default-jdk \
+    python3 \
+    python3-pip \
+    ninja-build
+        
+#The cmake version for Ubuntu 20 is older than 3.14,
+#use snap to install the latest cmake version
+snap install cmake
+
+#Install conan
+pip3 install -U conan   
+```
+
+Configure conan default profile using automatic detection of the system
+```bash
+conan profile detect
+```
+
+Create Apache Celix package - and build the dependencies - in the Conan cache:
+```bash
+cd <celix_source_dir>
+conan create . --build missing -o build_all=True   

Review Comment:
   When trying this on a brand-new machine (no jave pre-installed), I 
encountered the following error:
   
   ```
   -- Installing: 
/home/peng/.conan2/p/b/celixb9d5adbea8041/b/celix/gen/bundles/http_admin/content_install/libhttp_admin.so.0
   
   zip error: Nothing to do! (try: zip -rq 
/home/peng/.conan2/p/b/celixb9d5adbea8041/b/bundles/http_admin/http_admin/celix_http_admin.zip.install
 . -i *)
   CMake Error at bundles/http_admin/http_admin/cmake_install.cmake:111 (file):
     file INSTALL cannot find
     
"/home/peng/.conan2/p/b/celixb9d5adbea8041/b/bundles/http_admin/http_admin/celix_http_admin.zip.install":
   ```
   
   It turns out that bundle packaging using zip (instead of jar) does not work.
   We need to address this before 2.4.0 release.



-- 
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: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to