project-hatohol / hatohol

A unified manager of monitoring software
http://www.hatohol.org/
Other
89 stars 29 forks source link

enable-cpp11 may be obsoleted #1852

Open teruo-oshida opened 8 years ago

teruo-oshida commented 8 years ago

I can not build gcc 4.4 with switch --enable-cpp11=no.

cosmo0920 commented 8 years ago

Yes, enable-cpp11 configure option is already obsoleted. In CentOS 6.x, Hatohol server can build withDevToolSet-2's gcc-4.8 with -std=c++11.

teruo-oshida commented 8 years ago

OK, lets remove it.

MEMO: I've with devtoolset 3 from Scientific Linux. TODO: How to provide newer c++ lib for CentOS 6 env.

cosmo0920 commented 8 years ago

I think that we need to install additional libraries which are devtoolset-2-runtime in CentOS 6.x. ref: https://github.com/project-hatohol/hatohol/pull/1187#issuecomment-90391987

teruo-oshida commented 8 years ago

Thank you tell me it.

I found that devtoolset-3-runtime is an noarch and don't contains .so files.

cosmo0920 commented 8 years ago

I confirmed that Hatohol Server executables, which is built on CentOS 6 x86_64 vagrant box with DevToolSet-2, depends following shared object:

Hatohol Server executables

$ ldd server/src/.libs/hatohol
    linux-vdso.so.1 =>  (0x00007fff391ff000)
    libmlpl.so.0 => not found
    libhatohol.so.0 => not found
    libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007f44b69f4000)
    libmysqlclient.so.16 => /usr/lib64/mysql/libmysqlclient.so.16 (0x00007f44b6670000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f44b6459000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f44b6222000)
    libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f44b6009000)
    libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f44b5d9c000)
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f44b59b9000)
    libhatohol-common.so.0 => not found
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f44b579b000)
    libsoup-2.4.so.1 => /usr/lib64/libsoup-2.4.so.1 (0x00007f44b5535000)
    libjson-glib-1.0.so.0 => /usr/lib64/libjson-glib-1.0.so.0 (0x00007f44b5317000)
    libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00007f44b4ffc000)
    libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f44b4db0000)
    libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f44b4bad000)
    libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f44b49a8000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f44b47a0000)
    libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f44b4489000)
    libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f44b4284000)
    librabbitmq.so.1 => /usr/lib64/librabbitmq.so.1 (0x00007f44b4071000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f44b3e6d000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f44b3b66000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f44b38e2000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f44b36cc000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f44b3337000)
    libfreebl3.so => /lib64/libfreebl3.so (0x00007f44b3134000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f44b2ef0000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f44b2c08000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f44b2a04000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f44b27d8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f44b6c8f000)
    libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f44b2484000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f44b226a000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f44b204b000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f44b1e3f000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f44b1c3c000)

It seems to be not depend on DevToolSet-2's shared object because they are stored in /opt/rh/devtoolset-2/root/.

teruo-oshida commented 8 years ago

It is a great report. Thank you. Can you show me about libmlpl, libhatohol, libhatohol-common ?

cosmo0920 commented 8 years ago

Can you show me about libmlpl, libhatohol, libhatohol-common ?

They depend following shared objects in CentOS 6.7 x86_64:

libmlpl

$ ldd libmlpl.so
    linux-vdso.so.1 =>  (0x00007fffbefff000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f72dafd0000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f72dadc8000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f72dabc3000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f72da8bd000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f72da639000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f72da2a4000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f72db407000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f72da08e000)

libhatohol

$ ldd libhatohol.so
    linux-vdso.so.1 =>  (0x00007fff23f4c000)
    libmlpl.so.0 => /home/vagrant/hatohol/server/mlpl/src/.libs/libmlpl.so.0 (0x00007f7e52a18000)
    libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007f7e5277e000)
    libmysqlclient.so.16 => /usr/lib64/mysql/libmysqlclient.so.16 (0x00007f7e523fa000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f7e521e4000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f7e51fac000)
    libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f7e51d93000)
    libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f7e51b27000)
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f7e51743000)
    libhatohol-common.so.0 => /home/vagrant/hatohol/server/common/.libs/libhatohol-common.so.0 (0x00007f7e514da000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7e512bd000)
    libsoup-2.4.so.1 => /usr/lib64/libsoup-2.4.so.1 (0x00007f7e51056000)
    libjson-glib-1.0.so.0 => /usr/lib64/libjson-glib-1.0.so.0 (0x00007f7e50e38000)
    libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00007f7e50b1e000)
    libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f7e508d1000)
    libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f7e506ce000)
    libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f7e504ca000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f7e502c1000)
    libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f7e4ffaa000)
    libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f7e4fda6000)
    librabbitmq.so.1 => /usr/lib64/librabbitmq.so.1 (0x00007f7e4fb92000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f7e4f98e000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f7e4f688000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f7e4f403000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f7e4f06f000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f7e52fe6000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f7e4ee59000)
    libfreebl3.so => /lib64/libfreebl3.so (0x00007f7e4ec55000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f7e4ea11000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f7e4e72a000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f7e4e525000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f7e4e2f9000)
    libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f7e4dfa5000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f7e4dd8b000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f7e4db6c000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f7e4d960000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f7e4d75d000)

libhatohol-common

$ ldd libhatohol-common.so
    linux-vdso.so.1 =>  (0x00007fffb84ad000)
    libmlpl.so.0 => /home/vagrant/hatohol/server/mlpl/src/.libs/libmlpl.so.0 (0x00007f5af2c08000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5af29e0000)
    libsoup-2.4.so.1 => /usr/lib64/libsoup-2.4.so.1 (0x00007f5af277a000)
    libjson-glib-1.0.so.0 => /usr/lib64/libjson-glib-1.0.so.0 (0x00007f5af255c000)
    libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00007f5af2241000)
    libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f5af1ff5000)
    libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f5af1df2000)
    libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f5af1bed000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f5af19e5000)
    libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f5af16ce000)
    libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f5af14c9000)
    librabbitmq.so.1 => /usr/lib64/librabbitmq.so.1 (0x00007f5af12b6000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f5af10b2000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f5af0dab000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f5af0b27000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f5af0793000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f5af3081000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f5af057c000)
    libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f5af0229000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f5af000f000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f5aefdf8000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f5aefbd9000)
    libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f5aef96c000)
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f5aef589000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f5aef344000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f5aef05d000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f5aeee59000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f5aeec2c000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f5aeea21000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f5aee81e000)
teruo-oshida commented 8 years ago

Thank you again. It is a good news.

I'll read the how to use of devtoolset because I don't know well about it. I've met that google-chrome abort on CentOS 6 becauseof less of function in libstdc++.

cosmo0920 commented 8 years ago

I'll read the how to use of devtoolset because I don't know well about it.

Only using this through scl command like: https://github.com/project-hatohol/hatohol/blob/master/wercker.yml#L62 or simply login scl enabled bash environment:

$ scl enable devtoolset-2 bash
$ gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ which gcc
/opt/rh/devtoolset-2/root/usr/bin/gcc
teruo-oshida commented 8 years ago

Thank you I know the scl command. I found the scl command sets LD_LIBRARY_PATH but libstdc++.so is not there, it is in the other path and ,,,

$ cat /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.1/libstdc++.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-x86-64)
INPUT ( /usr/lib64/libstdc++.so.6 -lstdc++_nonshared )

It means that extended features (functions) are in nonshared to use with original shared version libstdc++.so.6, doesn't it?