Skip to content

Commit f84b307

Browse files
committed
fix linux build
1 parent 65021dc commit f84b307

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
3333
```bash
3434
cd iceberg-cpp
3535
mkdir build && cd build
36-
cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/iceberg -DICEBERG_BUILD_STATIC=ON -DICEBERG_BUILD_SHARED=ON
36+
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_STATIC=ON -DICEBERG_BUILD_SHARED=ON
3737
cmake --build .
3838
cmake --install .
3939
```
4040

41-
### Build and Install Iceberg Arrow Libraries
41+
### Build and Install Iceberg Arrow Library
4242

4343
#### Vendored Apache Arrow (default)
44+
4445
```bash
4546
cd iceberg-cpp/src/arrow
4647
mkdir build && cd build
@@ -54,24 +55,28 @@ cmake --install .
5455
```bash
5556
cd iceberg-cpp/src/arrow
5657
mkdir build && cd build
57-
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install -DArrow_SOURCE=SYSTEM -DArrow_ROOT=/path/to/arrow
58+
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_ARROW=ON
5859
cmake --build .
5960
cmake --install .
6061
```
6162

62-
Please note that `-DArrow_ROOT=/path/to/arrow` is required when building examples below when using provided Apache Arrow.
63-
6463
### Build Examples
6564

6665
After installing the core libraries, you can build the examples:
6766

6867
```bash
6968
cd iceberg-cpp/example
7069
mkdir build && cd build
71-
cmake .. -DCMAKE_PREFIX_PATH=/tmp/iceberg
70+
cmake .. -DCMAKE_PREFIX_PATH=/path/to/install
7271
cmake --build .
7372
```
7473

74+
If you are using provided Apache Arrow, you need to include `/path/to/arrow` in `CMAKE_PREFIX_PATH` as below.
75+
76+
```bash
77+
cmake .. -DCMAKE_PREFIX_PATH="/path/to/install;/path/to/arrow"
78+
```
79+
7580
## Contribute
7681

7782
Apache Iceberg is an active open-source project, governed under the Apache Software Foundation (ASF). Iceberg-cpp is open to people who want to contribute to it. Here are some ways to get involved:

cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,15 @@ macro(prepare_fetchcontent)
5353
set(BUILD_STATIC_LIBS ON)
5454
set(CMAKE_COMPILE_WARNING_AS_ERROR FALSE)
5555
set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY TRUE)
56+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
5657
endmacro()
5758

5859
# ----------------------------------------------------------------------
5960
# Apache Arrow
6061

6162
function(resolve_arrow_dependency)
63+
prepare_fetchcontent()
64+
6265
set(ARROW_BUILD_SHARED
6366
OFF
6467
CACHE BOOL "" FORCE)
@@ -74,6 +77,9 @@ function(resolve_arrow_dependency)
7477
set(ARROW_RUNTIME_SIMD_LEVEL
7578
"NONE"
7679
CACHE STRING "" FORCE)
80+
set(ARROW_POSITION_INDEPENDENT_CODE
81+
ON
82+
CACHE BOOL "" FORCE)
7783

7884
fetchcontent_declare(Arrow
7985
${FC_DECLARE_COMMON_OPTIONS}

0 commit comments

Comments
 (0)