質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

FreeBSD

FreeBSDは、Unix系のオープンソースのOSです。PC/AT互換機用ですが、他のプラットフォームにも移植されています。優れたネットワーク・セキュリティ・ストレージ機能で人気のOSです。ソースコードと共に無償で公開されており、多くの コミュニティによって長年に渡って開発されています。

Q&A

1回答

378閲覧

mastdonをFreeBSDにインストールしたらエラーが出る

退会済みユーザー

退会済みユーザー

総合スコア0

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

FreeBSD

FreeBSDは、Unix系のオープンソースのOSです。PC/AT互換機用ですが、他のプラットフォームにも移植されています。優れたネットワーク・セキュリティ・ストレージ機能で人気のOSです。ソースコードと共に無償で公開されており、多くの コミュニティによって長年に渡って開発されています。

0グッド

0クリップ

投稿2017/05/25 05:27

編集2022/01/12 10:55

#FreeBSDにmastdonを入れたらエラーが出る

##参考サイト
http://qiita.com/bezeklik/items/1a8530d530613acd665c

##求む解決方法
コマンドライン(sed等)で修正できること

##エラーメッセージ
以下の部分がすべてです。

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /usr/home/mastdon/live/vendor/bundle/ruby/2.4/gems/bootsnap-0.2.14/ext/bootsnap /usr/local/bin/ruby24 -r ./siteconf20170525-13026-1ifyvot.rb extconf.rb creating Makefile current directory: /usr/home/mastdon/live/vendor/bundle/ruby/2.4/gems/bootsnap-0.2.14/ext/bootsnap make "DESTDIR=" clean current directory: /usr/home/mastdon/live/vendor/bundle/ruby/2.4/gems/bootsnap-0.2.14/ext/bootsnap make "DESTDIR=" compiling bootsnap.c bootsnap.c:3:10: fatal error: 'sys/xattr.h' file not found #include <sys/xattr.h> ^ 1 error generated. *** Error code 1 Stop. make: stopped in /usr/home/mastdon/live/vendor/bundle/ruby/2.4/gems/bootsnap-0.2.14/ext/bootsnap make failed, exit code 1 Gem files will remain installed in /usr/home/mastdon/live/vendor/bundle/ruby/2.4/gems/bootsnap-0.2.14 for inspection. Results logged to /usr/home/mastdon/live/vendor/bundle/ruby/2.4/extensions/amd64-freebsd-10/2.4/bootsnap-0.2.14/gem_make.out An error occurred while installing bootsnap (0.2.14), and Bundler cannot continue. Make sure that `gem install bootsnap -v '0.2.14'` succeeds before bundling. In Gemfile: bootsnap

この後、bootsnap関係(config/boot.rb含む)を削除

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /usr/home/mastdon/live/vendor/bundle/ruby/2.4/gems/cld3-3.1.2/ext/cld3 /usr/local/bin/ruby24 -r ./siteconf20170525-87190-1e0reit.rb extconf.rb Failed to locate protobuf *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/$(RUBY_BASE_NAME)24 --with-protobuf-config --without-protobuf-config --with-pkg-config --without-pkg-config To see why this extension failed to compile, please check the mkmf.log which can be found here: /usr/home/mastdon/live/vendor/bundle/ruby/2.4/extensions/amd64-freebsd-10/2.4/cld3-3.1.2/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /usr/home/mastdon/live/vendor/bundle/ruby/2.4/gems/cld3-3.1.2 for inspection. Results logged to /usr/home/mastdon/live/vendor/bundle/ruby/2.4/extensions/amd64-freebsd-10/2.4/cld3-3.1.2/gem_make.out An error occurred while installing cld3 (3.1.2), and Bundler cannot continue. Make sure that `gem install cld3 -v '3.1.2'` succeeds before bundling. In Gemfile: cld3

この後、cld3関係をすべて削除

##Mastdonをインストールするまでに行ったコマンド

freebsd-update fetch freebsd-update install reboot pkg install svnup ee /usr/local/etc/svnup.conf svnup ports -v 3 echo 'WITH="" WITHOUT="X11"' >> /etc/make.conf echo 'DEFAULT_VERSIONS=ruby=2.4' >> /etc/make.conf cd /usr/ports/ports-mgmt/portupgrade && make config-recursive install clean cd /usr/ports/devel/git && make config-recursive install clean cd /usr/ports/graphics/ImageMagick && make config-recursive install clean cd /usr/ports/multimedia/ffmpeg && make config-recursive install clean cd /usr/ports/databases/redis && make config-recursive install clean cd /usr/ports/databases/postgresql96-server && make config-recursive install clean cd /usr/ports/databases/postgresql96-contrib && make config-recursive install clean cd /var/db/postgres/data96 su - postgres -c 'initdb -D ./data96 -E UTF8' service postgresql onestart su - postgres -c 'psql -c "CREATE USER mastodon CREATEDB;"' cp /var/db/postgres/data96/postgresql.conf.bak /var/db/postgres/data96/postgresql.conf sed -i.org '/shared_preload_libraries/ s/^#//' /var/db/postgres/data96/postgresql.conf sed -i.org "/shared_preload_libraries/ s/''/'pg_stat_statements'/" /var/db/postgres/data96/postgresql.conf service postgresql onerestart cd /usr/ports/www/nginx && make config-recursive install clean cd /usr/ports/www/node && make config-recursive install clean cd /usr/ports/www/yarn && make config-recursive install clean cd /usr/ports/sysutils/rubygem-bundler && make config-recursive install clean

##Mastdonをインストールするときのコマンド

pw useradd mastdon su - mastdon mkdir -p /home/mastdon cd /home/mastdon git clone https://github.com/tootsuite/mastodon.git live && cd live bundle install --deployment --without development test #↑ここでエラーが出ます #yarn install

##調査したURL
下記すべてを調査しましたが、不明でした。
https://github.com/openwrt/packages/issues/1703
https://github.com/Shopify/bootsnap/issues/32

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

このエラーの原因となっているbootsnapにPRが上がっていました

先行するIssueによれば、FreeBSDでは同じ機能がsys/extattr.hにある上に関数のシグネチャも異なるということです。

そして、bootsnapはあくまで起動高速化のためのライブラリなので、Gemfileやコード(config/boot.rbの4行目以降を全削除)から外せば、遅くはなるもののとりあえず起動はできると思います。

投稿2017/05/25 05:37

編集2017/05/25 05:37
maisumakun

総合スコア145121

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2017/05/25 06:20

cld3でも同じような問題が発生しました。 bootsnap及びcld3を削除して、対処してみました。 これ以外のエラーらしいものもあるのですが、比較環境用として、一度CentOS7から出直してみます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問