Description of problem: Can't use ncargf90 on x86_64 FC6 system, I believe because /usr/bin/ncargf90 sets $libdir based on the output of 'ncargpath lib'. But that is returning /usr/lib, instead of /usr/lib64 (or /usr/lib64/ncarg, I don't know for sure). Version-Release number of selected component (if applicable): $ rpm -qa ncarg\* ncarg-devel-4.4.1-4.fc6.x86_64 ncarg-4.4.1-4.fc6.x86_64 How reproducible: always Steps to Reproduce: 1.$ ncargf90 Actual results: gfortran -O -L/usr/lib -L/usr/lib64/hdf -L/usr/lib/hdf -lncarg -lncarg_gks -lncarg_c -lX11 -lXext /usr/bin/ld: cannot find -lncarg collect2: ld returned 1 exit status
The NCARG_LIB environment variable should be being set to /usr/lib64/ncarg by /etc/profile.d/ncargs.{sh,csh}. Are you overriding it?
[bling!] NCARG_LIB is not set in those files. They contain just the NCARG_ROOT: $ head -99 /etc/profile.d/ncarg.* ==> /etc/profile.d/ncarg.csh <== setenv NCARG_ROOT /usr ==> /etc/profile.d/ncarg.sh <== export NCARG_ROOT=/usr Test manual setting: $ export NCARG_LIB=/usr/lib64/ncarg $ ncargf90 gfortran -O -L/usr/lib64/ncarg -L/usr/lib64/hdf -L/usr/lib/hdf -lncarg -lncarg_gks -lncarg_c -lX11 -lXext /usr/lib/gcc/x86_64-redhat-linux/4.1.1/libgfortranbegin.a(fmain.o): In function `main': (.text+0xa): undefined reference to `MAIN__' collect2: ld returned 1 exit status Far more reasonable (again, I'm not an ncarg user, but obviously, with no file named above, that's a reasonable message). Further, following the getting started guide, this got me to display a pretty picture: ncargex agex06 export GRAPHCAP=X11 idt agex06.ncgm
Fixed fc6 version finally built...
Umm, yeah, no. :-) On x86_64, NCARG_LIB must point to /usr/lib64/ncarg! $ uname -a Linux grad 2.6.19-1.2895.fc6 #1 SMP Wed Jan 10 18:50:56 EST 2007 x86_64 x86_64 x86_64 GNU/Linux $ rpm -qa ncarg\* ncarg-4.4.1-6.fc6.x86_64 ncarg-devel-4.4.1-6.fc6.x86_64 $ ncargf90 Library directory </usr/lib/ncarg> does not exist. $ ls -ld /usr/lib*/ncarg drwxr-xr-x 3 root root 4096 Jan 26 12:23 /usr/lib64/ncarg $ env|egrep NCARG NCARG_ROOT=/usr NCARG_LIB=/usr/lib/ncarg $ cat /etc/profile.d/ncarg.sh export NCARG_ROOT=/usr export NCARG_LIB=/usr/lib/ncarg $ cat /etc/profile.d/ncarg.csh setenv NCARG_ROOT /usr setenv NCARG_LIB /usr/lib/ncarg
Please run "rpm -V ncarg" Are there any /etc/profile.d/ncarg.*sh.rpmnew files?
[schanzle@grad ~]$ rpm -V ncarg [schanzle@grad ~]$ ls -l /etc/profile.d/ncarg* -rwxr-xr-x 1 root root 55 Jan 22 13:10 /etc/profile.d/ncarg.csh -rwxr-xr-x 1 root root 55 Jan 22 13:10 /etc/profile.d/ncarg.sh
Let's try again with -7 (just built). If that doesn't work, I'm not sure what's going on.
Sorry for the delay - and for the bad news (no change): # rpm -q ncarg ncarg-4.4.1-7.fc6 # head /etc/profile.d/ncarg* ==> /etc/profile.d/ncarg.csh <== setenv NCARG_ROOT /usr setenv NCARG_LIB /usr/lib/ncarg ==> /etc/profile.d/ncarg.sh <== export NCARG_ROOT=/usr export NCARG_LIB=/usr/lib/ncarg
Looking at your .spec, in %prep you do this: sed -i -e s,/LIB/,/%{_lib}/, config/Site.local %{SOURCE2} %{SOURCE3} First, I wouldn't edit your pristine sources like that, because a subsequent rpmbuild -bs (or -ba) will result in the modified sources packaged (is that what is happening? i386 is being built first, then x86_64 with modified sources?). Also, another rpmbuild -b without a reinstall of the source packages will result in unexpected behaviour. Second, you want to substitute /lib/, not /LIB/ in %{SOURCE2} and %{SOURCE3}, as I see from the .src.rpm, which may be moot by fixing above, but given the pristine .src.rpm contains: $ cat ncarg.sh export NCARG_ROOT=/usr export NCARG_LIB=/usr/lib/ncarg The above sed isn't going to do anything.
After hand-editing the pristine http://download.fedora.redhat.com/pub/fedora/linux/extras/6/SRPMS/ncarg-4.4.1-7.fc6.src.rpm sources/ncarg.{sh,csh} to contain (.sh shown below): export NCARG_ROOT=/usr export NCARG_LIB=/usr/LIB/ncarg A subsequent rpmbuild -bb works per manufacturer's advertised specifications, but again, sources/ncarg.sh are left modified/broken for a subsequent rebuild. $ head /var/tmp/ncarg-4.4.1-7-root-schanzle/etc/profile.d/ncarg.*sh ==> /var/tmp/ncarg-4.4.1-7-root-schanzle/etc/profile.d/ncarg.csh <== setenv NCARG_ROOT /usr setenv NCARG_LIB /usr/lib64/ncarg ==> /var/tmp/ncarg-4.4.1-7-root-schanzle/etc/profile.d/ncarg.sh <== export NCARG_ROOT=/usr export NCARG_LIB=/usr/lib64/ncarg
Changed to not modify the source files. Please try again with -8.
Sorry. :-( Your original SOURCE2 and SOURCE3 files packaged with the .src.rpm do not have /LIB/ in them, so the sed commands don't actually do anything. Fix the sources so /usr/lib/ looks like /usr/LIB/, and I think you'll be golden. Contents of SOURCE2 and SOURCE3 (after rpm -ivh ../ncarg-4.4.1-8.fc6.src.rpm): $ head ncarg.{csh,sh} ==> ncarg.csh <== setenv NCARG_ROOT /usr setenv NCARG_LIB /usr/lib/ncarg ==> ncarg.sh <== export NCARG_ROOT=/usr export NCARG_LIB=/usr/lib/ncarg $ ncargf90 Library directory </usr/lib/ncarg> does not exist. $ env|egrep NCARG NCARG_ROOT=/usr NCARG_LIB=/usr/lib/ncarg $ uname -a Linux <hostname> 2.6.19-1.2895.fc6 #1 SMP Wed Jan 10 18:50:56 EST 2007 x86_64 x86_64 x86_64 GNU/Linux $ rpm -q ncarg ncarg-4.4.1-8.fc6.x86_64 $ head /etc/profile.d/ncarg.sh* export NCARG_ROOT=/usr export NCARG_LIB=/usr/lib/ncarg (wildcard included above to show there are no .rpmnew files)
Another great reason not to modify your SOURCE files directly, how embarrassing. -9 is now being built...
5th time's the charm. Looks good from my perspective, but no feedback from end user yet, but didn't want to leave you hanging. Thanks for your persistence. :-)