On Tue, Sep 8, 2015 at 5:04 PM, arnaud gaboury <arnaud.gaboury@xxxxxxxxx> wrote: > On Tue, Sep 8, 2015 at 4:47 PM, Jonathan Underwood > <jonathan.underwood@xxxxxxxxx> wrote: >> I see what you're trying to do is build a package using the intel >> compiler suite rather than the usual gcc toolchain. > Exactly. And this is not an easy affair, especially as it is my first > rpmbuild. I can build the package from source with MKL and ICC, but I > would be happier to have a clean .rpm file to install. > > A few years ago I >> needed to do that for packaging molpro locally, so I am attaching that >> spec file which may give you some hints on how to go about it. Bare in >> mind that I haven't thought about this for a few years, so probably >> won't be able to answer any questions on it, but it might start you >> off in the right direction. > > I will have a close look at your spec file. The point I am fighting > with is where/how to tell make to find the right stuff. > (ld_library_path, ld_flags, cxxflags etc) I can see in your spec file you use %global. I couldn't find any entry in the Fedora documentation about rpmbuild. My issue is a variable environment one. If I source manually the two scripts, build goes well. When sourcing from the spec file, it fails. So I guess at some point make can't find what it needs. Maybe shall I insted source the scripts somewhere else than in %build section? Here are variables I have on my shell env when sourcing manually: CPATH=/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp/include:/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/include:/opt/intel/compilers_and_libraries_2016.0.109/linux/tbb/include:/storage/development/include LIBRARY_PATH=/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp/../compiler/lib/intel64:/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64:/opt/intel/compilers_and_libraries_2016.0.109/linux/tbb/lib/intel64/gcc4.1:/storage/development/lib/intel64_lin:/storage/development/../tbb/lib/intel64_lin/gcc4.4:/storage/development/../compiler/lib/intel64_lin LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries_2016.0.109/linux/mpi/intel64/lib:/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp/../compiler/lib/intel64:/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64:/opt/intel/compilers_and_libraries_2016.0.109/linux/tbb/lib/intel64/gcc4.1:/opt/intel/debugger_2016/libipt/intel64/lib:/storage/development/lib/intel64_lin:/storage/development/../tbb/lib/intel64_lin/gcc4.4:/storage/development/../compiler/lib/intel64_lin CLASSPATH=/storage/development/lib/daal.jar INTEL_PYTHONHOME=/opt/intel/debugger_2016/python/intel64/ GDB_CROSS=/opt/intel/debugger_2016/gdb/intel64_mic/bin/gdb-mic GDBSERVER_MIC=/opt/intel/debugger_2016/gdb/targets/mic/bin/gdbserver MPM_LAUNCHER=/opt/intel/debugger_2016/mpm/mic/bin/start_mpm.sh MANPATH=/opt/intel/documentation_2016/en/man/common:/opt/intel/compilers_and_libraries_2016.0.109/linux/man/en_US:/opt/intel/documentation_2016/en/debugger//gdb-ia/man/:/opt/intel/documentation_2016/en/debugger//gdb-mic/man/:/opt/intel/documentation_2016/en/debugger//gdb-igfx/man/ INFOPATH=/opt/intel/documentation_2016/en/debugger//gdb-ia/info/:/opt/intel/documentation_2016/en/debugger//gdb-mic/info/:/opt/intel/documentation_2016/en/debugger//gdb-igfx/info/ NLSPATH=/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64/locale/%l_%t/%N:/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64/locale/%l_%t/%N:/opt/intel/debugger_2016/gdb/intel64_mic/share/locale/%l_%t/%N:/opt/intel/debugger_2016/gdb/intel64/share/locale/%l_%t/%N TBBROOT=/opt/intel/compilers_and_libraries_2016.0.109/linux/tbb MIC_LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/mic:/opt/intel/compilers_and_libraries_2016.0.109/linux/mpi/mic/lib:/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/mic:/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/mic:/opt/intel/compilers_and_libraries_2016.0.109/linux/tbb/lib/mic MIC_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/mic:/opt/intel/compilers_and_libraries_2016.0.109/linux/mpi/mic/lib:/opt/intel/compilers_and_libraries_2016.0.109/linux/tbb/lib/mic MKLROOT=/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl IPPROOT=/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp INTEL_LICENSE_FILE=/opt/intel/compilers_and_libraries_2016.0.109/linux/licenses:/opt/intel/licenses:/home/poisonivy/intel/licenses I see some variables/values from the spec file are not propagated to my global env, but are certainly set for the compile time only and inside a build env. That's where I am messing and unable to pass at once all these variables to my build env. > > Thank you for your help. >> >> On 8 September 2015 at 12:07, arnaud gaboury <arnaud.gaboury@xxxxxxxxx> wrote: >>> I am building a rpm package. For make to success and have the correct >>> env variables, I need to source a few scripts and unset a few >>> variables. >>> rpmbuild does not understand the source and unset commands. >>> >>> How shall I proceed to get the desired variables? >>> >>> Thank you >>> >>> -- >>> >>> google.com/+arnaudgabourygabx >>> -- >>> devel mailing list >>> devel@xxxxxxxxxxxxxxxxxxxxxxx >>> https://admin.fedoraproject.org/mailman/listinfo/devel >>> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct >> >> -- >> devel mailing list >> devel@xxxxxxxxxxxxxxxxxxxxxxx >> https://admin.fedoraproject.org/mailman/listinfo/devel >> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct > > > > -- > > google.com/+arnaudgabourygabx -- google.com/+arnaudgabourygabx -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct