conda-forge / perl-feedstock

A conda-smithy repository for perl.
BSD 3-Clause "New" or "Revised" License
3 stars 32 forks source link

perl with c-compiler on osx-arm64 probably still broken #69

Closed croth1 closed 4 months ago

croth1 commented 6 months ago

Solution to issue cannot be found in the documentation.

Issue

Likely somewhat related to #59 - I recently switched to from osx-amd64 to osx-arm64, and I am seeing familar errors again πŸ˜•.

pixi.toml

[project]
name = "test perl"
channels = ["conda-forge"]
platforms = ["osx-arm64"]

[dependencies]
cxx-compiler = ">=1.7.0,<1.8"
perl = ">=5.32.1,<5.33"
c-compiler = ">=1.7.0,<1.8"

[tasks]
check-compiler = "perl test_c_compiler.pl"

test_c_compiler.pl

use ExtUtils::CBuilder;

my $cbuilder = ExtUtils::CBuilder->new();
if ($cbuilder->have_compiler) {
  print "Compiler is available.\n";
} else {
  print "No compiler available.\n";
}

if ($cbuilder->have_cplusplus) {
  print "C++ available.\n";
} else {
  print "No C++ available.\n";
}

pixi run check-compiler outputs:

ld: unknown option: -Wl,-pie
No compiler available.
ld: unknown option: -Wl,-pie
No C++ available.

Using the system interpreter with perl test_c_compiler.pl outside the environment:

Compiler is available.
C++ available.

Installed packages

Package                 Version    Build               Size       Kind   Source
c-compiler              1.7.0      h6aa9301_0          6.3 KiB    conda  c-compiler-1.7.0-h6aa9301_0.conda
ca-certificates         2024.2.2   hf0a4a13_0          152.1 KiB  conda  ca-certificates-2024.2.2-hf0a4a13_0.conda
cctools                 986        h4faf515_0          21.2 KiB   conda  cctools-986-h4faf515_0.conda
cctools_osx-arm64       986        h62378fb_0          1.1 MiB    conda  cctools_osx-arm64-986-h62378fb_0.conda
clang                   16.0.6     h30cc82d_5          21.1 KiB   conda  clang-16.0.6-h30cc82d_5.conda
clang-16                16.0.6     default_he012953_5  676.3 KiB  conda  clang-16-16.0.6-default_he012953_5.conda
clang_impl_osx-arm64    16.0.6     hc421ffc_10         17.3 KiB   conda  clang_impl_osx-arm64-16.0.6-hc421ffc_10.conda
clang_osx-arm64         16.0.6     h54d7cd3_10         20.2 KiB   conda  clang_osx-arm64-16.0.6-h54d7cd3_10.conda
clangxx                 16.0.6     default_h4cf2255_5  21.3 KiB   conda  clangxx-16.0.6-default_h4cf2255_5.conda
clangxx_impl_osx-arm64  16.0.6     hcd7bac0_10         17.4 KiB   conda  clangxx_impl_osx-arm64-16.0.6-hcd7bac0_10.conda
clangxx_osx-arm64       16.0.6     h54d7cd3_10         19 KiB     conda  clangxx_osx-arm64-16.0.6-h54d7cd3_10.conda
compiler-rt             16.0.6     h3808999_2          91.5 KiB   conda  compiler-rt-16.0.6-h3808999_2.conda
compiler-rt_osx-arm64   16.0.6     h3808999_2          9.4 MiB    conda  compiler-rt_osx-arm64-16.0.6-h3808999_2.conda
cxx-compiler            1.7.0      h2ffa867_0          6.3 KiB    conda  cxx-compiler-1.7.0-h2ffa867_0.conda
icu                     73.2       hc8870d7_0          11.4 MiB   conda  icu-73.2-hc8870d7_0.conda
ld64                    711        h634c8be_0          18.4 KiB   conda  ld64-711-h634c8be_0.conda
ld64_osx-arm64          711        ha4bd21c_0          1 MiB      conda  ld64_osx-arm64-711-ha4bd21c_0.conda
libclang-cpp16          16.0.6     default_he012953_5  11.3 MiB   conda  libclang-cpp16-16.0.6-default_he012953_5.conda
libcxx                  16.0.6     h4653b0c_0          1.1 MiB    conda  libcxx-16.0.6-h4653b0c_0.conda
libiconv                1.17       h0d3ecfb_2          660.6 KiB  conda  libiconv-1.17-h0d3ecfb_2.conda
libllvm16               16.0.6     haab561b_3          22.3 MiB   conda  libllvm16-16.0.6-haab561b_3.conda
libxml2                 2.12.5     h0d0cfa8_0          574.1 KiB  conda  libxml2-2.12.5-h0d0cfa8_0.conda
libzlib                 1.2.13     h53f4e23_5          47 KiB     conda  libzlib-1.2.13-h53f4e23_5.conda
llvm-openmp             18.1.1     hcd81f8e_0          269.8 KiB  conda  llvm-openmp-18.1.1-hcd81f8e_0.conda
llvm-tools              16.0.6     haab561b_3          19.7 MiB   conda  llvm-tools-16.0.6-haab561b_3.conda
openssl                 3.2.1      h0d3ecfb_0          2.7 MiB    conda  openssl-3.2.1-h0d3ecfb_0.conda
perl                    5.32.1     7_h4614cfb_perl5    13.8 MiB   conda  perl-5.32.1-7_h4614cfb_perl5.conda
sigtool                 0.1.3      h44b9a77_0          205.3 KiB  conda  sigtool-0.1.3-h44b9a77_0.tar.bz2
tapi                    1100.0.11  he4954df_0          186.9 KiB  conda  tapi-1100.0.11-he4954df_0.tar.bz2
xz                      5.2.6      h57fd34a_0          230.2 KiB  conda  xz-5.2.6-h57fd34a_0.tar.bz2
zstd                    1.5.5      h4f39d0f_0          391.1 KiB  conda  zstd-1.5.5-h4f39d0f_0.conda

Environment info

active environment : base
    active env location : /Users/christian/miniforge3
            shell level : 1
       user config file : /Users/christian/.condarc
 populated config files : /Users/christian/miniforge3/.condarc
                          /Users/christian/.condarc
          conda version : 23.11.0
    conda-build version : not installed
         python version : 3.10.13.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m2
                          __conda=23.11.0=0
                          __osx=14.4=0
                          __unix=0=0
       base environment : /Users/christian/miniforge3  (writable)
      conda av data dir : /Users/christian/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /Users/christian/miniforge3/pkgs
                          /Users/christian/.conda/pkgs
       envs directories : /Users/christian/miniconda3/envs
                          /Users/christian/miniforge3/envs
                          /Users/christian/.conda/envs
               platform : osx-arm64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.10.13 Darwin/23.4.0 OSX/14.4 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.5
                UID:GID : 501:20
             netrc file : None
           offline mode : False
croth1 commented 4 months ago

This one was on me: perl was picking up packages from PERL5LIB that were not compiled with the conda compilers.