[Llvm-bgq-discuss] Compiling apps on Cetus with clang

Boisvert, Sebastien boisvert at anl.gov
Fri Oct 10 14:15:50 CDT 2014


If I create a separate file for this broken prototype, will there be further things
that need to be cared of ?

> ________________________________________
> From: Hal Finkel [hfinkel at anl.gov]
> Sent: Friday, October 10, 2014 2:13 PM
> To: Boisvert, Sebastien
> Cc: llvm-bgq-discuss at lists.alcf.anl.gov
> Subject: Re: [Llvm-bgq-discuss] Compiling apps on Cetus with clang
> Hi,
> Unfortunately, this is a known problem (and is already part of a Clang-compatibility PMR with IBM).
> The problem really is not what is in compiler_support.h, but the fact that the declaration in process.h is missing __INLINE__ (if you'll notice, all of the other declarations have them). What I've done previously is to create a local copy of process.h, add the __INLINE__ and then put that file in my include path ahead of the real one.
> I should really create a proper system-wide work-around for this, but I've not yet.
> -Hal
> ----- Original Message -----
> > From: "Sebastien Boisvert" <boisvert at anl.gov>
> > To: llvm-bgq-discuss at lists.alcf.anl.gov
> > Sent: Friday, October 10, 2014 2:09:35 PM
> > Subject: [Llvm-bgq-discuss] Compiling apps on Cetus with clang
> >
> >
> >
> > 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 !) ?
> >
> > _______________________________________________
> > llvm-bgq-discuss mailing list
> > llvm-bgq-discuss at lists.alcf.anl.gov
> > https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
> >
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory


More information about the llvm-bgq-discuss mailing list