[torqueusers] Problem making Torque RPMs on RHEL/CentOS 4.7 on ia64/Itanium via rpmbuild

Jack Challen jack_challen at ocsl.co.uk
Fri Nov 7 03:47:28 MST 2008


Hello,

I'm attempting to build Torque v2.3.3 using rpmbuild or "make rpm", as I'd like the final files to belong to an RPM 
package (for ease of upgrading, package distribution, etc). Both methods fail due to the strict compiler warnings (I 
have a work-around), but the plain "make" works as expected.
This is on an Itanium (ia64) machine running either RHEL 4.7 or CentOS 4.7 (I've tried both with the same result). 
x86_64 machines don't exhibit this problem.


There's also a small problem with the torque.spec file: it doesn't include pbs_track in the client "files" definition, 
which applies to other architectures too -- see Attempt 4.



Attempt 1:
rpmbuild -tb torque-2.3.3.tar.gz
===
make[3]: Leaving directory `/usr/src/redhat/BUILD/torque-2.3.3/src/resmom/linux'
make[3]: Entering directory `/usr/src/redhat/BUILD/torque-2.3.3/src/resmom'
if gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include  -I../../src/include -I../../src/resmom/linux -DPBS_MOM 
-DDEMUX=\"/usr/local/sbin/pbs_demux\" -DRCP_PATH=\"/usr/bin/scp\" -DRCP_ARGS=\"-rpB\" 
-DPBS_SERVER_HOME=\"/var/spool/torque\" -DPBS_ENVIRON=\"/var/spool/torque/pbs_environment\"   -O2 -g -pipe 
-D_LARGEFILE64_SOURCE -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT catch_child.o -MD -MP -MF 
".deps/catch_child.Tpo" -c -o catch_child.o catch_child.c; \
then mv -f ".deps/catch_child.Tpo" ".deps/catch_child.Po"; else rm -f ".deps/catch_child.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include  -I../../src/include -I../../src/resmom/linux -DPBS_MOM 
-DDEMUX=\"/usr/local/sbin/pbs_demux\" -DRCP_PATH=\"/usr/bin/scp\" -DRCP_ARGS=\"-rpB\" 
-DPBS_SERVER_HOME=\"/var/spool/torque\" -DPBS_ENVIRON=\"/var/spool/torque/pbs_environment\"   -O2 -g -pipe 
-D_LARGEFILE64_SOURCE -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT mom_comm.o -MD -MP -MF 
".deps/mom_comm.Tpo" -c -o mom_comm.o mom_comm.c; \
then mv -f ".deps/mom_comm.Tpo" ".deps/mom_comm.Po"; else rm -f ".deps/mom_comm.Tpo"; exit 1; fi
mom_comm.c: In function `im_eof':
mom_comm.c:1400: warning: 'num' might be used uninitialized in this function
mom_comm.c:1402: warning: 'np' might be used uninitialized in this function
make[3]: *** [mom_comm.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/usr/src/redhat/BUILD/torque-2.3.3/src/resmom'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/torque-2.3.3/src/resmom'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/torque-2.3.3/src'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.41127 (%build)
===

Attempt 2:
tar zxvf torque-2.3.3.tar.gz && cd torque-2.3.3 && ./configure && make rpm
===
(same error as above, so not re-pasting)
===

Attempt 3: (making sure the spec file doesn't define "-O2"
tar zxvf torque-2.3.3.tar.gz && cd torque-2.3.3 && ./configure && \
cp ../torque-2.3.3.tar.gz /usr/src/redhat/SOURCES && rpmbuild -bb torque.spec
===
(same error as above, so not re-pasting)
===

Attempt 4 (like Attempt 3, with work around):
===
# Edit the torque.spec file, and add "--disable-gcc-warnings" to configure_args
# Also add "%{_bindir}/pbs_track" to "%files client"
rpmbuild -bb torque.spec
Build process works, and I get the RPMs
===


I believe the rpmbuilds are failing because the rpmbuild environment adds "-O2" to the CFLAGS, and, as described by the 
configure: "configure: WARNING: This compilation has strict compiler options" --  if I do a
"make distclean && CFLAGS=-O2 ./configure && make"
I get the same error. I can't work out how to modify the rpmbuild environment to get it to stop adding the "-O2"; 
everything I've found seems to suggest "don't modify rpmbuild, fix the package". Ideally I suppose it'd be handy if 
torque built without warnings under -O2 on ia64, although I understand why no-one would have ready access to ia64 
machines. Does anyone know how to get Torque building under -O2 on ia64 (or, I suppose, how to force rpmbuild not to add 
the "-O2")?

The build environment (for what it's worth this is actually an Itanium Virtual Machine running under HP's Integrity 
Virtual Machines, on an HP-UX 11.31 host, but hopefully that's irrelevant):

[root at node1 torque-2.3.3]# lsb_release -a
LSB Version:    :core-3.0-ia64:core-3.0-noarch:graphics-3.0-ia64:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseES
Description:    Red Hat Enterprise Linux ES release 4 (Nahant Update 7)
Release:        4
Codename:       NahantUpdate7

[root at node1 torque-2.3.3]# rpm -q gcc ; rpm -q glibc
gcc-3.4.6-10
glibc-2.3.4-2.41


I might well try RHEL 5 on another guest (CentOS ia64 typically takes a while, for understandable reasons). Would anyone 
care about the results?

cheers
jack

-- 
Jack Challen
Technical Consultant, OCSL.
http://www.ocsl.co.uk/
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.


More information about the torqueusers mailing list