From: SourceForge.net <no...@so...> - 2007-02-26 21:50:31
|
Bugs item #1153594, was opened at 2005-02-28 16:21 Message generated for change (Comment added) made by dts12 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1153594&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: perl Group: hpux >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Ralph Grothe (totholz) Assigned to: Nobody/Anonymous (nobody) Summary: Stripping of -W in MakeMaker Scripts Clashes with HP cc Flag Initial Comment: Dear Bugfixers, it took me many grieves and pains to get the Net-SNMP sources with the Perl integration installed on HP-UX 11.00 with the HP Ansi C compiler. Below you will find output from various system commands and Perl invocation to gather my installation environment. Thanks to the tremendous help from your developer Johannes Schmidt-Fischer <jsf@InterFace-AG.com> we could finally trace the spots where things went terribly wrong for someone installing on HP-UX with the HP compiler and who has to link against a Perl build from the very same compiler. The big neglect seems to be that your developers seem to assume evreyone is using GCC and a Perl build from gcc as well. While the latter is even true for the Perl that HP themselves are shipping on their application CDs and offer as prebuild SD depot for download, I have to live with my Perl build from the CPAN sources that I made with HP ANSI C because I needed Perl Oracle integration via DBD::Oracle (another long and notorious trail of infamous doom stories). Someone who scripted those MakeMaker files called Makefile.PL in the Perl branch of the tarball introduced some hideous pattern substitution that obviusly was meant to strip off the gcc warning flags without putting into consideration that other compilers might have valid -W switches. For this I'd like to draw your attention to the HP-UX manpages for cc and ld: http://docs.hp.com/en/B2355-90680/cc_bundled.1.html http://docs.hp.com/en/B2355-90680/ld.1.html What I'm talking of are these substitutions: [root@terra:/usr/local/tmp/net-snmp-5.2.1] # find . -type f -name Makefile.PL.orig|xargs grep - E '\$Params\{'\''?CCFLAGS'\''?}[[:space:]]*=~' ./perl/default_store/Makefile.PL.orig: $Params {'CCFLAGS'} =~ s/ -W[-\w]+//g; # ignore developer warning s ./perl/TrapReceiver/Makefile.PL.orig: $Params {'CCFLAGS'} =~ s/ -W[-\w]+//g; # ignore developer warning s ./perl/ASN/Makefile.PL.orig: $Params{'CCFLAGS'} =~ s/ -W[-\w]+//g; # ignore developer warnings ./perl/agent/default_store/Makefile.PL.orig: $Params {'CCFLAGS'} =~ s/ -W[-\w]+//g; # ignore developer warnings ./perl/agent/Makefile.PL.orig: $Params{'CCFLAGS'} =~ s/ -W[-\w]+//g; # ignore developer warnings ./perl/OID/Makefile.PL.orig: $Params{'CCFLAGS'} =~ s/ -W[-\w]+//g; # ignore developer warnings ./perl/SNMP/Makefile.PL.orig: $Params{'CCFLAGS'} =~ s/ -W[-\w]+//g; # ignore developer warnings Please note that in the find above I was referring to Makefile.PL.orig files which of course in your tarball are the real Makefile.PL files. These had only been renamed by my patch script that you may find attached. I admit that it is quite rediculous to come up with such a script where the fixes should be incorporated in the original files in the first place. But I thought it would make my necessary changes more obvoius. Here as promised my system: [root@terra:/usr/local/tmp/net-snmp-5.2.1] # uname -a HP-UX terra B.11.00 U 9000/889 1244894362 unlimited- user license [root@terra:/usr/local/tmp/net-snmp-5.2.1] # model 9000/889/K460 root@terra:/usr/local/tmp/net-snmp-5.2.1] # perl -MConfig -e 'map{printf"%25s => %s\n",$_,$Config {$_}}grep(/flags/i,sort keys %Config)' castflags => 0 cccdlflags => +Z ccdlflags => -Wl,-E -Wl,-B,deferred ccflags => -Ae -D_HPUX_SOURCE - Wl,+vnocompatwarnings -D_LARGEFILE_SOURCE - D_FILE_OFFSET_BITS=64 ccflags_uselargefiles => -D_LARGEFILE_SOURCE - D_FILE_OFFSET_BITS=64 cppflags => -Aa -D__STDC_EXT__ - D_HPUX_SOURCE -Ae -D_HPUX_SOURCE - Wl,+vnocompatwarnings d_statfs_f_flags => doop_cflags => lddlflags => -b +vnocompatwarnings - L/usr/local/lib ldflags => -L/usr/local/lib ldflags_uselargefiles => lkflags => regexec_cflags => optimize="+O1" toke_cflags => ccflags="$ccflags - DARG_ZERO_IS_SCRIPT";optimize="+O1" voidflags => 15 yaccflags => [root@terra:/usr/local/tmp/net-snmp-5.2.1] # perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=hpux, osvers=11.00, archname=PA-RISC2.0 uname='hp-ux ganymed b.11.00 u 9000804 1404634372 unlimited-user license ' config_args='-A prepend:libswanted=cl pthread ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags =' -Ae -D_HPUX_SOURCE - Wl,+vnocompatwarnings -D_LARGEFILE_SOURCE - D_FILE_OFFSET_BI TS=64 ', optimize='+O2 +Onolimit', cppflags='-Aa -D__STDC_EXT__ - D_HPUX_SOURCE -Ae -D_HPUX_SOURCE - Wl,+vnocompatwarnings' ccversion='B.11.11.02', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='/usr/bin/ld', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lcl -lpthread -lnsl -lnm -lndbm -lmalloc -ldld -lm - lc -lndir -lcrypt -lsec perllibs=-lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc - lndir -lcrypt -lsec libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred ' cccdlflags='+Z', lddlflags='-b +vnocompatwarnings - L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under hpux Compiled at Aug 9 2002 09:50:19 @INC: /opt/perl5/lib/5.8.0/PA-RISC2.0 /opt/perl5/lib/5.8.0 /opt/perl5/lib/site_perl/5.8.0/PA-RISC2.0 /opt/perl5/lib/site_perl/5.8.0 /opt/perl5/lib/site_perl . ---------------------------------------------------------------------- >Comment By: Dave Shield (dts12) Date: 2007-02-26 21:49 Message: Logged In: YES user_id=88893 Originator: NO All currently active lines are now much more selective when discarding -W options. (See fixes dated 2006-05-13) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1153594&group_id=12694 |