[ 
https://issues.apache.org/jira/browse/ARROW-1747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224269#comment-16224269
 ] 

ASF GitHub Bot commented on ARROW-1747:
---------------------------------------

wesm closed pull request #1264: ARROW-1747: [C++] Don't export symbols of 
statically linked libraries
URL: https://github.com/apache/arrow/pull/1264
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/cpp/src/arrow/symbols.map b/cpp/src/arrow/symbols.map
index 49511c6a7..f216d8650 100644
--- a/cpp/src/arrow/symbols.map
+++ b/cpp/src/arrow/symbols.map
@@ -22,11 +22,49 @@
     # devtoolset / static-libstdc++ symbols
     __cxa_*;
 
+
+    # Static libraries that are linked in e.g. the manylinux1 build
+    # Brotli compression library
+    Brotli*;
+    # zlib
+    adler32;
+    adler32_combine;
+    adler32_combine64;
+    crc32;
+    crc32_combine;
+    crc32_combine64;
+    deflate*;
+    inflate*;
+    get_crc_table;
+    zcalloc;
+    zcfree;
+    zError;
+    zlibCompileFlags;
+    zlibVersion;
+    _tr_*;
+    # lz4
+    LZ4_*;
+    # zstandard
+    ZSTD_*;
+    ZSTDv*;
+    HUF_*;
+    HUFv*;
+    FSE_*;
+    FSEv*;
+    ZBUFFv*;
+    ERR_getErrorString;
+    # jemalloc
+    je_arrow_*;
+
     extern "C++" {
       # devtoolset or -static-libstdc++ - the Red Hat devtoolset statically
       # links c++11 symbols into binaries so that the result may be executed on
       # a system with an older libstdc++ which doesn't include the necessary
       # c++11 symbols.
       std::*;
+
+      # Statically linked C++ dependencies
+      boost::*;
+      snappy::*;
     };
 };
diff --git a/python/manylinux1/Dockerfile-x86_64 
b/python/manylinux1/Dockerfile-x86_64
index 6d72ec753..69d8d3dbf 100644
--- a/python/manylinux1/Dockerfile-x86_64
+++ b/python/manylinux1/Dockerfile-x86_64
@@ -23,6 +23,9 @@ WORKDIR /arrow/cpp/build-plain
 RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_INSTALL_PREFIX=/arrow-dist -DARROW_BUILD_TESTS=OFF 
-DARROW_BUILD_SHARED=ON -DARROW_BOOST_USE_SHARED=OFF -DARROW_JEMALLOC=ON 
-DARROW_RPATH_ORIGIN=ON -DARROW_JEMALLOC_USE_SHARED=OFF ..
 RUN ninja install
 
+ADD scripts/check_arrow_visibility.sh /
+RUN /check_arrow_visibility.sh
+
 WORKDIR /
 RUN git clone https://github.com/apache/parquet-cpp.git
 WORKDIR /parquet-cpp
diff --git a/python/manylinux1/scripts/check_arrow_visibility.sh 
b/python/manylinux1/scripts/check_arrow_visibility.sh
new file mode 100755
index 000000000..27a30f747
--- /dev/null
+++ b/python/manylinux1/scripts/check_arrow_visibility.sh
@@ -0,0 +1,26 @@
+#!/bin/bash -ex
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+nm -D -C /arrow-dist/lib64/libarrow.so > nm_arrow.log
+
+if [[ `grep ' T ' nm_arrow.log | grep -v arrow | wc -l` -eq 2 ]]
+then
+    exit 0
+fi
+
+exit 1


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [C++] Don't export symbols of statically linked libraries
> ---------------------------------------------------------
>
>                 Key: ARROW-1747
>                 URL: https://issues.apache.org/jira/browse/ARROW-1747
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++, Python
>    Affects Versions: 0.7.1
>            Reporter: Uwe L. Korn
>            Assignee: Uwe L. Korn
>              Labels: pull-request-available
>             Fix For: 0.8.0
>
>
> Currently we export the symbols of the underlying compression libraries like 
> Brotli. These are private dependencies of Arrow and should not pollute the 
> linking namespace.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to