Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
WillAyd opened this issue May 29, 2024 · 3 comments
Open
1 task done

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

WillAyd opened this issue May 29, 2024 · 3 comments
Labels

Comments

@WillAyd
Copy link

WillAyd commented May 29, 2024

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
@WillAyd WillAyd added the bug label May 29, 2024
@h-vetinari
Copy link
Member

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

I'm not sure I understand what you mean. Let's distinguish between libarrow the library and pyarrow-core the python bindings that build on the library.

You show that libarrow contains some symbols that could apparently be hidden - presumably they are not being used by pyarrow-core then? If we're on the same page w.r.t. that, great!

@WillAyd
Copy link
Author

WillAyd commented May 29, 2024

Yea sorry - should have been clearer that I was talking about libarrow. The more I look at this I think there are a few gaps upstream in Arrow - need to investigate further

@WillAyd
Copy link
Author

WillAyd commented May 29, 2024

ref apache/arrow#41872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants