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

Compilation failing on RH8 with GCC 11.3.0 #29

Open
orliac opened this issue Jun 29, 2023 · 13 comments
Open

Compilation failing on RH8 with GCC 11.3.0 #29

orliac opened this issue Jun 29, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@orliac
Copy link

orliac commented Jun 29, 2023

Hello,
I'm failing to compile arcae on a RH8 box using GCC 11.3.0 (using Spack 0.20.0). Here is the log:

==> Installing py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja
==> No binary for py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja found: installing from source
==> Ran patch() for py-arcae
==> py-arcae: Executing phase: 'install'
==> Error: ProcessError: Command exited with status 1:
    '/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/python-3.10.4-tl3vrz4pgbao3vfzuyldkj5bn7qpic4g/bin/python3.10' '-m' 'pip' '-vvv' '--no-input' '--no-cache-dir' '--disable-pip-version-check' 'install' '--no-deps' '--ignore-installed' '--no-build-isolation' '--no-warn-script-location' '--no-index' '--prefix=/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja' '.'

144 errors found in build log:
     266      -- Detecting C compile features - done
     267      -- Found PkgConfig: /work/ska/soft/spack/blackhole/v2/opt/view__bipp-izar-gcc/bin/pkg-config (found version "1.9.5")
     268      -- Checking for module 'casacore'
     269      --   Found casacore, version 3.5.0
     270      -- Found PythonInterp: /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/python-3.10.4-tl3vrz4pgbao3vfzuyldkj5bn7qpic4g/bin/python3
            .10 (found version "3.10.4")
     271      -- Found PythonLibs: /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/python-3.10.4-tl3vrz4pgbao3vfzuyldkj5bn7qpic4g/lib/libpython
            3.10.so (found version "3.10.4")
  >> 272    <string>:2: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternati
            ves                                                                                                                                                                
  >> 273      <string>:2: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
     274      -- Found Cython: /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-cython-0.29.33-ocv6lqlck5nqwelih2edoa6jltp3em4n/bin/cython
     275      CYTHON table /tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/_skbuild/linux-x86_64-3.10/cmake-build/arcae/arrow_tab
            les.cxx
     276      -- Performing Test Weak Link MODULE -> SHARED (gnu_ld_ignore) - Success
     277      _modinit_prefix:PyInit_
     278      Linking arrow_tables against arrow_python
     279      Linking arrow_tables against arrow

     ...

     298      [4/11] Building CXX object cpp/CMakeFiles/arcae.dir/casa_visitors.cpp.o
     299      [5/11] Building CXX object cpp/CMakeFiles/arcae.dir/safe_table_proxy.cpp.o
     300      [6/11] Building CXX object cpp/CMakeFiles/arcae.dir/column_convert_visitor.cpp.o
     301      [7/11] Linking CXX shared library cpp/libarcae.so
     302      [8/11] Generating CXX source arcae/arrow_tables.cxx
     303      [9/11] Building CXX object arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o
  >> 304    FAILED: arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o
     305      /work/backup/ska/orliac/spack_0200/lib/spack/env/gcc/g++ -Darrow_tables_EXPORTS -I/tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3
            cnja/spack-src/arcae/PkgConfig::casacore -I/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-pyarrow-12.0.0-qa5dzazodts7cvjtmy2cyf
            xmxdpzjy7t/lib/python3.10/site-packages/pyarrow/include -I/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-numpy-1.24.3-a24j2n7xq
            pnc4qlygxwkatwvmpbbbwxm/lib/python3.10/site-packages/numpy/core/include -I/tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack
            -src/cpp -I/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/python-3.10.4-tl3vrz4pgbao3vfzuyldkj5bn7qpic4g/include/python3.10 -I/tmp
            /orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/cpp/PkgConfig::casacore -isystem /tmp/orliac/spack-stage/spack-stage-py-a
            rcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/vcpkg/installed/x64-linux-dynamic-cxx17-abi0-rel/lib/pkgconfig/../../include -O3 -DNDEBUG -std=c++17 -fPIC -D
            _GLIBCXX_USE_CXX11_ABI=0 -MD -MT arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o -MF arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o.d -o arcae/CMakeFil
            es/arrow_tables.dir/arrow_tables.cxx.o -c /tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/_skbuild/linux-x86_64-3.10/
            cmake-build/arcae/arrow_tables.cxx
     306      In file included from /tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/_skbuild/linux-x86_64-3.10/cmake-build/arcae/
            arrow_tables.cxx:786:
  >> 307      /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-pyarrow-12.0.0-qa5dzazodts7cvjtmy2cyfxmxdpzjy7t/lib/python3.10/site-packages/p
            yarrow/src/arrow/python/datetime.h:50:8: error: 'PyDateTime_CAPI' does not name a type; did you mean 'PyDateTimeAPI'?                                              
     308         50 | extern PyDateTime_CAPI* datetime_api;
     309            |        ^~~~~~~~~~~~~~~
     310            |        PyDateTimeAPI
     311      /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-pyarrow-12.0.0-qa5dzazodts7cvjtmy2cyfxmxdpzjy7t/lib/python3.10/site-packages/p
            yarrow/src/arrow/python/datetime.h: In function 'int64_t arrow::py::internal::PyTime_to_us(PyObject*)':
  >> 312      /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-pyarrow-12.0.0-qa5dzazodts7cvjtmy2cyfxmxdpzjy7t/lib/python3.10/site-packages/p
            yarrow/src/arrow/python/datetime.h:62:11: error: 'PyDateTime_TIME_GET_HOUR' was not declared in this scope                                                         
     313         62 |   return (PyDateTime_TIME_GET_HOUR(pytime) * 3600000000LL +
     314            |           ^~~~~~~~~~~~~~~~~~~~~~~~
  >> 315      /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-pyarrow-12.0.0-qa5dzazodts7cvjtmy2cyfxmxdpzjy7t/lib/python3.10/site-packages/p
            yarrow/src/arrow/python/datetime.h:63:11: error: 'PyDateTime_TIME_GET_MINUTE' was not declared in this scope                                                       
     316         63 |           PyDateTime_TIME_GET_MINUTE(pytime) * 60000000LL +
     317            |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
  >> 318      /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-pyarrow-12.0.0-qa5dzazodts7cvjtmy2cyfxmxdpzjy7t/lib/python3.10/site-packages/p
            yarrow/src/arrow/python/datetime.h:64:11: error: 'PyDateTime_TIME_GET_SECOND' was not declared in this scope                                                       
     319         64 |           PyDateTime_TIME_GET_SECOND(pytime) * 1000000LL +
     320            |           ^~~~~~~~~~~~~~~~~~~~~~~~~~

...

Can you guess what the problem is? (my cython version in use is 0.29.33)
Thank you,
Etienne

@sjperkins
Copy link
Member

Hi @orliac

My best guess is that the Python headers aren't being passed to the compilation commands:

/work/backup/ska/orliac/spack_0200/lib/spack/env/gcc/g++
-Darrow_tables_EXPORTS
-I/tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/arcae/PkgConfig::casacore
-I/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-pyarrow-12.0.0-qa5dzazodts7cvjtmy2cyfxmxdpzjy7t/lib/python3.10/site-packages/pyarrow/include
-I/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-numpy-1.24.3-a24j2n7xqpnc4qlygxwkatwvmpbbbwxm/lib/python3.10/site-packages/numpy/core/include
-I/tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/cpp
-I/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/python-3.10.4-tl3vrz4pgbao3vfzuyldkj5bn7qpic4g/include/python3.10
-I/tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/cpp/PkgConfig::casacore
-isystem
/tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/vcpkg/installed/x64-linux-dynamic-cxx17-abi0-rel/lib/pkgconfig/../../include
-O3 -DNDEBUG -std=c++17 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -MD
-MT arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o
-MF arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o.d
-o arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o
-c /tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/_skbuild/linux-x86_64-3.10/cmake-build/arcae/arrow_tables.cxx

Also, the following looks a bit strange to me. arcae is using sckit-build to build the cython extension and I wonder if something is going wrong here in the construction of includes. But I'm not sure.

-isystem
/tmp/orliac/spack-stage/spack-stage-py-arcae-main-bgre6mp2qhikmyafc2yzgfv5nab3cnja/spack-src/vcpkg/installed/x64-linux-dynamic-cxx17-abi0-rel/lib/pkgconfig/../../include

P.S. Aiming to have wheels out on pypi soon. Would this be helpful?

@sjperkins sjperkins added the bug Something isn't working label Jun 29, 2023
@orliac
Copy link
Author

orliac commented Jun 29, 2023

Hi Simon,
Thanks for the feedback.
In the cython generated arrow_tables.cxx file, in this block:

/* Early includes */
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <utility>

    #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
    // move should be defined for these versions of MSVC, but __cplusplus isn't set usefully
    #include <type_traits>

    namespace cython_std {
    template <typename T> typename std::remove_reference<T>::type&& move(T& t) noexcept { return std::move(t); }
    template <typename T> typename std::remove_reference<T>::type&& move(T&& t) noexcept { return std::move(t); }
    }

    #endif
    
#include <map>
#include <memory>
#include <string.h>
#include <string>
#include <vector>
#include <stdint.h>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <stdio.h>
#include "pythread.h"
#include "datetime.h"
#include <optional>

it includes (in my env)

/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-pyarrow-12.0.0-yydvt3qe4zsv6afseskclwv5s7p7jpqp/lib/python3.10/site-packages/p
            yarrow/src/arrow/python/datetime.h

but shouldn't it be including this one instead?
/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/python-3.10.4-tl3vrz4pgbao3vfzuyldkj5bn7qpic4g/include/python3.10/datetime.h ?

@sjperkins
Copy link
Member

The inclusion of the lib/python3.10/site-packages/pyarrow/src/arrow/python/datetime.h seens correct to me. It's this file in the source code.

This SO answer implies that Python might need to be compiled in a particular way? https://stackoverflow.com/a/70911512

Also, python/cpython#96822 (comment) says the following:

Note: currently, datetime.h is not included by Python.h and is excluded from the limited C API.

It looks like PEP 0670 made it into 3.11. Perhaps this has something todo with how SPACK packages Python 3.11?

Unfortunately these are just leads in the investigation, I don't have a comprehensive answer.

@orliac
Copy link
Author

orliac commented Jul 3, 2023

Thanks @sjperkins.

For information, I've opened an issue on pyarrow's side earlier on: apache/arrow#36438.
What is not clear to me is where should the definition of PyDateTime_CAPI come from when PYPY_VERSION is not defined and therefore datetime.h is not included. See https://github.com/apache/arrow/blob/0b7bd74daef8fe120fed997975431e7a88f67e5a/python/pyarrow/src/arrow/python/datetime.h#L32C1-L54C7.

I'm currently rebuilding my stack based on Python 3.11.2 (was on 3.10.4 before) but it will take a bit of time, so I'll post the outcome later on.

@orliac
Copy link
Author

orliac commented Jul 3, 2023

Using Python 3.11.2 did not improve the situation:

    303      [9/11] Building CXX object arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o
  >> 304    FAILED: arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o
     305      /work/backup/ska/orliac/spack_0200/lib/spack/env/gcc/g++ -Darrow_tables_EXPORTS -I/tmp/orliac/spack-stage/spack-stage-py-arcae-main-z6eptsmwuwneacgiqa6swg
            pi6crewk7x/spack-src/arcae/PkgConfig::casacore -I/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-numpy-1.24.3-wnq3x2p5wwxh
            x7qklhneb2emeaowfsva/lib/python3.11/site-packages/numpy/core/include -I/tmp/orliac/spack-stage/spack-stage-py-arcae-main-z6eptsmwuwneacgiqa6swgpi6crewk7x/sp
            ack-src/cpp -I/work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/python-3.11.2-3tbonxwosnvt7mok7m6mhaojvjvw2f2f/include/python3.
            11 -I/tmp/orliac/spack-stage/spack-stage-py-arcae-main-z6eptsmwuwneacgiqa6swgpi6crewk7x/spack-src/cpp/PkgConfig::casacore -isystem /tmp/orliac/spack-stage/s
            pack-stage-py-arcae-main-z6eptsmwuwneacgiqa6swgpi6crewk7x/spack-src/vcpkg/installed/x64-linux-dynamic-cxx17-abi0-rel/lib/pkgconfig/../../include -O3 -DNDEBU
            G -std=c++17 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -MD -MT arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o -MF arcae/CMakeFiles/arrow_tables.dir/arrow_table
            s.cxx.o.d -o arcae/CMakeFiles/arrow_tables.dir/arrow_tables.cxx.o -c /tmp/orliac/spack-stage/spack-stage-py-arcae-main-z6eptsmwuwneacgiqa6swgpi6crewk7x/spac
            k-src/_skbuild/linux-x86_64-3.11/cmake-build/arcae/arrow_tables.cxx
     306      In file included from /tmp/orliac/spack-stage/spack-stage-py-arcae-main-z6eptsmwuwneacgiqa6swgpi6crewk7x/spack-src/_skbuild/linux-x86_64-3.11/cmake-build/
            arcae/arrow_tables.cxx:786:
  >> 307      /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-pyarrow-12.0.0-wcxrxbguxaabwgtmmu6zkti5rbdsht4k/lib/python3.11/site-pack
            ages/pyarrow/src/arrow/python/datetime.h:50:8: error: 'PyDateTime_CAPI' does not name a type; did you mean 'PyDateTimeAPI'?                                  
     308         50 | extern PyDateTime_CAPI* datetime_api;
     309            |        ^~~~~~~~~~~~~~~
     310            |        PyDateTimeAPI

@sjperkins
Copy link
Member

I think Python 3.10 would be required to work around PEP 0670 (if it is the problem).

@orliac
Copy link
Author

orliac commented Jul 6, 2023

Hello @sjperkins
I tried to install using the pypi 0.1.0 distribution. In that case it installs but it fails at runtime.

==> Installing py-arcae-0.1.0-n2yj7al5xxvwa25lrw46cyzixea2d6sg
==> No binary for py-arcae-0.1.0-n2yj7al5xxvwa25lrw46cyzixea2d6sg found: installing from source
==> Fetching https://files.pythonhosted.org/packages/source/a/arcae/arcae-0.1.0.tar.gz
==> No patches needed for py-arcae
==> py-arcae: Executing phase: 'install'
==> py-arcae: Successfully installed py-arcae-0.1.0-n2yj7al5xxvwa25lrw46cyzixea2d6sg
  Stage: 1.90s.  Install: 18.81s.  Post-install: 0.21s.  Total: 25.33s
[+] /work/ska/soft/spack/blackhole/v2/opt/spack/linux-rhel8-cascadelake/gcc-11.3.0/py-arcae-0.1.0-n2yj7al5xxvwa25lrw46cyzixea2d6sg
[bipp-izar-gcc] [orliac@i45 ~]$ python test_arcae.py 
Traceback (most recent call last):
  File "/home/orliac/test_arcae.py", line 10, in <module>
    casa_table = arcae.table("~/SKA/epfl-radio-astro/bipp-bench/gauss4_t201806301100_SBL180.MS")
  File "/work/ska/soft/spack/blackhole/v2/opt/view__bipp-izar-gcc/lib/python3.10/site-packages/arcae/__init__.py", line 13, in table
    from arcae.lib.arrow_tables import Table
ModuleNotFoundError: No module named 'arcae.lib.arrow_tables'

Will try the wheels and will let you know.

@orliac
Copy link
Author

orliac commented Jul 6, 2023

Using the wheel I face an ABI incompatibility:

[bipp-izar-gcc] [orliac@i44 ~]$ python test_arcae.py 
Traceback (most recent call last):
  File "/home/orliac/test_arcae.py", line 10, in <module>
    casa_table = arcae.table("~/SKA/epfl-radio-astro/bipp-bench/gauss4_t201806301100_SBL180.MS")
  File "/work/ska/soft/spack/blackhole/v2/opt/view__bipp-izar-gcc/lib/python3.10/site-packages/arcae/__init__.py", line 13, in table
    from arcae.lib.arrow_tables import Table
ImportError: /work/ska/soft/spack/blackhole/v2/opt/view__bipp-izar-gcc/lib/python3.10/site-packages/arcae/lib/libarcae.so: undefined symbol: _ZNK5arrow8DataType18ComputeFingerprintEv

Looking at the symbols in libarcae and libarrow:

[bipp-izar-gcc] [orliac@i44 ~]$ strings /work/ska/soft/spack/blackhole/v2/opt/view__bipp-izar-gcc/lib/python3.10/site-packages/arcae/lib/libarcae.so | grep _ZNK5arrow8DataType18ComputeFingerprintEv
_ZNK5arrow8DataType18ComputeFingerprintEv
_ZNK5arrow8DataType18ComputeFingerprintEv
[bipp-izar-gcc] [orliac@i44 ~]$ strings /work/ska/soft/spack/blackhole/v2/opt/view__bipp-izar-gcc/lib64/libarrow.so.1200 | grep _ZNK5arrow8DataType18ComputeFingerprintEv 

(nothing found) whereas:

[bipp-izar-gcc] [orliac@i44 ~]$ strings /work/ska/soft/spack/blackhole/v2/opt/view__bipp-izar-gcc/lib64/libarrow.so.1200 | grep _ZNK5arrow8DataType18ComputeFingerprint
_ZNK5arrow8DataType18ComputeFingerprintB5cxx11Ev
_ZNK5arrow8DataType18ComputeFingerprintB5cxx11Ev.localalias
_ZNK5arrow8DataType18ComputeFingerprintB5cxx11Ev

So I guess it means that the wheel was built with -D_GLIBCXX_USE_CXX11_ABI=0.
If that was the intention, I can try to build arrow accordingly.

@sjperkins
Copy link
Member

Using the wheel I face an ABI incompatibility:

Yes, currently arcae is built with manylinux2014 wheels (which use the older ABI), mostly because manylinux_2_28 (using the new ABI) is currently not that prevalent. Having said that, it may start becoming available in arrow 13.0.0: apache/arrow#34818, although this further increases the number of continuous integration build actions. manylinux2014 (based on CENTOS 7 will be deprecated in July 2024).

@sjperkins
Copy link
Member

sjperkins commented Jul 6, 2023

Hello @sjperkins I tried to install using the pypi 0.1.0 distribution. In that case it installs but it fails at runtime.

It looks like it's trying to build from source. I don't think it's possible to build a working source build from scratch (because of the dependency on shared libraries built by vcpkg). At least this seems possible for me locally

$ git clone [email protected]:ratt-ru/arcae.git
$ virtualenv -p python3.9 ~/venv/arcaesrc
$ . ~/venv/arcaesrc/bin/activate
(arcaesrc) $ cd /
(arcaesrc) $ pip install --no-binary=arcae ~/code/arcae[dev,test]
Processing ./code/arcae
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting appdirs (from arcae==0.1.0)
....
Building wheels for collected packages: arcae
  Building wheel for arcae (pyproject.toml) ... done
  Created wheel for arcae: filename=arcae-0.1.0-cp39-cp39-linux_x86_64.whl size=268963 sha256=65bbc6fe77142a92906d5a962753274ff2e9f12ffa790cc69bff15a02bbb1c98
  Stored in directory: /tmp/pip-ephem-wheel-cache-35s3x43f/wheels/57/ca/66/ab589a3e8a6ecef38d467333fd4a0c91fd222b5fc2cbc98785
Successfully built arcae
Installing collected packages: mccabe, duckdb, docopt, appdirs, urllib3, unidecode, typing-extensions, tomlkit, tomli, tabulate, six, pygments, pyflakes, pycodestyle, pluggy, platformdirs, pathspec, packaging, numpy, mypy-extensions, mdurl, iniconfig, idna, exceptiongroup, contextlib2, colorama, click, charset-normalizer, certifi, schema, requests, python-casacore, pytest, pyarrow, markdown-it-py, flake8, cli-ui, black, tbump, rich, arcae
Successfully installed appdirs-1.4.4 arcae-0.1.0 black-22.1.0 certifi-2023.5.7 charset-normalizer-3.1.0 cli-ui-0.17.2 click-8.1.3 colorama-0.4.6 contextlib2-21.6.0 docopt-0.6.2 duckdb-0.8.1 exceptiongroup-1.1.2 flake8-4.0.1 idna-3.4 iniconfig-2.0.0 markdown-it-py-3.0.0 mccabe-0.6.1 mdurl-0.1.2 mypy-extensions-1.0.0 numpy-1.25.0 packaging-23.1 pathspec-0.11.1 platformdirs-3.8.0 pluggy-1.2.0 pyarrow-12.0.0 pycodestyle-2.8.0 pyflakes-2.4.0 pygments-2.15.1 pytest-7.4.0 python-casacore-3.5.2 requests-2.31.0 rich-13.4.2 schema-0.7.5 six-1.16.0 tabulate-0.8.10 tbump-6.10.0 tomli-2.0.1 tomlkit-0.11.8 typing-extensions-4.7.1 unidecode-1.3.6 urllib3-2.0.3

This seems to correctly install the arrow_tables*.so cython extension, as well as libarcae.so in site-packages

$ tree ~/venv/arcaesrc/lib/python3.9/site-packages/arcae -I __pycache__
/home/simon/venv/arcaesrc/lib/python3.9/site-packages/arcae
├── __init__.py
├── applications
│   ├── __init__.py
│   ├── entrypoint.py
│   └── ms_export.py
├── config.py
├── lib
│   ├── __init__.py
│   ├── arrow_tables.cpython-39-x86_64-linux-gnu.so
│   └── libarcae.so
└── tests
    ├── __init__.py
    ├── conftest.py
    └── test_pytable.py

3 directories, 11 files

However, LD_LIBRARY_PATH must be set to discover the casacore and other shared objects built by vcpkg in order for things to work properly:

(arcaesrc) $ export LD_LIBRARY_PATH=~/code/arcae/vcpkg/installed/x64-linux-dynamic-cxx17-abi0-rel/lib
(arcaesrc) $ py.test -s -vvv --pyargs arcae

The wheels correctly package the built casacore shared objects and dependencies via auditwheel, which is why I don't think source builds will ever be viable.

@sjperkins
Copy link
Member

Did you have any luck here @orliac ?

@orliac
Copy link
Author

orliac commented Jul 12, 2023

Hello @sjperkins
Sorry for the silence and thank you for your last input.
In the end I managed to install arcae from the wheel but I had to adapt the Spack recipes of arrow, py-pyarrow and re2 in order to switch GLIBCXX_USE_CXX11_ABI to 0. At least I could run the example you provide under https://github.com/ratt-ru/arcae#usage (where AT should be replaced by arrow_table btw). Not sure if there will be side effects though.
When I have a bit more time I'll come back on the compilation from source but at least now I should be able to start experimenting with arcae.

@sjperkins
Copy link
Member

sjperkins commented Jul 13, 2023

I've created some tickets that describe solutions to some of the issues here, but I'm not intending to work on any of them soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants