2019-06-16

Emacs 27.0.50 を macOS 10.15 Catalina でコンパイルした

macOS 11.15 Catalina beta 1 へアップデートしたら、むかし入れた Emacs が動かなくなったので、改めてソースから最新版をコンパイルした。

Homebrew の設定とかは 11.14 Mojave 時代にやっていたので、そのまま使った。過去のコパンイル記事はこちら。

ソースコードの取得

Emacs の開発版を git 経由で取得する:

$ git clone git://git.savannah.gnu.org/emacs.git emacs-2019

コンパイル

git で取得したソースには configure スクリプトがないので、autogen コマンドで作成。

$ cd emacs
$ ./autogen.sh

デフォルトだと xml2 ライブラリーのパスを解決できないので、CFLAGS でパスを指定。あと、mailutils がどうのと言われて configure が最後まで実行されないので、mailutils をインストールして指定しておく。

$ brew install mailutils
$ CFLAGS=`xml2-config --cflags` ./configure --without-xim --with-mailutils

Configured for 'x86_64-apple-darwin19.0.0'.

  Where should the build process find the source code?    .
  What compiler should emacs be built with?               gcc -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/libxml2
  Should Emacs use the GNU version of malloc?             no
    (The GNU allocators don't work with this system configuration.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    nextstep
  What toolkit should Emacs use?                          none
  Where do we find X Windows header files?                NONE
  Where do we find X Windows libraries?                   NONE
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   no
  Does Emacs use -ljpeg?                                  no
  Does Emacs use -ltiff?                                  no
  Does Emacs use a gif library?                           no 
  Does Emacs use a png library?                           no 
  Does Emacs use -lrsvg-2?                                no
  Does Emacs use cairo?                                   no
  Does Emacs use -llcms2?                                 no
  Does Emacs use imagemagick?                             no
  Does Emacs support sound?                               no
  Does Emacs use -lgpm?                                   no
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               no
  Does Emacs use a file notification library?             yes (kqueue)
  Does Emacs use access control lists?                    yes 
  Does Emacs use -lselinux?                               no
  Does Emacs use -lgnutls?                                yes
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              no
  Does Emacs use HarfBuzz?                                no
  Does Emacs use -lm17n-flt?                              no
  Does Emacs use -lotf?                                   no
  Does Emacs use -lxft?                                   no
  Does Emacs use -lsystemd?                               no
  Does Emacs use -ljansson?                               no
  Does Emacs use -lgmp?                                   yes
  Does Emacs directly use zlib?                           yes
  Does Emacs have dynamic modules support?                no
  Does Emacs use toolkit scroll bars?                     yes
  Does Emacs support Xwidgets (requires gtk3)?            no
  Does Emacs have threading support in lisp?              yes
  Does Emacs support the portable dumper?                 yes
  Does Emacs support legacy unexec dumping?               no
  Which dumping strategy does Emacs use?                  pdumper



Run 'make' to build Emacs, then run 'src/emacs' to test it.
Run 'make install' in order to build an application bundle.
The application will go to nextstep/Emacs.app and can be run or moved
from there.
The application will be fully self-contained.

色々なライブラリーが no になってしまっているけど、まずは動かすことを第一目標に気にしない。時間が出来た時に、改めて設定を見直してみよう。

make install でコンパイル。./nextstep ディレクトリー下に Emacs が出来上がる。

$ make install

ぼくは .bashrc に次の一行を書いて、ターミナルから emacs コマンドを叩けるようにしている。

# Emacs
alias emacs='open ~/project/emacs/nextstep/Emacs.app/'

ただ、ターミナルを起動した時に .bashrc を読み込んでくれない。Catalina からデフォルト・シェルが zsh に変更になったと聞くけど、その影響かな? でも起動している shell は bash のようなんだけど。これも、時間が出来た時に調べてみよう。

1 comment:

  1. Công ty dịch thuật Sài Gòn là nhà cung cấp dịch vụ dịch thuật tại TP Hồ Chí Minh: biên dịch (dịch chuyên ngành, dịch công chứng Sài Gòn, phiên dịch chuyên nghiệp tại Lầu 6, tòa nhà becamex, 47 Điện Biên Phủ, Đakao, Quận 1, TP Hồ Chí Minh. Công ty dịch thuật Sài Gòn vinh dự và tự hào được đánh giá là địa chỉ công ty dịch thuật tiếng Hàn cung cấp dịch vụ dịch thuật hơn 50 ngôn ngữ khác nhau như tiếng Anh, tiếng Nhật, tiếng Trung, tiếng Pháp, tiếng Đức, tiếng Nga, tiếng Tây Ban Nha, Bồ Đào Nha, Thái Lan, Lào, Campuchia, Thụy Điển, Thổ Nhĩ Kỳ…Với phong cách làm việc nghiêm túc, chuyên nghiệp nhằm mang đến cho Quý khách hàng tại thành phố Hồ Chí Minh trải nghiệm tốt nhất trên thị trường

    ReplyDelete