[Llvm-bgq-discuss] Compiling apps on Cetus with clang
Boisvert, Sebastien
boisvert at anl.gov
Fri Oct 10 14:09:35 CDT 2014
I have set +mpiwrapper-bgclang in my ~/.soft
Then I ran 'resoft'.
My build script is:
[boisvert at cetuslac1 biosal]$ cat scripts/IBM_Blue_Gene_Q/build-spate-clang.sh
#!/bin/bash
# on Cetus:
# 1. edit ~/.soft
# 2. run 'resoft'
CFLAGS="-I. -g -O3 -DTHORIUM_DEBUG "
CFLAGS="$CFLAGS -I/soft/libraries/alcf/current/xl/ZLIB/include"
LDFLAGS="-L/soft/libraries/alcf/current/xl/ZLIB/lib -lm -lz"
make clean
make -j 8 CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
applications/spate_metagenome_assembler/spate
I am getting this error:
Clang 3.6.0
"clang version 3.6.0 (trunk)"
CFLAGS="-I. -g -O3 -DTHORIUM_DEBUG "
/bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/cnk/process_impl.h:132:10: error: static declaration of 'Kernel_GetJobID' follows non-static declaration
Obviously, I am not the author of process_impl.h.
The line 132 is:
__INLINE__
uint64_t Kernel_GetJobID()
{
return CNK_SPI_SYSCALL_0(GETJOBID);
}
The file /bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/process.h contains the prototype:
/*! \brief Returns the JobID of the currently active job
*
* \return job identifier
*/
uint64_t Kernel_GetJobID();
I am not sure what is the problem. I suppose that it should also be __INLINE__ (whatever this is) in process.h.
I digged a little and __INLINE__ is defined in /bgsys/drivers/V1R2M2/ppc64/hwi/include/common/compiler_support.h at line 28:
#ifndef __INLINE__
#ifdef __llvm__
#define __INLINE__ static inline
#else
#define __INLINE__ extern inline __attribute__((always_inline))
#endif
#endif
So basically this is broken because a function can not be not static (in process.h) and static (process_impl.h) at the same time.
The obvious workaround here is to fix the broken compiler_support.h.
Is there a (easy) of solving this (without having to re-root the whole V1R2M2 tree !) ?
More information about the llvm-bgq-discuss
mailing list