0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Open5GSのMacでのビルド方法

0
Posted at

これは何?

  • 自分用メモ
  • 2億年ぶりぐらいにQiitaの記事を更新する
  • Open5GSのM1以降のMacでのビルド方法について
  • 基本的にはOpen5GSのOS X向けビルド方法の通りでいいのだが、一部ビルドファイルを修正する必要がある

前提条件

  • ハード:MacBook Pro(Apple M2 Max)
  • OS:OS X(Sequoia 15.5)

問題

Installing lib/core/libogscore.2.dylib to /Users/〇〇/open5gs/install/lib
Installing lib/proto/libogsproto.2.dylib to /Users/〇〇/open5gs/install/lib
Installing lib/dbi/libogsdbi.2.dylib to /Users/〇〇/open5gs/install/lib
Installing lib/crypt/libogscrypt.2.dylib to /Users/〇〇/open5gs/install/lib
Installing lib/ipfw/libogsipfw.2.dylib to /Users/〇〇/open5gs/install/lib
Installing lib/tun/libogstun.2.dylib to /Users/〇〇/open5gs/install/lib
Installing lib/app/libogsapp.2.dylib to /Users/〇〇/open5gs/install/lib
Installing subprojects/prometheus-client-c/libprom.dylib to /Users/〇〇/open5gs/install/lib
Installing lib/metrics/libogsmetrics.2.dylib to /Users/〇〇/open5gs/install/lib
Installing lib/sctp/libogssctp.2.dylib to /Users/〇〇/open5gs/install/lib
Installing subprojects/freeDiameter/libfdproto/libfdproto.7.dylib to /Users/〇〇/open5gs/install/lib
Installing subprojects/freeDiameter/libfdcore/libfdcore.7.dylib to /Users/〇〇/open5gs/install/lib
Installing subprojects/freeDiameter/extensions/dbg_msg_dumps.fdx to /usr/lib/freeDiameter
Installation failed due to insufficient permissions.
Attempt to use /usr/bin/sudo to gain elevated privileges? [y/n] y
  • ここでsudoつけて実行してもこのメッセージが無限に出てくる

原因

  • Open5GSのsubprojectsとして入っているfreeDiameterが、/usr/lib/に書き込みをしようとしている
  • OS X(特にBig Sur以降)では、System Integrity Protection (SIP) により /usr/lib/ への書き込みは root でも制限される
  • sudo を使っても /usr/lib のような 保護領域 にはインストールできない

解決策

  • ninjaのビルドファイルmeson.buildを書き換える
  • meson.buildは階層になっており、freeDiameter配下のmeson.build'prefix=/usr'という部分があるので、ここをmeson setup時に指定した--prefixに書き換える
  • おしまい
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?