Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AFNI build failure #3

Open
TheChymera opened this issue Nov 1, 2017 · 4 comments
Open

AFNI build failure #3

TheChymera opened this issue Nov 1, 2017 · 4 comments

Comments

@TheChymera
Copy link
Member

TheChymera commented Nov 1, 2017

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: [email protected] sci-biology
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux prefix userland_GNU
 * FEATURES:   preserve-libs
>>> Unpacking source...
 * Fetching �[1mhttps://github.com/AFNI/AFNI�[22m ...
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 �[1mhttps://github.com/AFNI/AFNI�[22m to �[1m/home/hioanas/gentoo/var/tmp/portage/sci-biology/afni-9999/work/afni-9999�[22m ...
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
�[01m�[Kniml_uuid.c:�[m�[K In function ‘�[01m�[Kget_UNIQ_string�[m�[K’:
�[01m�[Kniml_uuid.c:93:10:�[m�[K �[01;35m�[Kwarning: �[m�[Kignoring return value of ‘�[01m�[Kfread�[m�[K’, declared with attribute warn_unused_result [�[01;35m�[K-Wunused-result�[m�[K]
          �[01;35m�[Kfread( &urr , 1,NURR, ufp )�[m�[K; fclose(ufp);
          �[01;35m�[K^~~~~~~~~~~~~~~~~~~~~~~~~~~�[m�[K
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
�[01m�[Kniml_url.c:�[m�[K In function ‘�[01m�[Kread_URL_http�[m�[K’:
�[01m�[Kniml_url.c:248:7:�[m�[K �[01;35m�[Kwarning: �[m�[Kignoring return value of ‘�[01m�[Kfread�[m�[K’, declared with attribute warn_unused_result [�[01;35m�[K-Wunused-result�[m�[K]
       �[01;35m�[Kfread( buf , 1 , nuse , cfile )�[m�[K ;             /* read file in */
       �[01;35m�[K^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[m�[K
�[01m�[Kniml_url.c:�[m�[K In function ‘�[01m�[Kread_URL_ftp�[m�[K’:
�[01m�[Kniml_url.c:355:4:�[m�[K �[01;35m�[Kwarning: �[m�[Kignoring return value of ‘�[01m�[Ksystem�[m�[K’, declared with attribute warn_unused_result [�[01;35m�[K-Wunused-result�[m�[K]
    �[01;35m�[Ksystem( sname )�[m�[K ; unlink( sname ) ;
    �[01;35m�[K^~~~~~~~~~~~~~~�[m�[K
�[01m�[Kniml_url.c:379:4:�[m�[K �[01;35m�[Kwarning: �[m�[Kignoring return value of ‘�[01m�[Kfread�[m�[K’, declared with attribute warn_unused_result [�[01;35m�[K-Wunused-result�[m�[K]
    �[01;35m�[Kfread( buf , 1 , nuse , sp )�[m�[K ;  /* AT LAST! */
    �[01;35m�[K^~~~~~~~~~~~~~~~~~~~~~~~~~~~�[m�[K
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 �[01m�[K/usr/include/features.h:367:0�[m�[K,
                 from �[01m�[K/usr/include/math.h:26�[m�[K,
                 from �[01m�[Kmri_cfft.c:7�[m�[K:
�[01m�[K/home/hioanas/gentoo/usr/include/sys/cdefs.h:481:49:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq �[01;31m�[K(�[m�[K3,5)
                                                 �[01;31m�[K^�[m�[K
In file included from �[01m�[K/usr/include/math.h:48:0�[m�[K,
                 from �[01m�[Kmri_cfft.c:7�[m�[K:
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathdef.h:19:3:�[m�[K �[01;31m�[Kerror: �[m�[K#error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
 # �[01;31m�[Kerror�[m�[K "Never use <bits/mathdef.h> directly; include <complex.h> instead"
   �[01;31m�[K^~~~~�[m�[K
In file included from �[01m�[K/usr/include/math.h:83:0�[m�[K,
                 from �[01m�[Kmri_cfft.c:7�[m�[K:
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:118:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_FUNCS_EXT)
                 �[01;31m�[K^�[m�[K
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:299:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_BFP_EXT)
                 �[01;31m�[K^�[m�[K
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:318:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_BFP_EXT)
                 �[01;31m�[K^�[m�[K
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:387:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_BFP_EXT)
                 �[01;31m�[K^�[m�[K
In file included from �[01m�[K/usr/include/math.h:104:0�[m�[K,
                 from �[01m�[Kmri_cfft.c:7�[m�[K:
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:118:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_FUNCS_EXT)
                 �[01;31m�[K^�[m�[K
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:299:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_BFP_EXT)
                 �[01;31m�[K^�[m�[K
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:318:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_BFP_EXT)
                 �[01;31m�[K^�[m�[K
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:387:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_BFP_EXT)
                 �[01;31m�[K^�[m�[K
In file included from �[01m�[K/usr/include/math.h:151:0�[m�[K,
                 from �[01m�[Kmri_cfft.c:7�[m�[K:
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:118:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_FUNCS_EXT)
                 �[01;31m�[K^�[m�[K
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:299:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_BFP_EXT)
                 �[01;31m�[K^�[m�[K
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:318:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_BFP_EXT)
                 �[01;31m�[K^�[m�[K
�[01m�[K/home/hioanas/gentoo/usr/include/bits/mathcalls.h:387:17:�[m�[K �[01;31m�[Kerror: �[m�[Kmissing binary operator before token "("
 #if __GLIBC_USE �[01;31m�[K(�[m�[KIEC_60559_BFP_EXT)
                 �[01;31m�[K^�[m�[K
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
Copy link
Member

Doeme commented Nov 1, 2017

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
Copy link
Member

Doeme commented Nov 1, 2017

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

@TheChymera TheChymera changed the title No-Multilib on Prefix/RAP AFNI build failure Nov 4, 2017
@TheChymera
Copy link
Member Author

Fix submitted upstream.

@Doeme
Copy link
Member

Doeme commented Nov 4, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants