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

mpir-2.7.0-alpha12 fails to configure on SLES11SP1 power7 (ppc64) with gcc 5.1 #18326

Closed
kiwifb opened this issue Apr 29, 2015 · 5 comments
Closed

Comments

@kiwifb
Copy link
Member

kiwifb commented Apr 29, 2015

Just as it says in the title. mpir configuration fails, this was done with sage 6.7.beta3's tarball. It is not a C++11 problem, it seems to be C11 problem, possibly ppc64 specific.

/hpc/scratch/frb15/sandbox/sage-6.7.beta3/build/pipestatus "sage-spkg -f mpir-2.7.0-alpha12 2>&1" "tee -a /hpc/scratch/frb15/sandbox/sage-6.7.beta3/logs/pkgs/mpir-2.7.0-alpha12.log"
Found local metadata for mpir-2.7.0-alpha12
Found local sources at /hpc/scratch/frb15/sandbox/sage-6.7.beta3/upstream/mpir-2.7.0-alpha12.tar.bz2
Checksum: 6a46071d007a5284dbb67c4db70306deeb3e6513 vs 6a46071d007a5284dbb67c4db70306deeb3e6513
mpir-2.7.0-alpha12
====================================================
Setting up build directory for mpir-2.7.0-alpha12
mv: cannot stat `mpir-2.7.0-alpha12*': No such file or directory
Finished set up
****************************************************
Host system:
Linux p2n14-c 2.6.32.54-0.3-ppc64 #1 SMP 2012-01-27 17:38:56 +0100 ppc64 ppc64 ppc64 GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/hpc/home/projects/packages/local.linux.ppc/pkg/gcc/5.1.0/bin/../libexec/gcc/powerpc64-linux/5.1.0/lto-wrapper
Target: powerpc64-linux
Configured with: ../configure --build=powerpc64-linux --host=powerpc64-linux --target=powerpc64-linux --with-cpu=default64 --prefix=/usr/local/pkg/gcc/5.1.0 --with-long-double-128 --enable-secureplt --enable-threads=posix --enable-languages=c,c++,fortran --enable-__cxa_atexit --enable-shared --enable-checking=release --enable-lto --enable-gnu-indirect-function --without-libelf --with-cpu=power7 --with-tune=power7 --with-build-time-tools=/opt/at7.0/powerpc64-linux/bin
Thread model: posix
gcc version 5.1.0 (GCC) 
****************************************************
Applying patches to upstream sources...
patching file gmp-h.in
patching file mpirxx.h
patching file mpn/x86/fat/fat.c
Building a 64-bit version of MPIR.
Building MPIR with the C++ interface and (also) static libraries.
------------------------------------------------------------------------
Configuring MPIR with empty CFLAGS to determine the defaults:
checking build system type... power7-unknown-linux-gnu
checking host system type... power7-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=mode64
checking compiler gcc -m64  ... no, long long reliability test 1
checking compiler gcc  ... no, long long reliability test 1
configure: error: could not find a working compiler, see config.log for details
Error configuring MPIR (with CFLAGS unset).
Consult /hpc/scratch/frb15/sandbox/sage-6.7.beta3/local/var/tmp/sage/build/mpir-2.7.0-alpha12/src/config.log for for details.

Inspecting config.log the code not compiling is

/* The following provokes a segfault in the compiler on powerpc-apple-darwin.
   Extracted from tests/mpn/t-iord_u.c.  Causes Apple's gcc 3.3 build 1640 and
   1666 to segfault with, e.g., -O2 -mpowerpc64.  */

#if defined(__GNUC__) && !defined(__clang__)
typedef unsigned long long t1;typedef t1*t2;
__inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
h(){}g(){}
#else
int dummy;
#endif

int main () { return 0; }

which give rise to the following warnings and errors

gcc conftest.c
conftest.c:9:1: warning: return type defaults to 'int' [-Wimplicit-int]
 f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
 ^
conftest.c: In function 'f':
conftest.c:10:44: warning: implicit declaration of function 'h' [-Wimplicit-function-declaration]
 for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
                                            ^
conftest.c:10:48: warning: implicit declaration of function 'g' [-Wimplicit-function-declaration]
 for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
                                                ^
conftest.c: At top level:
conftest.c:11:1: warning: return type defaults to 'int' [-Wimplicit-int]
 h(){}g(){}
 ^
conftest.c:11:6: warning: return type defaults to 'int' [-Wimplicit-int]
 h(){}g(){}
      ^
/tmp/cc80AtKw.o: In function `f':
conftest.c:(.text+0x50): undefined reference to `e'
collect2: error: ld returned 1 exit status

I had to use -std=gnu90 to compile that code -std=gnu99 and the default both gave the above errors.

CC: @jpflori @nexttime

Component: packages: standard

Reviewer: François Bissey

Issue created by migration from https://trac.sagemath.org/ticket/18326

@kiwifb kiwifb added this to the sage-6.7 milestone Apr 29, 2015
@kiwifb
Copy link
Member Author

kiwifb commented Apr 29, 2015

comment:1

Jean-Pierre could you check if you get that on the gcc compile farm? If you stull have access to it and the appropriate hardware that is.

@kiwifb

This comment has been minimized.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Apr 29, 2015

comment:3

A duplicate of #18247 (still needs review); btw. already reported on sage-devel and mpir-devel.

@nexttime nexttime mannequin added the s: needs review label Apr 29, 2015
@nexttime nexttime mannequin removed this from the sage-6.7 milestone Apr 29, 2015
@kiwifb
Copy link
Member Author

kiwifb commented Apr 29, 2015

comment:4

Missed it. Sorry about the noise.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Apr 29, 2015

Reviewer: François Bissey

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