Skip to content

pyarrow-core library uses default visibility instead of hidden #123

@WillAyd

Description

@WillAyd

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

It looks like the pyarrow-core library exposes symbols that are not explicitly exported by Arrow:

$ nm -CD libarrow.so | grep TemporalScalar
00000000002e3e20 t arrow::TemporalScalar<arrow::Date32Type>::~TemporalScalar()
00000000002e3440 t arrow::TemporalScalar<arrow::Date32Type>::~TemporalScalar()
00000000002e3440 t arrow::TemporalScalar<arrow::Date32Type>::~TemporalScalar()
00000000002e4320 t arrow::TemporalScalar<arrow::Date64Type>::~TemporalScalar()
00000000002e30c0 t arrow::TemporalScalar<arrow::Date64Type>::~TemporalScalar()
...

Setting the CXXFLAG -fvisibility-hidden should get rid of these and help shave off some package size (locally I saw about a 5% reduction)

Installed packages

pyarrow-core              16.1.0          py312h5429d62_1_cpu    conda-forge

Environment info

active environment : scratchpad
    active env location : /home/willayd/mambaforge/envs/scratchpad
            shell level : 2
       user config file : /home/willayd/.condarc
 populated config files : /home/willayd/mambaforge/.condarc
                          /home/willayd/.condarc
          conda version : 23.3.1
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.35=0
                          __linux=6.8.0=0
                          __unix=0=0
       base environment : /home/willayd/mambaforge  (writable)
      conda av data dir : /home/willayd/mambaforge/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/nodefaults/linux-64
                          https://conda.anaconda.org/nodefaults/noarch
          package cache : /home/willayd/mambaforge/pkgs
                          /home/willayd/.conda/pkgs
       envs directories : /home/willayd/mambaforge/envs
                          /home/willayd/.conda/envs
               platform : linux-64
             user-agent : conda/23.3.1 requests/2.31.0 CPython/3.10.12 Linux/6.8.0-76060800daily20240311-generic pop/22.04 glibc/2.35
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions