Hi, Here is a patch to the lam 7.1.4 rpm so it can build with libcr (https://ftg.lbl.gov/CheckpointRestart/CheckpointDownloads.shtml) on 64bits system. The current lam archive includes an old libtool version that mistakenly uses /usr/lib/libcr.so instead of /usr/lib64/libcr.so to link lam, resulting in a link failure.
The real problem is that this libtool versions uses gcc -print-search-dirs to search for *.la files and the default gcc in CentOS has a path that shows /usr/lib before /usr/lib64. Thus libtool uses /usr/lib/libcr.la insteal of /usr/lib64/libcr.la, and this fails. IMHO, my patch is somewhat hugly as it patches on the go the files generated by configure, but as I'm not an autotools expert, I was unable to find a cleaner way to avoid linking 64bits object files with 32bits libraries. Best regards. -- Olivier LAHAYE CEAEA Saclay DRT-LIST-DCSI-DIR
Index: lam-7.1.4-oscar.spec =================================================================== --- lam-7.1.4-oscar.spec (révision 9212) +++ lam-7.1.4-oscar.spec (copie de travail) @@ -61,7 +61,7 @@ # Arbitrary options to pass to LAM's configure script. -%{!?config_options: %define config_options --without-blcr --with-gm=/opt/gm --with-tm=/opt/pbs} +%{!?config_options: %define config_options --with-blcr --with-gm=/opt/gm --with-tm=/opt/pbs --with-wrapper-extra-ldflags="-L/usr/lib64 /usr/lib64/libcr.so" --with-fc=/usr/bin/gfortran --enable-shared} # Passed to LAM's configure script, this is meant to provide a default # RPI for LAM. @@ -103,18 +103,19 @@ Summary: OSCAR-specific LAM/MPI programming environment Name: %{lam_name} Version: 7.1.4 -Release: 1 +Release: 2 Vendor: LAM/MPI Team License: BSD Group: Development/Libraries Source: lam-%{version}.tar.gz Patch: lam_module.tcl.in.patch +Patch1: lam_blcr_64bit.patch URL: http://www.lam-mpi.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: %__rm %__make %__mkdir %__sed %__mv %__chmod Provides: mpi -Requires: %{requires} -BuildRequires: rsh %{requires} +Requires: %{requires} blcr-libs +BuildRequires: rsh %{requires} blcr-devel %description This RPM is created specifically for the OSCAR distribution. The main @@ -180,6 +181,10 @@ %setup -q -n lam-%{version} %patch0 -p1 +%ifarch x86_64 +%patch1 -p0 +%endif + # Otherwise, this directory shows up on security reports %__chmod -R o-w "$RPM_BUILD_DIR/lam-%{version}" @@ -190,7 +195,21 @@ # ############################################################################# %build + +%ifarch x86_64 +# Can't figure out where to cleanly patch the configure stuff, thus do it the hard way. +for file2patch in $(grep -rl '/usr/lib/libcr.so' .) +do + sed -i -e 's|/usr/lib/libcr.so|/usr/lib64/libcr.so|g' $file2patch +done + +for file2patch in $(grep -rl 'lib="$searchdir/lib${name}${search_ext}"' .) +do + sed -i -e 's|searchdir/lib|searchdir/lib64|g' $file2patch +done +%endif %configure %{rpi} %{rsh} %{config_options} + %ifnarch noarch %__make all %endif @@ -298,6 +317,9 @@ # ############################################################################# %changelog +* Fri May 21 2010 Olivier Lahaye <olivier.laha...@free.fr> 7.1.4-2 +- Patch for x86_64 blcr (Berkley Checkpoint/Restart) support + * Tue Apr 04 2006 Bernard Li <b...@bcgsc.ca> - modulefile was conflicting mpi instead of lam
------------------------------------------------------------------------------
_______________________________________________ Oscar-devel mailing list Oscar-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oscar-devel