id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,port 64271,Crystal lang port fails to build from source on Apple M1 based MacBook Pro running macOS Monterey v12.1,raw-bin,mohd-akram,"{{{ ❯ sudo port install -s crystal ---> Computing dependencies for crystal ---> Fetching distfiles for crystal ---> Verifying checksums for crystal ---> Extracting crystal ---> Applying patches to crystal ---> Configuring crystal ---> Building crystal Error: Failed to build crystal: command execution failed Error: See /opt/local/var/macports/logs/_opt_mports_macports-ports_lang_crystal/crystal/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port crystal failed }}} The incriminating portion of main.log (which itself is attached separately) shows: {{{ :info:build make: Entering directory `/opt/local/var/macports/build/_opt_mports_macports-ports_lang_crystal/crystal/work/crystal-1.2.2' :info:build /opt/local/bin/clang++-mp-13 -c -pipe -I/opt/local/libexec/openssl3/include -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch arm64 -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/opt/local/libexec/llvm-13/include -std=c++14 -stdlib=libc++ -fno-exceptions -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS :info:build CRYSTAL_CONFIG_BUILD_COMMIT="""" CRYSTAL_CONFIG_PATH='$ORIGIN/../share/crystal/src' SOURCE_DATE_EPOCH=""1636546449"" CRYSTAL_CONFIG_LIBRARY_PATH=/opt/local/libexec/openssl3/lib:/opt/local/lib ./bin/crystal build --no-debug --release --link-flags=""-L/opt/local/libexec/openssl3/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch arm64"" -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib :info:build ./bin/crystal: line 156: crystal: command not found :info:build ld: warning: ignoring file _main.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64 :info:build Undefined symbols for architecture arm64: :info:build ""_main"", referenced from: :info:build implicit entry/start for main executable :info:build ld: symbol(s) not found for architecture arm64 :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build [31;1mError: [0m[1mexecution of command failed with code: 1: `cc ""${@}"" -o /opt/local/var/macports/build/_opt_mports_macports-ports_lang_crystal/crystal/work/.home/.cache/crystal/opt-local-var-macports-build-_opt_mports_macports-ports_lang_crystal-crystal-work-crystal-1.2.2-src-ecr-process.cr/macro_run -L/opt/local/libexec/openssl3/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch arm64 -rdynamic -L/opt/local/var/macports/build/_opt_mports_macports-ports_lang_crystal/crystal/work/crystal-1.2.2-1/embedded/lib -lpcre -lgc -lpthread -L/opt/local/lib -levent -liconv -ldl`[0m :info:build make: *** [.build/crystal] Error 1 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_mports_macports-ports_lang_crystal/crystal/work/crystal-1.2.2' :info:build Command failed: cd ""/opt/local/var/macports/build/_opt_mports_macports-ports_lang_crystal/crystal/work/crystal-1.2.2"" && /usr/bin/make -j8 -w all release=1 FLAGS=--no-debug CRYSTAL_CONFIG_LIBRARY_PATH=/opt/local/libexec/openssl3/lib:/opt/local/lib :info:build Exit code: 2 :error:build Failed to build crystal: command execution failed :debug:build Error code: CHILDSTATUS 63171 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build ""system {*}$notty {*}$callback {*}$nice $fullcmdstring"" :debug:build invoked from within :debug:build ""command_exec -callback portprogress::target_progress_callback build"" :debug:build (procedure ""portbuild::build_main"" line 8) :debug:build invoked from within :debug:build ""$procedure $targetname"" }}} {{{ ❯ cd /opt/mports/macports-ports/ ❯ git log --pretty=oneline | head -n 1 99f184be589c64d07500c88cee1afc342e03e8dc jc: update to 1.17.5 }}}",defect,closed,Normal,,ports,2.7.99,fixed,arm64 monterey,,crystal