[Bug 984605] Review Request: nwchem - Delivering High-Performance Computational Chemistry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=984605



--- Comment #15 from Antonio Trande <anto.trande@xxxxxxxxx> ---
(In reply to marcindulak from comment #13)
> nwchem contains also additional packages (global arrays - i think they
> distribute their own, modified version) and one would have to deal with
> compiler flags also there.

If GA is modified, you should ask an exception about its packaging in nwchem;
otherwise you must use the GA provided by Fedora repositories.

> Moreover, nwchem is a big, complex program, and
> nobody knows how it will react to RPM_OPT_FLAGS,
> and in case of problems we will be asked to go back to the default nwchem
> compiler flags.
> I hope it is a sufficient rationale for letting nwchem to handle compiler
> flags itself.

Try the patch that I uploaded; it's done quickly but it's a good start point
Following there are all changes I've done on your .spec file:

--- nwchem.orig.spec    2014-01-15 13:59:41.000000000 +0100
+++ nwchem.spec    2014-01-15 22:38:02.055348143 +0100
@@ -44,6 +44,7 @@
 URL:            http://www.nwchem-sw.org/
 # Nwchem changes naming convention of tarballs very often!
 Source0:       
http://www.nwchem-sw.org/images/%{upstream_name}-%{major_version}.revision%{minor_version}-src.%{posttag}.tar.gz
+Patch0:                 nwchem-makefile_flags.patch

 %global PKG_TOP
${RPM_BUILD_DIR}/%{name}-%{major_version}.revision%{minor_version}-src.%{posttag}

@@ -123,7 +124,11 @@

 %prep
 %setup -q -n %{name}-%{major_version}.revision%{minor_version}-src.%{posttag}
+%patch0 -p1

+sed -e 's|@@OPTFLAGS@@|%{optflags}|g' -i src/config/makefile.h
+sed -e 's|@@OPTFLAGS@@|%{optflags}|g' -i src/tools/ga-5-2/armci/configure
+sed -e 's|@@OPTFLAGS@@|%{optflags}|g' -i src/tools/ga-5-2/comex/configure

 %build
 # base settings
@@ -145,13 +150,17 @@
 %endif
 echo export HAS_BLAS=yes  >> settings.sh
 echo export BLASOPT="'%{BLASOPT}'"  >> settings.sh
+GA_COPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e
's/-Werror=format-security//')
+echo export GA_COPT="'$GA_COPT_FLAGS'" >> settings.sh
+GA_FOPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e
's/-Werror=format-security//')
+echo export GA_FOPT="'$GA_FOPT_FLAGS'" >> settings.sh
 #
 # make
 echo "# see
https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags"; >>
settings.sh
 # double-quotes outside in order to expand RPM_OPT_FLAGS
 # RPM_OPT_FLAGS are not used despite the comment
 # "can be overridden on the command line" in src/config/makefile.h
-echo export MAKE="%{__make} FOPTIMIZE='${RPM_OPT_FLAGS}'
COPTIMIZE='${RPM_OPT_FLAGS}'" >> settings.sh
+echo export MAKE="%{__make}" >> settings.sh
 echo '$MAKE nwchem_config NWCHEM_MODULES="all python" 2>&1 | tee
../make_nwchem_config.log' > make.sh
 %if 0%{?make64_to_32}
 echo '$MAKE 64_to_32 2>&1 | tee ../make_64_to_32.log' >> make.sh

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]