2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

osxcrossでpkg-configのパスを設定するには

Last updated at Posted at 2016-02-17

背景

mruby-cliでmruby-mrmagickをマルチプラットフォームでビルド可能にしようと奮闘していた。

PKG_CONFIG_PATHが効かない

ImageMagcikはどうやらPNGサポートの有効無効の判定をpkg-configコマンドで
判断している模様。

しかも、クロスコンパイル指定していると、対象のpkg-configコマンドを検出して、これを利用するようだった。

libpngを/usr/x86_64-apple-darwin14/配下に入れており、この配下の
/usr/x86_64-apple-darwin14/lib/pkgconfigに
PKG_CONFIG_FILEパスを追加しようとするもNG

ちなみにpkg-configはosxcrossの物は

ls -l `which x86_64-apple-darwin14-pkg-config `
lrwxrwxrwx 1 root root 29 Aug  2  2015 /opt/osxcross/target/bin/x86_64-apple-darwin14-pkg-config -> x86_64-apple-darwin14-wrapper

stringsして文字列に当たりをつけた。

strings `which x86_64-apple-darwin14-pkg-config `|grep PKG
OSXCROSS_PKG_CONFIG_NO_MP_INC
OSXCROSS_PKG_CONFIG_SYSROOT_DIR
OSXCROSS_PKG_CONFIG_PATH
OSXCROSS_PKG_CONFIG
PKG_CONFIG_LIBDIR
OSXCROSS_PKG_CONFIG_PATH=/usr/x86_64-apple-darwin14/lib/pkgconfig x86_64-apple-darwin14-pkg-config libpng --libs

-L/usr/x86_64-apple-darwin14/lib -lpng16  

という事で、

OSXCROSS_PKG_CONFIG_PATH

関連投稿

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?