cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

sci-libs/brial-1.0.1 fails to configure in Prefix #485

Closed strogdon closed 7 years ago

strogdon commented 7 years ago

I have numerous new Prefix failures with 8.1.beta5 but before I address that I need to build the subject brial. The failure from config.log:

configure:16778: checking for boostlib >= 1.58.0
configure:16861: x86_64-pc-linux-gnu-g++ -c -march=native -O0 -pipe -g -ggdb  -I/usr/include conftest.cpp >&5
conftest.cpp:38:8: error: #error Boost version is too old
     #  error Boost version is too old
        ^~~~~
configure:16861: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "BRiAl"
| #define PACKAGE_TARNAME "brial"
| #define PACKAGE_VERSION "1.0.1"
| #define PACKAGE_STRING "BRiAl 1.0.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "brial"
| #define VERSION "1.0.1"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define PBORI_HAVE_LONG_LONG /**/
| #define SIZEOF_VOID_P 8
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 8
| #define PBORI_HAVE_UNORDERED_MAP /**/
| /* end confdefs.h.  */
|
|     #include <boost/version.hpp>
|
| int
| main ()
| {
|
|     #if BOOST_VERSION >= 105800
|     // Everything is okay
|     #else
|     #  error Boost version is too old
|     #endif
|
|   ;
|   return 0;
| }
configure:16978: x86_64-pc-linux-gnu-g++ -c -march=native -O0 -pipe -g -ggdb  -I/include/boost-0 conftest.cpp >&5
configure:16978: $? = 0
configure:16980: result: yes
configure:17052: checking whether the Boost::Unit_Test_Framework library is available
configure:17075: x86_64-pc-linux-gnu-g++ -c -march=native -O0 -pipe -g -ggdb  -I/include/boost-0 conftest.cpp >&5
configure:17075: $? = 0
configure:17089: result: yes
configure:17188: error: Could not find a version of the library!

Apparently the configure is picking up on the host boost which is version 1.49. I have 1.63 in Prefix. The need to rebuild (I have brial-1.0.0 installed) is that I've noticed linking with libgomp from gcc-6.3 and things are being built with gcc-6.4. Numerous memory errors and inability to start threads, ..., etc. But fixing brial is the first step, I hope.

kiwifb commented 7 years ago

OK, that is an issue with the m4 macro for finding boost. It is behaving in an unusual fashion but then boost is an unusual beast.

strogdon commented 7 years ago

Apparently brial-1.0.0 was OK unless it picked up on the host boost and the lower version number was adequate.

kiwifb commented 7 years ago

That's very odd, I cannot think of a recent change in boost detection from that version. But the macro needs tuning, the newest version may be better, still figuring it out.

kiwifb commented 7 years ago

It is a really terrible macro but I think I know what to do. Can you add

--with-boost="${EPREFIX}"/usr

to econf in the ebuild and see if that fix the detection.

strogdon commented 7 years ago

Yes, that fixed the configure and build. I now have to figure out why gcc 6.3.0 stuff is being linked when gcc 6.4.0 is being used

ldd -r ~/usr/lib/libbrial_groebner.so
    linux-vdso.so.1 (0x00007ffc85bf2000)
    libbrial.so.1 => /storage/strogdon/gentoo-rap/usr/lib64/libbrial.so.1 (0x00007fdd5a84e000)
    libpng16.so.16 => /storage/strogdon/gentoo-rap/usr/lib64/libpng16.so.16 (0x00007fdd5a607000)
    libz.so.1 => /storage/strogdon/gentoo-rap/usr/lib64/libz.so.1 (0x00007fdd5a3ea000)
    libm4ri-0.0.20140914.so => /storage/strogdon/gentoo-rap/usr/lib64/libm4ri-0.0.20140914.so (0x00007fdd5a1b7000)
    libstdc++.so.6 => /storage/strogdon/gentoo-rap/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libstdc++.so.6 (0x00007fdd59dbc000)
    libm.so.6 => /storage/strogdon/gentoo-rap/lib64/libm.so.6 (0x00007fdd59aa5000)
    libc.so.6 => /storage/strogdon/gentoo-rap/lib64/libc.so.6 (0x00007fdd596f3000)
    libgcc_s.so.1 => /storage/strogdon/gentoo-rap/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc_s.so.1 (0x00007fdd594dc000)
    libgomp.so.1 => /storage/strogdon/gentoo-rap/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgomp.so.1 (0x00007fdd592af000)
    libpthread.so.0 => /storage/strogdon/gentoo-rap/lib64/libpthread.so.0 (0x00007fdd5908f000)
    /storage/strogdon/gentoo-rap/lib64/ld-linux-x86-64.so.2 (0x00007fdd5b1c3000)
    libdl.so.2 => /storage/strogdon/gentoo-rap/lib64/libdl.so.2 (0x00007fdd58e8b000)
strogdon commented 7 years ago

Looks like there is a buggy gcc-config.

kiwifb commented 7 years ago

That bit is out of my hand, you may want to forward it to the gentoo-alt mailing list.

kiwifb commented 7 years ago

It suddenly strikes me that you don't have libgomp directly. You get it by loading libm4ri. If you do readelf -d on the same library you shouldn't see libgomp in the list. On the other hand I would expect to see libstdc++ from gcc 6.4.0 but they will have the same soname.

Have you rebuilt m4ri with gcc 6.4.0?

strogdon commented 7 years ago

Yes you are correct relative to readelf -d and libgomp. Backported gcc-config and everything seems OK. I had rebuild system and a host of other things before I homed in on gcc-config.

ldd -r ~/usr/lib/libbrial_groebner.so
    linux-vdso.so.1 (0x00007ffc61bb7000)
    libbrial.so.1 => /storage/strogdon/gentoo-rap/usr/lib64/libbrial.so.1 (0x00007f8f02ffd000)
    libpng16.so.16 => /storage/strogdon/gentoo-rap/usr/lib64/libpng16.so.16 (0x00007f8f02db6000)
    libz.so.1 => /storage/strogdon/gentoo-rap/usr/lib64/libz.so.1 (0x00007f8f02b99000)
    libm4ri-0.0.20140914.so => /storage/strogdon/gentoo-rap/usr/lib64/libm4ri-0.0.20140914.so (0x00007f8f02966000)
    libstdc++.so.6 => /storage/strogdon/gentoo-rap/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/libstdc++.so.6 (0x00007f8f02564000)
    libm.so.6 => /storage/strogdon/gentoo-rap/lib64/libm.so.6 (0x00007f8f0224d000)
    libc.so.6 => /storage/strogdon/gentoo-rap/lib64/libc.so.6 (0x00007f8f01e9b000)
    libgcc_s.so.1 => /storage/strogdon/gentoo-rap/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/libgcc_s.so.1 (0x00007f8f01c84000)
    libgomp.so.1 => /storage/strogdon/gentoo-rap/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/libgomp.so.1 (0x00007f8f01a56000)
    libpthread.so.0 => /storage/strogdon/gentoo-rap/lib64/libpthread.so.0 (0x00007f8f01836000)
    /storage/strogdon/gentoo-rap/lib64/ld-linux-x86-64.so.2 (0x00007f8f03972000)
    libdl.so.2 => /storage/strogdon/gentoo-rap/lib64/libdl.so.2 (0x00007f8f01632000)

I will close this one.