Opened 5 months ago

Closed 5 months ago

Last modified 4 months ago

#68989 closed defect (duplicate)

alex @3.3.0: Undefined symbols: _iconv

Reported by: apua (Apua Juan) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: alex

Description

sudo port install shellcheck works on Intel x86 (iMac 2017, Ventura), but fails on Apple silicon (M1 Pro, Sonoma)

The failure is, first it takes times at computing dependencies.

> sudo port install shellcheck
--->  Computing dependencies for shellcheck

Then, it list tons of dependencies.

 ImageMagick
 Xft2
 alex
 aom
 autoconf-archive
 bash
 boehmgc
 bsdmake
 cabal
 cabal-prebuilt
 cairo
 cctools
 coreutils
 cyrus-sasl2
 cython_select
 dav1d
 db48
 djvulibre
 docbook-xml
 docbook-xml-4.1.2
 docbook-xml-4.2
 docbook-xml-4.3
 docbook-xml-4.4
 docbook-xml-5.0
 docutils_select
 dvipng
 dvisvgm
 fftw-3
 flex
 fontconfig
 freetype
 gawk
 gcc13
 gcc13-libcxx
 gcc_select
 gd2
 gdbm
 gdk-pixbuf2
 ghc
 ghc-prebuilt
 ghostscript
 gi-docgen
 giflib
 git
 glib2
 gmake
 gmp
 gnupg2
 gnutls
 gobject-introspection
 gpgme
 graphite2
 grep
 groff
 gsed
 gtk-doc
 gzip
 hadrian
 happy
 harfbuzz
 harfbuzz-icu
 help2man
 hscolour
 imath
 isl
 itstool
 jasper
 jbig2dec
 jbigkit
 kerberos5
 latexdiff
 latexmk
 lcdf-typetools
 lcms2
 ld64
 ld64-xcode
 lerc
 libassuan
 libatomic_ops
 libavif
 libcomerr
 libde265
 libdeflate
 libelf
 libfetch
 libgcc
 libgcc13
 libgcrypt
 libgpg-error
 libheif
 libidn
 libjpeg-turbo
 libksba
 libmpc
 libnetpbm
 libpaper
 libpaper-utils
 libpixman
 libpng
 libraw
 libtasn1
 libusb
 libusb-compat
 libyaml
 libyuv
 libzip
 libzzip
 lmdb
 luametatex
 lzip
 meson
 mpfr
 netpbm
 nettle
 npth
 nspr
 nss
 opendetex
 openexr
 openjpeg
 openldap
 ossp-uuid
 p11-kit
 p5.34-algorithm-diff
 p5.34-authen-sasl
 p5.34-b-cow
 p5.34-b-hooks-endofscope
 p5.34-canary-stability
 p5.34-capture-tiny
 p5.34-cgi
 p5.34-class-data-inheritable
 p5.34-class-method-modifiers
 p5.34-class-xsaccessor
 p5.34-clone
 p5.34-common-sense
 p5.34-compress-raw-bzip2
 p5.34-compress-raw-zlib
 p5.34-config-autoconf
 p5.34-cpan-meta-requirements
 p5.34-data-dump
 p5.34-data-dumper
 p5.34-data-optlist
 p5.34-date-manip
 p5.34-dbd-csv
 p5.34-dbd-sqlite
 p5.34-dbi
 p5.34-devel-checkbin
 p5.34-devel-globaldestruction
 p5.34-devel-stacktrace
 p5.34-digest-hmac
 p5.34-digest-sha1
 p5.34-dist-checkconflicts
 p5.34-encode
 p5.34-encode-din66003
 p5.34-encode-eucjpascii
 p5.34-encode-hanextra
 p5.34-encode-iso2022
 p5.34-encode-jisx0213
 p5.34-encode-locale
 p5.34-error
 p5.34-eval-closure
 p5.34-exception-class
 p5.34-extutils-cbuilder
 p5.34-extutils-makemaker
 p5.34-extutils-manifest
 p5.34-file-copy-recursive
 p5.34-file-homedir
 p5.34-file-listing
 p5.34-file-slurper
 p5.34-file-which
 p5.34-font-afm
 p5.34-getopt-long
 p5.34-gssapi
 p5.34-html-form
 p5.34-html-formatter
 p5.34-html-parser
 p5.34-html-tagset
 p5.34-html-tree
 p5.34-http-cookiejar
 p5.34-http-cookies
 p5.34-http-daemon
 p5.34-http-date
 p5.34-http-message
 p5.34-http-negotiate
 p5.34-io-compress
 p5.34-io-compress-brotli
 p5.34-io-html
 p5.34-io-socket-ip
 p5.34-io-socket-ssl
 p5.34-ipc-cmd
 p5.34-ipc-system-simple
 p5.34-json
 p5.34-json-xs
 p5.34-libwww-perl
 p5.34-libxml-perl
 p5.34-locale-gettext
 p5.34-locale-maketext-simple
 p5.34-log-dispatch
 p5.34-log-dispatch-filerotate
 p5.34-log-log4perl
 p5.34-lwp-mediatypes
 p5.34-lwp-protocol-https
 p5.34-mac-systemdirectory
 p5.34-math-base-convert
 p5.34-math-complex
 p5.34-mime-charset
 p5.34-module-implementation
 p5.34-module-load
 p5.34-module-load-conditional
 p5.34-module-runtime
 p5.34-mozilla-ca
 p5.34-mro-compat
 p5.34-namespace-autoclean
 p5.34-namespace-clean
 p5.34-net-http
 p5.34-net-libidn
 p5.34-net-smtp-ssl
 p5.34-net-ssleay
 p5.34-package-stash
 p5.34-package-stash-xs
 p5.34-params-check
 p5.34-params-util
 p5.34-params-validationcompiler
 p5.34-pod-escapes
 p5.34-pod-simple
 p5.34-pod2-base
 p5.34-readonly
 p5.34-ref-util
 p5.34-ref-util-xs
 p5.34-regexp-ipv6
 p5.34-role-tiny
 p5.34-scalar-list-utils
 p5.34-scope-guard
 p5.34-socket
 p5.34-specio
 p5.34-sql-statement
 p5.34-sub-exporter
 p5.34-sub-exporter-progressive
 p5.34-sub-identify
 p5.34-sub-install
 p5.34-sub-name
 p5.34-sub-quote
 p5.34-sub-uplevel
 p5.34-sys-syslog
 p5.34-term-readkey
 p5.34-test-cpan-meta
 p5.34-test-cpan-meta-json
 p5.34-test-exception
 p5.34-test-fatal
 p5.34-test-leaktrace
 p5.34-test-needs
 p5.34-test-nowarnings
 p5.34-test-pod
 p5.34-test-simple
 p5.34-test-warn
 p5.34-text-balanced
 p5.34-text-csv_xs
 p5.34-text-parsewords
 p5.34-text-soundex
 p5.34-time-hires
 p5.34-time-local
 p5.34-timedate
 p5.34-tk
 p5.34-try-tiny
 p5.34-types-serialiser
 p5.34-unicode-linebreak
 p5.34-uri
 p5.34-variable-magic
 p5.34-version
 p5.34-www-mechanize
 p5.34-www-robotrules
 p5.34-xml-dom
 p5.34-xml-parser
 p5.34-xml-regexp
 p5.34-xsloader
 p5.34-xstring
 p5.34-yaml
 p5.34-yaml-tiny
 pandoc
 pdfjam
 perl5
 perl5.34
 pinentry-mac
 plotutils
 poppler
 poppler-data
 popt
 potrace
 ps2eps
 pstoedit
 psutils
 pth
 py310-alabaster
 py310-babel
 py310-build
 py310-certifi
 py310-charset-normalizer
 py310-cython-compat
 py310-docutils
 py310-idna
 py310-imagesize
 py310-importlib-metadata
 py310-installer
 py310-jinja2
 py310-jsonpointer
 py310-markupsafe
 py310-packaging
 py310-parsing
 py310-pygments
 py310-pyproject_hooks
 py310-requests
 py310-roman
 py310-setuptools
 py310-snowballstemmer
 py310-sphinx
 py310-sphinx-jsonschema
 py310-sphinx_rtd_theme
 py310-sphinxcontrib-applehelp
 py310-sphinxcontrib-devhelp
 py310-sphinxcontrib-htmlhelp
 py310-sphinxcontrib-jquery
 py310-sphinxcontrib-jsmath
 py310-sphinxcontrib-qthelp
 py310-sphinxcontrib-serializinghtml
 py310-sphinxnotes-strike
 py310-tomli
 py310-tz
 py310-urllib3
 py310-wheel
 py310-yaml
 py310-zipp
 py311-alabaster
 py311-anytree
 py311-babel
 py311-build
 py311-certifi
 py311-charset-normalizer
 py311-cython
 py311-docutils
 py311-idna
 py311-imagesize
 py311-installer
 py311-jinja2
 py311-libxml2
 py311-lxml
 py311-mako
 py311-markdown
 py311-markupsafe
 py311-meson
 py311-packaging
 py311-pygments
 py311-pyproject_hooks
 py311-requests
 py311-roman
 py311-setuptools
 py311-six
 py311-smartypants
 py311-snowballstemmer
 py311-sphinx
 py311-sphinxcontrib-applehelp
 py311-sphinxcontrib-devhelp
 py311-sphinxcontrib-htmlhelp
 py311-sphinxcontrib-jsmath
 py311-sphinxcontrib-qthelp
 py311-sphinxcontrib-serializinghtml
 py311-toml
 py311-typogrify
 py311-tz
 py311-urllib3
 py311-wheel
 pygments_select
 python310
 rsync
 shared-mime-info
 sphinx_select
 svt-av1
 t1lib
 t1utils
 tcp_wrappers
 texinfo
 texlive
 texlive-basic
 texlive-bin
 texlive-bin-extra
 texlive-common
 texlive-context
 texlive-fonts-extra
 texlive-fonts-recommended
 texlive-fontutils
 texlive-lang-czechslovak
 texlive-lang-english
 texlive-lang-european
 texlive-lang-french
 texlive-lang-german
 texlive-lang-italian
 texlive-lang-polish
 texlive-lang-portuguese
 texlive-lang-spanish
 texlive-latex
 texlive-latex-extra
 texlive-latex-recommended
 texlive-luatex
 texlive-math-science
 texlive-metapost
 texlive-pictures
 texlive-plain-generic
 texlive-tlpdb
 texlive-xetex
 tiff
 uchardet
 urw-fonts
 util-linux
 w3m
 webp
 wget
 woff2
 x265
 xmlto
 xorg-libX11
 xorg-libXau
 xorg-libXaw
 xorg-libXdmcp
 xorg-libXext
 xorg-libXfixes
 xorg-libXi
 xorg-libXmu
 xorg-libXp
 xorg-libXt
 xorg-libice
 xorg-libpthread-stubs
 xorg-libsm
 xorg-libxcb
 xorg-util-macros
 xorg-xcb-proto
 xorg-xcb-util
 xorg-xorgproto
 xorg-xtrans
 xpm
 xrender
 xxhashlib
 yasm

Eventually it failed at building alex

--->  Attempting to fetch alex-3.3.0.0_0+haskell_cabal_use_prebuilt.darwin_23.arm64.tbz2 from https://packages.macports.org/alex
--->  Attempting to fetch alex-3.3.0.0_0+haskell_cabal_use_prebuilt.darwin_23.arm64.tbz2 from http://jog.id.packages.macports.org/macports/packages/alex
--->  Attempting to fetch alex-3.3.0.0_0+haskell_cabal_use_prebuilt.darwin_23.arm64.tbz2 from https://kmq.jp.packages.macports.org/alex
--->  Building alex
Error: Failed to build alex: command execution failed    
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_alex/alex/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port shellcheck failed

Attachments (1)

main.log (33.6 KB) - added by apua (Apua Juan) 5 months ago.
Log of failure to build Alex

Download all attachments as: .zip

Change History (8)

Changed 5 months ago by apua (Apua Juan)

Attachment: main.log added

Log of failure to build Alex

comment:1 Changed 5 months ago by kencu (Ken)

you have to install the command line tools that match your version of xcode for MacPorts (or any other package manager for that matter) to work properly.

comment:2 Changed 5 months ago by kencu (Ken)

comment:3 Changed 5 months ago by kencu (Ken)

I don’t know why those instructions say “for some ports” you need the CLTs because pretty much nothing builds without them, although I guess you might install some prebuilt things.

Last edited 5 months ago by kencu (Ken) (previous) (diff)

comment:4 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: cal@… removed
Port: alex added; shellcheck @0.9.0_4 (devel haskell) removed
Resolution: duplicate
Status: newclosed
Summary: shellcheck @0.9.0_4: cannot install on Apple siliconalex @3.3.0: Undefined symbols: _iconv

Right, most users will get prebuilt archives for most ports and only a handful of things need to be built from source, of which most can get by with just the CLT and don't need Xcode.

So your bug report is that alex fails to build; it has nothing to do with shellcheck.

:info:build ld: Undefined symbols:
:info:build   _iconv, referenced from:
:info:build       _hs_iconv in libHSbase-4.18.1.0.a[5](iconv.o)
:info:build   _iconv_close, referenced from:
:info:build       _hs_iconv_close in libHSbase-4.18.1.0.a[5](iconv.o)
:info:build   _iconv_open, referenced from:
:info:build       _hs_iconv_open in libHSbase-4.18.1.0.a[5](iconv.o)
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

Duplicate of #66857.

comment:5 Changed 5 months ago by kencu (Ken)

so the main problem here is that the user didn’t have the CLTs installed.

what might have happened if the clts were installed is unclear.

Last edited 5 months ago by kencu (Ken) (previous) (diff)

comment:6 Changed 4 months ago by kencu (Ken)

alex built and installed for me on 14.2.1 arm64 with no issues:

% port -v installed alex
The following ports are currently installed:
  alex @3.3.0.0_0+haskell_cabal_use_prebuilt (active) requested_variants='' platform='darwin 23' archs='arm64' date='2023-12-28T16:37:11-0800'

Install your CLTs, you should be fine I think.

If not, please reopen this ticket with a new log after you have installed the CLTs.

comment:7 Changed 4 months ago by apua (Apua Juan)

Problem solved, thank you. 👍🏿

Note: See TracTickets for help on using tickets.