IBT-FMI / NeuroGentooProject

1 stars 0 forks source link

AFNI build failure #3

Open TheChymera opened 6 years ago

TheChymera commented 6 years ago

While the nipype issue has since been addressed on our RAP machines, it is now becoming apparent that I cannot emerge sci-biology/afni on them.

AFNI can successfully be emerged on all our other machines, and the one difference that seems to overlap perfectly with AFNI not building is that glibc is built with -multilib. This seems consistent with the error I am getting:

 * Package:    sci-biology/afni-9999
 * Repository: neurogentoo
 * Maintainer: h.chr@mail.ru sci-biology
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux prefix userland_GNU
 * FEATURES:   preserve-libs
>>> Unpacking source...
 * Fetching https://github.com/AFNI/AFNI ...
git fetch https://github.com/AFNI/AFNI +HEAD:refs/git-r3/HEAD
git symbolic-ref refs/git-r3/sci-biology/afni/0/__main__ refs/git-r3/HEAD
 * Checking out https://github.com/AFNI/AFNI to /home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work/afni-9999 ...
git checkout --quiet refs/git-r3/HEAD
GIT update -->
   repository:               https://github.com/AFNI/AFNI
   at the commit:            0dbe9690081c85714c5293b78ea7fced35af23fd
>>> Source unpacked in /home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work
>>> Preparing source in /home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work/afni-9999/src ...
/home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/temp/environment: line 2575: CC: command not found
>>> Source prepared.
>>> Configuring source in /home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work/afni-9999/src ...
>>> Source configured.
>>> Compiling source in /home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work/afni-9999/src ...
make -j40 -j1 all plugins suma_exec 
/bin/cp -f niml/niml.h .
echo "#undef  AFNI_VERSION_LABEL" > AFNI_version.h ;                 \
echo '#define AFNI_VERSION_LABEL    "'`cat AFNI_version_base.txt`'"' \
             >> AFNI_version.h ;                                             \
echo "#undef  AFNI_VERSION_PLATFORM" >> AFNI_version.h ;             \
echo '#define AFNI_VERSION_PLATFORM "'linux_fedora_19_64'"'              \
             >> AFNI_version.h ;
( cd niml/ ; make all 'CC=x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY' ; /bin/mv -f *.o .. ; )
make[1]: Entering directory '/home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work/afni-9999/src/niml'
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_b64.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_element.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_elemio.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_registry.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_util.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_byteorder.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_header.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_malloc.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_rowtype.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_uuid.c
niml_uuid.c: In function ‘get_UNIQ_string’:
niml_uuid.c:93:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
          fread( &urr , 1,NURR, ufp ); fclose(ufp);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_do.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_htable.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_md5.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_url.c
niml_url.c: In function ‘read_URL_http’:
niml_url.c:248:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
       fread( buf , 1 , nuse , cfile ) ;             /* read file in */
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
niml_url.c: In function ‘read_URL_ftp’:
niml_url.c:355:4: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
    system( sname ) ; unlink( sname ) ;
    ^~~~~~~~~~~~~~~
niml_url.c:379:4: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
    fread( buf , 1 , nuse , sp ) ;  /* AT LAST! */
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_stream.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_struct.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_dataset.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_vector.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_stat.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_dtable.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c niml_sucker.c
make[1]: Leaving directory '/home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work/afni-9999/src/niml'
/bin/rm -f mri_cfft.o
x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE  -DDONT_USE_XTDESTROY -c mri_cfft.c -I. -I/usr/include -Inifti/nifti2 -Inifti/niftilib -Inifti/nifticdf -Inifti/znzlib -I3DEdge/src -Irickr -DHAVE_ZLIB -DHAVE_GIFTI
In file included from /usr/include/features.h:367:0,
                 from /usr/include/math.h:26,
                 from mri_cfft.c:7:
/home/hioanas/gentoo/usr/include/sys/cdefs.h:481:49: error: missing binary operator before token "("
 #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
                                                 ^
In file included from /usr/include/math.h:48:0,
                 from mri_cfft.c:7:
/home/hioanas/gentoo/usr/include/bits/mathdef.h:19:3: error: #error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
 # error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
   ^~~~~
In file included from /usr/include/math.h:83:0,
                 from mri_cfft.c:7:
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:118:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_FUNCS_EXT)
                 ^
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:299:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:318:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:387:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^
In file included from /usr/include/math.h:104:0,
                 from mri_cfft.c:7:
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:118:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_FUNCS_EXT)
                 ^
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:299:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:318:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:387:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^
In file included from /usr/include/math.h:151:0,
                 from mri_cfft.c:7:
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:118:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_FUNCS_EXT)
                 ^
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:299:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:318:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^
/home/hioanas/gentoo/usr/include/bits/mathcalls.h:387:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^
make: *** [Makefile.INCLUDE:1565: mri_cfft.o] Error 1
 * ERROR: sci-biology/afni-9999::neurogentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sci-biology/afni-9999::neurogentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-biology/afni-9999::neurogentoo'`.
 * The complete build log is located at '/home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/temp/build.log'.
 * The ebuild environment file is located at '/home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/temp/environment'.
 * Working directory: '/home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work/afni-9999/src'
 * S: '/home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work/afni-9999/src'

Is there any (easy) way to make a RAP install multilib? I don't see the point of keeping it no-multilib.

EDIT turns out this is entirely unrelated to multilib, but rather a prefix issue.

Doeme commented 6 years ago

Hm, I can't really see why multilib on glibc should make any difference, especially if the errors appear in the header-files and not the shared library. Actually I don't see why we should build a multilib-profile in the first place, since we won't run either wine or pre-compiled 32bit-binaries.

By the way, the problem is there:

x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE -DDONT_USE_XTDESTROY -c mri_cfft.c -I. -I/usr/include -Inifti/nifti2 -Inifti/niftilib -Inifti/nifticdf -Inifti/znzlib -I3DEdge/src -Irickr -DHAVE_ZLIB -DHAVE_GIFTI

Emphasis mine. This is hardcoded in many Makefiles.

Doeme commented 6 years ago

As a quick fix sed'ing away all -I/usr/include might work, since every sane compiler should add this implicitly anyways

TheChymera commented 6 years ago

Fix submitted upstream.

Doeme commented 6 years ago

It's actually only a partial fix. Only really works combined with the ugly patching here