Wednesday, August 13, 2025

benchmark compile times

Goal 

Compare rustc and cranelift compile times.
 
 
git clone https://github.com/zed-industries/zed.git

 

Building Zed for macOS

https://github.com/zed-industries/zed/discussions/24512

 

# Build CLI
cd crates/cli/
cargo build --release
# Build Editor
cd ../zed/
cargo build --release --verbose 
   Compiling env_filter v0.1.3
Compiling email_address v0.2.9
Compiling num-cmp v0.1.0
warning: webrtc-sys@0.3.7: webrtc-sys downloading webrtc to "/Users/baxter/baxdocs/rust_learn/zed/target/release/build/webrtc-sys-8cf4e81cad33241f/out/livekit/mac-arm64-release-webrtc-b99fd2c-6/mac-arm64-release"
warning: webrtc-sys@0.3.7: In file included from /Users/baxter/baxdocs/rust_learn/zed/target/release/build/webrtc-sys-8cf4e81cad33241f/out/cxxbridge/sources/webrtc-sys/src/peer_connection.rs.cc:1:
warning: webrtc-sys@0.3.7: In file included from ./include/livekit/rtc_error.h:19:
warning: webrtc-sys@0.3.7: In file included from /Users/baxter/baxdocs/rust_learn/zed/target/release/build/webrtc-sys-8cf4e81cad33241f/out/livekit/mac-arm64-release-webrtc-b99fd2c-6/mac-arm64-release/include/api/rtc_error.h:17:
warning: webrtc-sys@0.3.7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/string:569:
warning: webrtc-sys@0.3.7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__algorithm/remove.h:12:
warning: webrtc-sys@0.3.7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__algorithm/find.h:13:
warning: webrtc-sys@0.3.7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__algorithm/unwrap_iter.h:14:
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:118:22: error: implicit instantiation of undefined template 'std::__pointer_traits_element_type<rust::Slice<const unsigned char>::iterator>'
warning: webrtc-sys@0.3.7: typedef typename __pointer_traits_element_type<pointer>::type element_type;
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:182:20: note: in instantiation of template class 'std::pointer_traits<rust::Slice<const unsigned char>::iterator>' requested here
warning: webrtc-sys@0.3.7: decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:195:59: note: during template argument deduction for class template partial specialization '_HasToAddress<_Pointer, decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer &>()))>' [with _Pointer = rust::Slice<const unsigned char>::iterator]
warning: webrtc-sys@0.3.7: static const bool value = _HasArrow<_Pointer>::value || _HasToAddress<_Pointer>::value;
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:195:59: note: in instantiation of template class 'std::_HasToAddress<rust::Slice<const unsigned char>::iterator>' requested here
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__type_traits/conjunction.h:27:32: note: in instantiation of template class 'std::_IsFancyPointer<rust::Slice<const unsigned char>::iterator>' requested here
warning: webrtc-sys@0.3.7: __expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int);
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__type_traits/conjunction.h:38:39: note: while substituting explicitly-specified template arguments into function template '__and_helper'
warning: webrtc-sys@0.3.7: using _And _LIBCPP_NODEBUG = decltype(std::__and_helper<_Pred...>(0));
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:200:5: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
warning: webrtc-sys@0.3.7: _And<is_class<_Pointer>, _IsFancyPointer<_Pointer> >::value
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__iterator/concepts.h:193:7: note: in instantiation of requirement here
warning: webrtc-sys@0.3.7: { _VSTD::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
warning: webrtc-sys@0.3.7: ^~~~~~~~~~~~~~~~~~~~~~
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__config:897:17: note: expanded from macro '_VSTD'
warning: webrtc-sys@0.3.7: # define _VSTD std
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__iterator/concepts.h:192:3: note: while substituting template arguments into constraint expression here
warning: webrtc-sys@0.3.7: requires(const _Ip& __i) {
warning: webrtc-sys@0.3.7: ^~~~~~~~~~~~~~~~~~~~~~~~~~
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__ranges/concepts.h:122:5: note: while checking the satisfaction of concept 'contiguous_iterator<rust::Slice<const unsigned char>::iterator>' requested here
warning: webrtc-sys@0.3.7: contiguous_iterator<iterator_t<_Tp>> &&
warning: webrtc-sys@0.3.7: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__ranges/concepts.h:122:5: note: while substituting template arguments into constraint expression here
 

 

Can't compile ZED anymore using Vendor - error: failed to run custom build command for `webrtc-sys v0.3.5 #24512

Compilation error when compiling webrtc-sys (from zed-industries/livekit-rust-sdks clone) #23697


macos 14.7.7

Xcode 14.2 

cargo add webrtc
 Did not solve the problem.

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license accept

 

Solution

Install:

Xcode 15.2, command line tools for Xcode 15.2  

 

 

 

Tuesday, August 12, 2025

faster rust compiling

 How Usable is the Rust Cranelift Backend Today


A Possible New Backend for Rust


Cranelift

https://blog.rust-lang.org/inside-rust/2020/11/15/Using-rust...


Cranelift codegen backend for rust

https://github.com/rust-lang/rust/blob/master/compiler/rustc_codegen_cranelift/Readme.md

rustup component add rustc-codegen-cranelift-preview --toolchain nightly

#cranelift forum

rustup component remove rustc-codegen-cranelift-preview --toolchain nightly

 

Cranelift Examples

 

Cranelift code generation comes to Rust

$ git clone https://github.com/rust-lang/rustc_codegen_cranelift
$ cd rustc_codegen_cranelift
$ ./y.sh build

 People can now try the Cranelift backend using rustup and cargo:

$ rustup component add rustc-codegen-cranelift-preview --toolchain nightly $ export CARGO_PROFILE_DEV_CODEGEN_BACKEND=cranelift $ cargo +nightly build -Zcodegen-backend

bjorn3 latest progress report  

 
 
'rustup component' (with examples)
 
 
 

Karabiner-Elements

Keyboard short cuts.

= = = = =

Fujiyoshida, Yamanashi prefecture, Japan

*Fuji Asada City “Hotspot” Drama Turns Mount Fuji Area into Tourist Attraction


Tuesday, March 18, 2025

nix for emacs deps on macos

Emacs download site uses nix

 dcaldwell at emacsforosx.com uses nix to manage packages for his build environment.

 

6nok.org

How Fatih uses Nix on macOS

great refs:

  • My first steps with Nix on Mac OSX as Homebrew replacement by Sebastian Kurfürst
  • Using Nix on macOS by Stephen Checkoway
  • Setting up Nix on macOS by Jacek Galowicz
  • Some notes on using nix by Julia Evans
  • Use Nix as Package Manager in macOS by ntzyz
  •  
     
     
     
     
     

     

     

    Tuesday, February 11, 2025

    using apt or nala

    using apt or nala

    sudo apt update 

    apt list --upgradable

    sudo apt upgrade

     sudo apt update && sudo apt upgrade

    sudo apt autoclean && sudo apt autoremove 

     

    apt list --installed

    apt search fastfetch
    apt search gcc
    apt search python
    apt search python | grep installed

    Check dependencies of a package in Ubuntu

    show dependencies of pkgname

    apt show emacsen-common

    apt-cache depends emacsen-common

    Show pkgs that depend on pkgname

    apt-cache rdepends --installed emacsen-common

    history -w /dev/stdout | grep apt |sort |uniq >> apt_history.txt
     

    sudo add-apt-repository ppa:fastfetch/stable
    sudo add-apt-repository ppa:zhangsongcui3371/fastfetch
    sudo apt install fastfetch

    sudo apt remove tlp
     

    sudo nala search

     

    Show language locales installed:

    dpkg --get-selections | grep -v deinstall | egrep "^myspell-|^hunspell-"

    Build and run Redox OS macos m1

     Build and run Redox OS macos m1

     

    https://doc.redox-os.org/book/aarch64.html

    https://gist.github.com/willnode/88da35d0c0542276b4631746d8fc3de1

     

     

    Wednesday, December 11, 2024

    homebrew hints

    homebrew hints

    homebrew is unuable; it is taking hours to install the prerequisites for emacs29.  Macport is quick in comparison.

     

     


    https://apple.stackexchange.com/questions/198623/uninstall-all-programs-installed-by-homebrew

    I usually just do: 
    brew remove --force $(brew list --formula)
    

    and

    brew remove --cask --force $(brew list)
    

     

     

    https://mac.install.guide/homebrew/4

     

    Interview: Max Howell, homebrew

    https://sourcegraph.com/podcast/max-howell

     






    Friday, December 6, 2024

    Ubuntu Multipass for x86 MBP

     

    Ubuntu multipass

     
    First download the tiny installer:
    https://github.com/canonical/multipass/releases 
    newer versions don't work on macos Monterey 12.6.7

    Docs:

    https://oscarchou.com/posts/handbook/multipass-command-cheatsheet/
    https://medium.com/@karan.bk/modify-multipass-instances-update-resources-and-share-data-with-instance-c17315dd33d0
     https://medium.com/@karan.bk/a-beginners-guide-to-create-and-manage-ubuntu-vms-in-minutes-caa1684d9375
     

    https://blog.humphd.org/multipass-on-macos/
    https://fromanegg.com/post/2020/02/28/use-ubuntu-on-mac-os-with-multipass/
    launch failed: multipass socket access denied

     https://github.com/canonical/multipass/issues/1437

     
     FYI, the new command is multipass auth. Note you must first issue multipass set local.passphrase as admin to set passphrase (and then enter this same passphrase when issuing the auth command).

    H...Gi...4...!
     
     
    https://discourse.ubuntu.com/t/ubuntu-frame-on-macos-including-apple-silicon-m1/28534 

    Juju charms

    charm-dev

    Getting started with Juju 5 

     

     

     

     

     

    Sunday, November 10, 2024

    installing fastfetch

    Installing fastfetch

    Neofetch has been abandoned so fastfetch.

    https://github.com/fastfetch-cli/fastfetch

     

    https://idroot.us/install-fastfetch-ubuntu-24-04/


    ## sudo add-apt-repository ppa:fastfetch/stable

    ## ERROR: ppa 'fastfetch/stable' not found (use --login if private) 

     

    sudo add-apt-repository ppa:zhangsongcui3371/fastfetch
    sudo apt update 
     
     
    old intel hd graphics on i7-4790 reported as Xeon 1200
    fastfetch:
    GPU: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Con]


    neofetch:
    GPU: Intel HD Graphics

    Install and run inxi for analysis:
    inxi -SGx
     
     
    Update fastfetch documentation; write python script source: 
    https://github.com/fastfetch-cli/fastfetch/issues/830 
    https://github.com/fastfetch-cli/fastfetch/pull/1292

     
    output: manpage 
     
    help2man 

    https://unix.stackexchange.com/questions/34516/can-i-create-a-man-page-for-a-script 
    https://www.dlab.ninja/2021/10/how-to-write-manpages-with-markdown-and.html
    https://www.linux-magazine.com/Online/Features/Parsing-man-pages-for-modern-users 
    https://betterprogramming.pub/man-pages-the-complete-guide-800ad93425fe
     
     
     
     

     

     

    Saturday, November 2, 2024

    sshd troubleshooting

     OpenBSD sshd server

     systemctl status ssh

     

     

    Systematic Troubleshooting

    Troubleshooting SSH Issues: A Sysadmin‘s Survival Guide

    check

    hostname

    Is host reachable on the network?

    ping host


    Look at the boot log

    journalctl -k -b -1










    Wednesday, October 30, 2024

    Apple USB keyboard (wired)

    Apple USB keyboard wired

    It was a hardware problem: three arrow keys were not working on the Apple KB.
     Plugged PS/2 keyboard  into mouse port.

    #. Not true:

    These are great keyboards but support under Ubuntu is janky.

    Info:

    https://wiki.archlinux.org/title/Apple_Keyboard#hid_apple_module_options

    https://unix.stackexchange.com/questions/407501/make-apple-keyboard-settings-persistent-in-hid-apple-parameters

     

    https://2e0pgs.github.io/blog/sysadmin/2021/04/03/apple-keyboard-ubuntu/

     

    You can add the following lines to: /etc/modprobe.d/hid_apple.conf

    $ cat /etc/modprobe.d/hid_apple.conf
    options hid_apple fnmode=2
    options hid_apple iso_layout=0
    

    Then run sudo update-initramfs -u -k all and sudo reboot


     

    mac_hid or hid_apple

     Turns out hid_apple was renamed to applespi.

    echo 2 | sudo tee /sys/module/applespi/parameters/fnmode


    For trackpads and laptop keyboard



    https://help.ubuntu.com/community/AppleKeyboard#Change_Function_Key_behavior

    https://help.ubuntu.com/community/TroubleWithAppleKbdOnUbuntu

     

     

    Wednesday, August 14, 2024

    macports port hints

    macports.org

    search for available packages

    https://ports.macports.org/

     

    port installed
     
     
    sudo port selfupdate

     

    2.4. Uninstall MacPorts

    uninstall all installed packages

    sudo port -fp uninstall installed

     To find the location of installed components, use the contents subcommand:

    port contents libxml2
    macport prefix
     
     
    https://github.com/cargo-generate/cargo-generate/issues/1208#issuecomment-2182884600
    sudo port deactivate libiconv cargo install cargo-generate sudo port activate libiconv

     

    MacPort Cheat Sheet

     

    Get description on package

    port info gnutls 

     




     
     

    Friday, August 9, 2024

    building emacs on mac from source

    Building emacs from source 

    many github emacs don't build successfully
    internet info outdated, changes in emacs 30.1 libjansson  not needed, gnutls deprecated
    need macport information, most info on homebrew;
    emacs source build works but is not packaged in a dmg
    most fail when moved out of build directory
    binaries download from: emacsformacos.com

     

    Beautiful emacs site

    https://www.masteringemacs.org/all-articles

    Successful Emacs build on mac aarch64

    builds for emacsforosx.com

    https://github.com/caldwell/build-emacs

    GNU Emacs 30.1 (build 1, aarch64-apple-darwin22.6.0, NS appkit-2299.77
     Version 13.7.4 (Build 22H420)) of 2025-03-16
    Copyright (C) 2025 Free Software Foundation, Inc.


    https://github.com/caldwell/build-emacs/issues/145
    https://github.com/caldwell/build-emacs/issues/132
    https://github.com/caldwell/build-emacs/issues/103#issuecomment-822056419

    https://github.com/caldwell/build-emacs/issues/142#issuecomment-2730442280

    Currently all my builds use Nix to automatically get dependencies, but it should work with manual dependency management using Homebrew/MacPorts/whatever as long as those dependencies are in your path when you run build-emacs-from-tar --no-deps (--no-deps should really be called --no-automatic-deps or something). Check the output of configure to see if it is detecting your dependencies.

    Steps to resolve issue:

    deleted previous build directory

    git clone https://github.com/caldwell/build-emacs
    ./fetch-emacs-from-ftp -v ftp://ftp.gnu.org/pub/gnu/emacs
     

    ./build-emacs-from-tar -v -j 8 --no-deps emacs-30.1.tar.bz2 release

    rustup target add x86_64-apple-darwin
    make
    ./combine-and-package -v Emacs-30.1-13-arm64.tar.bz2

    produced:
    Emacs-30.1-universal.dmg

    dependencies.nix

    pkgs.mkShell {
      buildInputs = [
        pkgs.darwin.apple_sdk.frameworks.AppKit

        pkgs.autoconf
        pkgs.pkgconfig
        ncurses-no-nix-store
        pkgs.zlib

        pkgs.gnutls
        pkgs.jansson
        pkgs.libxml2
        pkgs.librsvg
        pkgs.tree-sitter
        pkgs.sqlite
      ];
    }

    Successful Emacs build on macos 12.7 x86_64 

    https://github.com/imrehorvath/bundle-dylibs

    https://imrehorvath.wordpress.com/2021/04/17/wanna-build-gnu-emacs-on-macos-from-source/

     

    Use bundle_dylib to move libs inside Emacs.app. 


    Efficient successful build 29.4 (138MByte)

    https://github.com/mclear-tools/build-emacs-macos







    Switch from macports to brew

    MBP i5


    Macbook Air M3

     

    Install a few packages:

    sudo port install autoconf

    sudo port install automake

    sudo port install texinfo

    sudo port install gnutls

    sudo port install pkgconfig

    sudo port install libgcc13

     

    EmacsWiki

    gcc Emacs 

    Get the source code.
    # git clone --depth 1 --branch emacs-29.4 https://git.savannah.gnu.org/git/emacs.git emacs-29.4  
    $ git clone git://git.savannah.gnu.org/emacs.git 
    $ cd emacs
        
    $ ./autogen.sh 
    $ ./configure 
    $ make 
    $ make install
    configure: error: ELisp native compiler was requested, but libgccjit was not found.
    Please try installing libgccjit or a similar package. 
    ./configure --with-native-compilation result in libgccjit errors
      

    Package Notes

    libgcc-devel broken port #68421 
    https://issues.guix.gnu.org/issue/57849
     
    M3 build time: 11m16s
    M3  build time with libgcc13: 1m12s
    M1 build time:  1m5s

    Compiling Emacs on Mac

    builds for emacsforosx.com

    https://github.com/caldwell/build-emacs

    https://porkrind.org/missives/mac-os-x-codesigning-woes/


    Renard mentions moving libs into a common directory to make it .app portable

    https://github.com/renard/emacs-build-macosx
     

    Standalone Emacs

    https://gitlab.kitware.com/paraview/common-superbuild/-/blob/920d9bc5c6c69fd945df84668f50aca34cdf5f6f/cmake/scripts/fixup_bundle.apple.py


    automated build 

    https://github.com/jimeh/build-emacs-for-macos
    credits:
    https://gist.github.com/mikroskeem/0a5c909c1880408adf732ceba6d3f9ab#1-gcc-with-libgccjit-enabled

    https://github.com/shshkn/emacs.d/blob/master/docs/nativecomp.md

    https://gist.github.com/AllenDang/f019593e65572a8e0aefc96058a2d23e

     

    Simple build script provided:


    refs:


    self-contained build
    https://github.com/jimeh/emacs-builds

    emacs plus features recent updates:

    https://github.com/d12frosted/homebrew-emacs-plus

    build emacs on mac using port:

    https://mac4translators.blogspot.com/2017/10/evolution.html

    Many other good sites:

    https://www.zellysnyder.com/posts/compiling-emacs-on-macos/
    https://www.mattduck.com/2021-05-upgrading-to-emacs-28.html
     
    https://www.masteringemacs.org/article/speed-up-emacs-libjansson-native-elisp-compilation
    https://andersmurphy.com/2021/11/14/emacs-building-from-source-on-macos.html 
    https://emacs-ng.github.io/emacs-ng/build/building/
    https://emacs.stackexchange.com/questions/58526/how-do-i-build-emacs-from-sources-on-macos-catalina-version-10-15-4
    https://github.com/railwaycat/homebrew-emacsmacport?tab=readme-ov-file
    https://www.reddit.com/r/emacs/comments/u28dji/emacs_28_with_nativecomp_on_macos_with_macports/
     

    Native m1 builds

    https://cpufun.substack.com/p/setting-up-the-apple-m1-for-native

    https://github.com/jimeh/build-emacs-for-macos/issues/47

    Create signing Certificate




    m3 pkgs:
    port installed
    The following ports are currently installed:
      autoconf @2.72_0 (active)
      cctools @949.0.1_3+xcode (active)
    -   cowsay @3.7.0_0 (active)
      curl-ca-bundle @8.12.1_0 (active)
      db48 @4.8.30_5 (active)
      gcc13 @13.3.0_2+stdlib_flag (active)
      gcc13-libcxx @13.3.0_2+clang16 (active)
      gcc_select @0.1_10 (active)
      gdbm @1.24_0 (active)
      gettext-runtime @0.22.5_0 (active)
      gmp @6.3.0_0 (active)
      gnutls @3.7.11_1 (active)
      icu @76.1_0 (active)
      isl @0.24_1 (active)
      ld64 @3_6+ld64_xcode (active)
      ld64-xcode @2_6 (active)
      libffi @3.4.6_1 (active)
      libgcc @9.0_0 (active)
      libgcc13 @13.3.0_2+stdlib_flag (active)
      libgcc14 @14.2.0_3+stdlib_flag (active)
      libiconv @1.17_0 (active)
      libidn2 @2.3.8_0 (active)
      libmpc @1.3.1_0 (active)
      libtasn1 @4.20.0_0 (active)
      libunistring @1.3_0 (active)
      libxml2 @2.13.6_0 (active)
      libxslt @1.1.42_0 (active)
      lz4 @1.10.0_0 (active)
      m4 @1.4.19_1 (active)
      mpfr @4.2.1_0 (active)
      ncurses @6.5_0 (active)
      nettle @3.10_0 (active)
      p11-kit @0.25.5_0 (active)
      perl5.34 @5.34.3_1 (active)
      pkgconfig @0.29.2_0 (active)
      readline @8.2.013_0 (active)
      texinfo @7.2_0+perl5_34 (active)
      xz @5.6.4_0 (active)
      zlib @1.3.1_0 (active)
      zstd @1.5.6_0 (active)



    m1 pkgs:
    The following ports are currently installed:
      autoconf @2.72_0 (active)
      automake @1.16.5_0 (active)
      brotli @1.1.0_0 (active)
      bzip2 @1.0.8_0 (active)
      cctools @949.0.1_3+xcode (active)
      curl @8.8.0_1+ssl
      curl @8.9.1_1+brotli+http2+idn+psl+ssl+zstd (active)
      curl-ca-bundle @8.8.0_0
      curl-ca-bundle @8.9.1_0 (active)
      db48 @4.8.30_5 (active)
      gdbm @1.24_0 (active)
      gettext-runtime @0.22.5_0 (active)
      gmp @6.3.0_0 (active)
      gnutls @3.7.11_0 (active)
      icu @74.2_0 (active)
      isl @0.24_1 (active)
      ld64 @3_6+ld64_xcode (active)
      ld64-xcode @2_6 (active)
      libedit @20240517-3.1_0 (active)
      libffi @3.4.6_1 (active)
      libgcc @8.0_0 (active)
      libgcc13 @13.3.0_1+stdlib_flag (active)
      libgcc14 @14.2.0_1+stdlib_flag (active)
      libgit2 @1.7.2_0+threadsafe (active)
      libiconv @1.17_0 (active)
      libidn2 @2.3.7_0 (active)
      libmpc @1.3.1_0 (active)
      libpsl @0.21.5-20240306_0 (active)
      libssh2 @1.11.0_0 (active)
      libtasn1 @4.19.0_0 (active)
      libunistring @1.2_0 (active)
      libxml2 @2.13.3_0 (active)
      libxslt @1.1.42_0 (active)
      lz4 @1.9.4_0
      lz4 @1.10.0_0 (active)
      m4 @1.4.19_1 (active)
      mpfr @4.2.1_0 (active)
      ncurses @6.5_0 (active)
      nettle @3.10_0 (active)
      nghttp2 @1.62.1_0 (active)
      openssl @3_18 (active)
      openssl3 @3.3.1_1 (active)
      p11-kit @0.25.5_0 (active)
      pcre2 @10.44_0 (active)
      perl5.34 @5.34.3_1 (active)
      pkgconfig @0.29.2_0 (active)
      readline @8.2.001_0 (active)
      starship @1.19.0_0
      starship @1.20.1_0 (active)
      texinfo @7.1_0 (active)
      xz @5.4.7_0 (active)
      zlib @1.3.1_0 (active)
      zstd @1.5.6_0 (active)




     

     



    Wednesday, July 17, 2024

    using git; rust doc guessing game

    using git

     

    git init

    git add .

    git commit . -m "initial commit"

    git status .

    git log gen-man.py

    Clone a repo

    git clone https://github.com/Macchina-CLI/macchina.git

    Using git stash

    Use git stash when you want to record the current state of the working directory and the index, but want to go back to a clean working directory.

    https://opensource.com/article/21/4/git-stash

    git stash

    Update local repo to latest commit

    git pull git://git.savannah.gnu.org/emacs emacs-30.1

    Files to exclude from version control

    .gitignore
    https://github.com/github/gitignore/blob/main/Rust.gitignore
     
    https://github.com/github/gitignore/blob/main/Haskell.gitignore
     

    and for other languages.

    git - the simple guide

    MS Class Github Foundations


     

    git config user.email querqus@blair-pop.local

    git commit -m "how preview" man_page.py


    How to Delete a Forked Repository in GitHub?

    https://lifeincoding.com/how-to-delete-a-forked-repository-in-github/  

    Clone repo from a specific date 

     https://forums.freebsd.org/threads/git-download-source-from-a-specific-date.81558/ 

    git clone https://github.com/zed-industries/zed.git
    git log --after="2023-05-17 13:00" --before="2023-10-17 13:00"
    git reset --hard 291d35f337b6a9b49beff2c2d40aa741ace843a4

     

     Rust update to next version


    rustup update > up.txt 2>&1
    it worked:
    info: syncing channel updates for 'stable-aarch64-apple-darwin'
    info: latest update on 2024-11-28, rust version 1.83.0 (90b35a623 2024-11-26)
    info: downloading component 'rust-std' for 'wasm32-wasi'
    info: downloading component 'rust-src'
    info: downloading component 'cargo'
    info: downloading component 'clippy'
    info: downloading component 'rust-docs'
    info: downloading component 'rust-std'
    info: downloading component 'rustc'
    info: downloading component 'rustfmt'
    info: removing previous version of component 'rust-std' for 'wasm32-wasi'
    info: removing previous version of component 'rust-src'
    info: removing previous version of component 'cargo'
    info: removing previous version of component 'clippy'
    info: removing previous version of component 'rust-docs'
    info: removing previous version of component 'rust-std'
    info: removing previous version of component 'rustc'
    info: removing previous version of component 'rustfmt'
    info: installing component 'rust-std' for 'wasm32-wasi'
    info: installing component 'rust-src'
    info: installing component 'cargo'
    info: installing component 'clippy'
    info: installing component 'rust-docs'
    info: installing component 'rust-std'
    info: installing component 'rustc'
    info: installing component 'rustfmt'
    info: syncing channel updates for '1.80-aarch64-apple-darwin'
    info: checking for self-update

    stable-aarch64-apple-darwin updated - rustc 1.83.0 (90b35a623 2024-11-26) (from rustc 1.79.0 (129f3b996 2024-06-10))
    1.80-aarch64-apple-darwin unchanged - rustc 1.80.1 (3f5fd8dd4 2024-08-06)

    info: cleaning up downloads & tmp directories

    Programming a Guessing Game

    Rust Book: Guessing Game

     

    Monday, July 15, 2024

    cargo-generate bug iconv libiconv match libraries

    linking error between macOS and macport provided libiconv library #1208

    The problem is widespread and long lasting with many long discussions.

    _libiconv or _iconv undefined symbol on Mac OSX

     

    R-Problems with iconv on macOS

    Longstanding GHC linking issues when multiple iconv libraries are installed on macOS (Haskell #18743)

     

    long discussion:

    MacOS iconv linkage misdetection (also deprecation warnings) #830

     

    libiconv breaks compatibility with OS-provided #57821

     

    rav1e @0.6.6: iconv linking fails, expecting symbols from MacOS's iconv lib #68026

    rav1e: build fails due to git_allocator missing members #68178


     

    Examples of possible fixes: 

    ghc: Bugfixes for test and iconv linking #8523

    Fix i/macOS libc++ initialization on early instrumentation #194

    frida/frida-core

     

    solution: libiconv on Mac OS X


    FindIconv: Problem on macOS with mac ports


    I can't imagine how cmake could possibly help you with this problem. The only thing cmake does is tell you where libiconv is located. It should not matter at all to your application whether it tells you about a system copy of libiconv like the one in /usr on macOS or a third-party copy of libiconv like the one in /opt/local provided by MacPorts, so long as you use both the headers and the library from the same place. The only way the problem you're experiencing could occur is if you're using the headers from one place and the library from another, so Don't Do That.