pcp
[Top] [All Lists]

Re: [pcp] building pcp-pmda-infiniband

To: Martin Hicks <mort@xxxxxxx>
Subject: Re: [pcp] building pcp-pmda-infiniband
From: Scott Emery <emery@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 May 2010 11:06:42 -0500
Cc: Scott Emery <emery@xxxxxxx>, pcp@xxxxxxxxxxx
In-reply-to: Your message of "Wed, 26 May 2010 07:29:56 CDT." <20100526122956.GG25390@xxxxxxxxxxxxxxxxxxxxxxxxx>
        So, one approach is to embed the infiniband PMDA into
pcp/src/pmdas, then modfied pcp/src/pmdas/GNUmakefile to include
pcp-pmda-infiniband in $SUBDIRS then make from pcp root.

        I did not experience success with the rpmbuild (-ti)
approach as documented below, but I may have set things up
wrong.

Scott Emery
emery@xxxxxxx

emery@xxxxxxx:  Martin Hicks <mort@xxxxxxx>
In message <20100526122956.GG25390@xxxxxxxxxxxxxxxxxxxxxxxxx>, Martin Hicks wri
tes:
>
>On Tue, May 25, 2010 at 06:43:55PM -0500, Scott Emery wrote:
>> 
>>      I was having some trouble building pcp-pmda-infiniband.  As I read
>> the make file, and various related bits, it looks like it may still be
>> designed to be dropped into the regular pcp build.  The latest speedbump is
>> the definition of $TOPDIR, which looks like it should be the base directory
>> of the place where you built pcp. 
>> 
>>      How is pcp-pmda-infiniband intended to be built?
>
>Just typing "make" in the top level dir with a modern pcp, pcp-libs, and
>pcp-libs-devel installed, although I always rebuild as an RPM with:
>
>rpmbuild -ta pcp-pmda-infiniband-<ver>.tar.gz
>
>mh
>


Some details about what I have done:

Having cloned the canonical git trees locally, I clone copies of them
to build in.

  515  git clone -l /u/srcs/pcp
  519  git clone -l /u/srcs/pcp-gui
  520  git clone -l /u/srcs/pcpqa
  521  git clone -l /u/srcs/pcp-pmda-cluster
  523  git clone -l /u/srcs/pcp-pmda-infiniband


semery@pfe1:~/devel/pcp> git checkout -b 3.2.1.nas 3.2.1
Switched to a new branch "3.2.1.nas"
semery@pfe1:~/devel/pcp-pmda-infiniband> git checkout -b v1.0.1-4.nas v1.0.1-4
Switched to a new branch "v1.0.1-4.nas"

I made and installed the pcp and pcp-gui packages:
service22 /u/semery/devel # rpm -qa | grep pcp
pcp-3.2.1-1
pcp-libs-3.2.1-1
pcp-gui-1.4.6-1
pcp-libs-devel-3.2.1-1

service22 /u/semery/devel/pcp-pmda-infiniband # make
make -C src
make[1]: Entering directory `/staff/semery/devel/pcp-pmda-infiniband/src'
rm -f domain.h
echo "#define IB " \
        `/usr/bin/awk '$1 == "IB" { print $2 }' /var/lib/pcp/pmns/stdpmid.pcp` >
 domain.h
/usr/lib64/pcp/bin/newhelp -n root -v 2 -o help < help
make[1]: Warning: File `help.dir' has modification time 0.001 s in the future
gcc -fpic -fno-strict-aliasing -D_GNU_SOURCE  -Wall -g -DPCP_DEBUG -DPCP_VERSION
=\"3.2.1\" -I/src/include    -c -o ib.o ib.c
ib.c: In function 'ib_fetch_val':
ib.c:629: warning: implicit declaration of function 'port_performance_query_via'
ib.c: In function 'ib_reset_perfcounters':
ib.c:871: warning: implicit declaration of function 'port_performance_reset_via'
gcc -fpic -fno-strict-aliasing -D_GNU_SOURCE  -Wall -g -DPCP_DEBUG -DPCP_VERSION
=\"3.2.1\" -I/src/include    -c -o pmda.o pmda.c
gcc -fpic -fno-strict-aliasing -D_GNU_SOURCE  -Wall -g -DPCP_DEBUG -DPCP_VERSION
=\"3.2.1\" -I/src/include    -c -o daemon.o daemon.c
gcc -fpic -fno-strict-aliasing -D_GNU_SOURCE  -Wall -g -DPCP_DEBUG -DPCP_VERSION
=\"3.2.1\" -I/src/include  -o pmdaib  -Wall -L/src/libpcp/src -L/src/libpcp_pmda
/src  ib.o pmda.o daemon.o -libumad -libmad -libcommon -L/src/libpcp/src -L/src/
libpcp_pmda/src -lpcp_pmda -lpcp
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: can
not find -libcommon
collect2: ld returned 1 exit status
make[1]: *** [pmdaib] Error 1
make[1]: Leaving directory `/staff/semery/devel/pcp-pmda-infiniband/src'
make: *** [default] Error 2

service22 /u/semery/devel/pcp-pmda-infiniband # rpm -ql libibcommon-pp-1.1.2-1.o
fed20090528r1.4.1sgi606r1.sles10
/usr/lib/libibcommon.so.1
/usr/lib/libibcommon.so.1.0.0
/usr/lib64/libibcommon.so.1
/usr/lib64/libibcommon.so.1.0.0
/usr/share/doc/packages/libibcommon-pp
/usr/share/doc/packages/libibcommon-pp/AUTHORS
/usr/share/doc/packages/libibcommon-pp/COPYING
/usr/share/doc/packages/libibcommon-pp/ChangeLog


Digging around the in make files revealed the need to set $TOPDIR to the
base of the pcp build tree.  Hmm...

I naively thought that using the spec file would help.  I got rpmbuild to
work, but ran into the $TOPDIR problem again.

service22 /u/semery/devel #  rpmbuild -ti pcp-pmda-infiniband-1.0.1.tar.bz2
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.56568
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd /usr/src/packages/BUILD
+ rm -rf pcp-pmda-infiniband-1.0.1
+ /usr/bin/bzip2 -dc /staff/semery/devel/pcp-pmda-infiniband-1.0.1.tar.bz2
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd pcp-pmda-infiniband-1.0.1
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.56568
+ umask 022
+ cd /usr/src/packages/BUILD
+ /bin/rm -rf /var/tmp/pcp-pmda-infiniband-1.0.1-build
++ dirname /var/tmp/pcp-pmda-infiniband-1.0.1-build
+ /bin/mkdir -p /var/tmp
+ /bin/mkdir /var/tmp/pcp-pmda-infiniband-1.0.1-build
+ cd pcp-pmda-infiniband-1.0.1
+ make
make -C src
make[1]: Entering directory 
`/usr/src/packages/BUILD/pcp-pmda-infiniband-1.0.1/src'
rm -f domain.h
echo "#define IB " \
        `/usr/bin/awk '$1 == "IB" { print $2 }' /var/lib/pcp/pmns/stdpmid.pcp` 
> domain.h
/usr/lib64/pcp/bin/newhelp -n root -v 2 -o help < help
gcc -fpic -fno-strict-aliasing -D_GNU_SOURCE  -Wall -g -DPCP_DEBUG 
-DPCP_VERSION=\"3.2.1\" -I/src/include    -c -o ib.o ib.c
ib.c: In function 'ib_fetch_val':
ib.c:629: warning: implicit declaration of function 'port_performance_query_via'
ib.c: In function 'ib_reset_perfcounters':
ib.c:871: warning: implicit declaration of function 'port_performance_reset_via'
gcc -fpic -fno-strict-aliasing -D_GNU_SOURCE  -Wall -g -DPCP_DEBUG 
-DPCP_VERSION=\"3.2.1\" -I/src/include    -c -o pmda.o pmda.c
gcc -fpic -fno-strict-aliasing -D_GNU_SOURCE  -Wall -g -DPCP_DEBUG 
-DPCP_VERSION=\"3.2.1\" -I/src/include    -c -o daemon.o daemon.c
gcc -fpic -fno-strict-aliasing -D_GNU_SOURCE  -Wall -g -DPCP_DEBUG 
-DPCP_VERSION=\"3.2.1\" -I/src/include  -o pmdaib  -Wall -L/src/libpcp/src 
-L/src/libpcp_pmda/src  ib.o pmda.o daemon.o -libumad -libmad -libcommon 
-L/src/libpcp/src -L/src/libpcp_pmda/src -lpcp_pmda -lpcp 
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: 
cannot find -libcommon
collect2: ld returned 1 exit status
make[1]: *** [pmdaib] Error 1
make[1]: Leaving directory 
`/usr/src/packages/BUILD/pcp-pmda-infiniband-1.0.1/src'
make: *** [default] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.56568 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.56568 (%build)



<Prev in Thread] Current Thread [Next in Thread>