[groonga-dev,01344] Re: mysql 5.6.11でmroonga 3.03をビルドするとエラー

Back to archive index

yoku ts. yoku0****@gmail*****
2013年 4月 30日 (火) 14:24:32 JST


こんにちは、yokuといいます。

OracleビルドのMySQL-Devel 5.6.11のx86_64版とi686のmysql_configの動きを眺めてみたのですが、
なんかちょっと動きが違うみたいです。
(rpmファイルをrpm2cpioでほどいたmysql_configの動作です)


[yoku0825 @ personal wing]$ pwd
/home/yoku0825/wing

[yoku0825 @ personal wing]$ ./5.6.11_usr_i686/bin/mysql_config
Usage: ./5.6.11_usr_i686/bin/mysql_config [OPTIONS]
Options:
        --cflags
[-I/home/yoku0825/wing/5.6.11_usr_i686/include/mysql -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables  -fPIC -g
-fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing
-DMY_PTHREAD_FASTMUTEX=1]
        --cxxflags
[-I/home/yoku0825/wing/5.6.11_usr_i686/include/mysql -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables
-felide-constructors  -fPIC -Wno-unused-parameter -g -fabi-version=2
-fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1]
        --include        [-I/home/yoku0825/wing/5.6.11_usr_i686/include/mysql]
        --libs
[-L/home/yoku0825/wing/5.6.11_usr_i686/lib/mysql -lmysqlclient
-lpthread -lm -lrt -ldl]
        --libs_r
[-L/home/yoku0825/wing/5.6.11_usr_i686/lib/mysql -lmysqlclient_r
-lpthread -lm -lrt -ldl]
        --plugindir      [/usr/lib/mysql/plugin]
        --socket         [/var/lib/mysql/mysql.sock]
        --port           [0]
        --version        [5.6.11]
        --libmysqld-libs
[-L/home/yoku0825/wing/5.6.11_usr_i686/lib/mysql -lmysqld -lpthread
-lm -lrt -lcrypt -ldl -laio]
        --variable=VAR   VAR is one of:
                pkgincludedir
[/home/yoku0825/wing/5.6.11_usr_i686/include/mysql]
                pkglibdir     [/home/yoku0825/wing/5.6.11_usr_i686/lib/mysql]
                plugindir     [/usr/lib/mysql/plugin]

[yoku0825 @ personal wing]$ ./5.6.11_usr_x86/bin/mysql_config
Usage: ./5.6.11_usr_x86/bin/mysql_config [OPTIONS]
Options:
        --cflags
[-I/home/yoku0825/wing/5.6.11_usr_x86/include/mysql -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -fPIC -g -fabi-version=2
-fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1]
        --cxxflags
[-I/home/yoku0825/wing/5.6.11_usr_x86/include/mysql -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -felide-constructors  -fPIC
-Wno-unused-parameter -g -fabi-version=2 -fno-omit-frame-pointer
-fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1]
        --include        [-I/home/yoku0825/wing/5.6.11_usr_x86/include/mysql]
        --libs           [-L/usr/lib64 -lmysqlclient -lpthread -lm -lrt -ldl]
        --libs_r         [-L/usr/lib64 -lmysqlclient_r -lpthread -lm -lrt -ldl]
        --plugindir      [/usr/lib64/mysql/plugin]
        --socket         [/var/lib/mysql/mysql.sock]
        --port           [0]
        --version        [5.6.11]
        --libmysqld-libs [-L/usr/lib64 -lmysqld -lpthread -lm -lrt
-lcrypt -ldl -laio]
        --variable=VAR   VAR is one of:
                pkgincludedir [/home/yoku0825/wing/5.6.11_usr_x86/include/mysql]
                pkglibdir     [/usr/lib64]
                plugindir     [/usr/lib64/mysql/plugin]


--libs, --libs_r, --libmysqld-libs,
--variable=pkglibdirで戻す値が、i686版はmysql_configから見た../lib/mysqlですが、
x86_64は/usr/lib64で決め打たれているぽいです。
/usrにMySQLが入っていたとして、/usr/lib/mysqlと/usr/lib64なのでちょっと気持ち悪いですね。。

直接影響しているかどうかは判りませんが、お知らせまで。。


yoku ts.

2013年4月30日 14:05 WING☆ <wings****@wing-*****>:
> 林様
>
> いつもお世話になっております。
> WING☆です。
>
> http://sourceforge.jp/projects/groonga/lists/archive/dev/2013-March/001240.html
> こちらにも書きましたが、mysql公式rpmでもこのようなことがありましたので、
> ヒントになればと思っています。
>
> 一応ビルドできないわけではないし、自前でrpm作る人も数が少ない
> と思いますので大きな問題ではないと思いますので、お時間のある
> 時にでも調査頂けると幸いです。
>
> もしも、私の環境が悪いという可能性もありますので、必要な情報が
> ありましたらご指示下さい。
>
> お手数をおかけしますが、宜しくお願い致します。
>
>
>
>
> (2013/04/30 13:07), HAYASHI Kentaro wrote:
>>
>> 林です。
>>
>> お世話になっております。
>>
>> リリース用のパッケージはchroot環境でビルドするようになっているので
>> そちらのビルドログ(CentOS 5/i386)の該当箇所周辺を漁ってみました。
>>
>> libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o  .libs/ha_mroonga_la-mrn_sys.o .libs/ha_mroonga_la-ha_mroonga.o .libs/ha_mroonga_la-mrn_table.o  -Wl,--whole-archive ./lib/.libs/libmrn_no_mysql.a ./lib/.libs/libmrn_need_mysql.a -Wl,--no-whole-archive  -lgroonga -L/usr/lib/mysql/plugin/.. -lmysqlservices -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i386-redhat-linux/4.1.2/crtendS.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o  -m32 -O2 -m32 -march=i386 -mtune=generic   -Wl,-soname -Wl,ha_mroonga.so.0 -o .libs/ha_mroonga.so.0.0.0
>> libtool: link: (cd ".libs" && rm -f "ha_mroonga.so.0" && ln -s "ha_mroonga.so.0.0.0" "ha_mroonga.so.0")
>> libtool: link: (cd ".libs" && rm -f "ha_mroonga.so" && ln -s "ha_mroonga.so.0.0.0" "ha_mroonga.so")
>> libtool: link: ( cd ".libs" && rm -f "ha_mroonga.la" && ln -s "../ha_mroonga.la" "ha_mroonga.la" )
>> mv -f .deps/ha_groonga_la-ha_mroonga.Tpo .deps/ha_groonga_la-ha_mroonga.Plo
>>
>> ぱっと見には違いがないように見えますねぇ。
>> -marchが違うくらいですし。。。
>>
>> bash-3.2# rpm -qa|grep -i mysql
>> MySQL-devel-5.6.11-1.rhel5
>> groonga-normalizer-mysql-1.0.3-0
>>
>> 時間のあるときにでも、他の環境で追試してみたいと思います。
>>
>>
>> On Sun, 28 Apr 2013 03:34:12 +0900
>> WING☆ <wings****@wing-*****> wrote:
>>
>>> WING☆です。
>>> いつも大変お世話になっております。
>>>
>>> すみません。
>>> 自己レスです。
>>>
>>> 結論から言いますと解決しました。
>>> 原因は、
>>> [groonga-dev,01240] Re: mysql 5.6.10でmroongaをビルドするとエラー
>>> と同じでした。
>>> mysql56-serverをインストールした状態であればOKというもの。
>>> しかし、不思議なことに遭遇しました。
>>>
>>> serverパッケージをインストールしない状態でmroongaをビルドしたところ、
>>> CentOS 5 i386   → ×
>>> CentOS 5 x86_64 → ×
>>> CentOS 6 i386   → ○
>>> CentOS 6 x86_64 → ×
>>> となり、6の32bit版だけビルドが正常に出来ており、他がダメ。
>>> その後、3つの環境にserverパッケージを入れてビルドしたところ3つとも
>>> OKでした。
>>>
>>> このあたり、お時間のある時にでも解析して頂けると幸いです。
>>>
>>> どうぞ、宜しくお願い致します。
>>>
>>> # 公式アナウンス後、私もアナウンスしたいと思います。
>>> # それまで動作チェックを…
>>>
>>>
>>>
>>> (2013/04/28 0:56), WING☆ wrote:
>>>> WING☆です。
>>>> いつも大変お世話になっております。
>>>>
>>>> まだ新しいバージョンのアナウンスがされていませんので、
>>>> MLに投げるのを躊躇してしまいましたが、投げることにしました。
>>>> (申し訳ありません。)
>>>>
>>>> 以前、
>>>> [groonga-dev,01227] mysql 5.6.10でmroongaをビルドするとエラー
>>>> では、解決したのですが、今回またもやエラーは発生しました。
>>>>
>>>> 今回ビルドしたのは、まだアナウンス前の最新3.03を試していて
>>>> 発生したものです。
>>>> groongaも同様に3.0.3やnormalizerの1.0.3を使用しておりますが、
>>>> こちらは問題ありませんでした。
>>>>
>>>> ■ 環境
>>>> ・mroonga-3.03(ANN前…)をビルドしようとしてエラー
>>>> ・CentOS 5(i386/x86_64)
>>>> ・groonga-3.0.3(ANN前…)
>>>> ・groonga-normalizer-mysql-1.0.3(ANN前…)
>>>> ・wingリポジトリのmysql56-5.6.11
>>>> ---
>>>> [root @ i386-el5 ~]# rpm -qa|grep groonga
>>>> groonga-libs-3.0.3-1.el5_11.wing
>>>> groonga-normalizer-mysql-1.0.3-1.el5_2.wing
>>>> groonga-normalizer-mysql-devel-1.0.3-1.el5_2.wing
>>>> groonga-plugin-suggest-3.0.3-1.el5_11.wing
>>>> groonga-3.0.3-1.el5_11.wing
>>>> groonga-devel-3.0.3-1.el5_11.wing
>>>> ---
>>>> [root @ i386-el5 ~]# ls /usr/lib/mysql/libmysqlservices.a
>>>> /usr/lib/mysql/libmysqlservices.a
>>>> ---
>>>> libtool: link: g++  -fPIC -DPIC -shared -nostdlib
>>>> /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o
>>>> /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o
>>>> .libs/ha_mroonga_la-mrn_sys.o .libs/ha_mroonga_la-ha_mroonga.o
>>>> .libs/ha_mroonga_la-mrn_table.o  -Wl,--whole-archive
>>>> ./lib/.libs/libmrn_no_mysql.a ./lib/.libs/libmrn_need_mysql.a
>>>> -Wl,--no-whole-archive  -lgroonga -L/usr/lib/mysql/plugin/..
>>>> -lmysqlservices -L/usr/lib/gcc/i386-redhat-linux/4.1.2
>>>> -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. -lstdc++ -lm -lc -lgcc_s
>>>> /usr/lib/gcc/i386-redhat-linux/4.1.2/crtendS.o
>>>> /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o  -m32 -O2 -m32
>>>> -march=i686 -mtune=generic   -Wl,-soname -Wl,ha_mroonga.so.0 -o
>>>> .libs/ha_mroonga.so.0.0.0
>>>> /usr/bin/ld: cannot find -lmysqlservices
>>>> collect2: ld returned 1 exit status
>>>> make[2]: *** [ha_mroonga.la] エラー 1
>>>> make[2]: ディレクトリ `/usr/src/redhat/BUILD/mroonga-3.03' から出ます
>>>> make[1]: *** [all-recursive] エラー 1
>>>> make[1]: ディレクトリ `/usr/src/redhat/BUILD/mroonga-3.03' から出ます
>>>> make: *** [all] エラー 2
>>>> ---
>>>>
>>>> また、不思議なのですが、公式のMySQL-devel-5.6.11-1.rhel5を
>>>> インストールしてビルドしようとしても同様のエラーになって
>>>> しまった点です。
>>>>
>>>> mroonga公式リポジトリにはビルド済みrpmがあることから、私の
>>>> 環境が悪いのかと思いますが、インストール漏れやお気づきの点
>>>> などがございましたら、ご指摘いただけますでしょうか。
>>>>
>>>> まだ、アナウンス前の新しいバージョンで申し訳ありませんが、
>>>> 宜しくお願い致します。
>>>>
>>>
>>>
>>> --
>>> ━━━━━━━━━━━━………‥‥‥・・・
>>> WING☆
>>> http://wingse.blog57.fc2.com/
>>> http://sourceforge.jp/projects/wing-repo/
>>> twitter:wingstars555
>>> Facebook:http://facebook.com/ason.fukui.5
>>> ━━━━━━━━━━━━……‥‥・・
>>>
>>> _______________________________________________
>>> groonga-dev mailing list
>>> groon****@lists*****
>>> http://lists.sourceforge.jp/mailman/listinfo/groonga-dev
>>
>>
>
>
> --
> ━━━━━━━━━━━━………‥‥‥・・・
> WING☆
> http://wingse.blog57.fc2.com/
> http://sourceforge.jp/projects/wing-repo/
> twitter:wingstars555
> Facebook:http://facebook.com/ason.fukui.5
> ━━━━━━━━━━━━……‥‥・・
>
> _______________________________________________
> groonga-dev mailing list
> groon****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/groonga-dev



groonga-dev メーリングリストの案内
Back to archive index