swarm-support
[Top][All Lists]
Advanced

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

[Swarm-Support] Swarm on Scientific Linux 5


From: Paul Johnson
Subject: [Swarm-Support] Swarm on Scientific Linux 5
Date: Mon, 26 Nov 2007 10:15:55 -0600
User-agent: Thunderbird 2.0.0.9 (X11/20071121)

Dear William:

I'm copying this note to swarm-support in order to bring everybody into the loop.

I see I did not post the RPMs for the i386 platform on my new ScientificLinux website (http://pj.freefaculty.org/ScientificLinux). I Only posted RPMs for x86_64. I will build those other RPMs for you tonight at home.

If you are impatient, I believe you could do this.

Make sure you have tcl and tk devel packages installed. I think those are missing on your system. Example, tcl should have something like

$ rpm -qa | grep tcl
tcl-devel-8.4.13-3.fc6.i386
tcl-8.4.13-3.fc6.i386

tk should have similar.

Just to be safe, remove the gperf you built from source. In general, avoid installing from source because things like that are hard to uninstall unless you really know what you are doing. Install the gperf RPM. I'm pretty sure that is available from the SL5 repository, just a simple "yum install gperf" should get it. Be sure you have the emacs program installed (Swarm uses it as a Lisp interpreter). I have a faint recollection that another library may be necessary, was it intltool? Anyway, if your build fails, it will tell you

Make sure you have hdf5 RPM installed    from SL5.

Take the SRPM for blt

http://pj.freefaculty.org/ScientificLinux/5/SRPMS/blt-2.4-19sl5.src.rpm

and rebuild that. Install the RPM.

THen take the swarm SRC.RPM.

http://pj.freefaculty.org/ScientificLinux/5/SRPMS/swarm-2.2.4-3_sl5.src.rpm

and rebuild that.

Should be done.

Now, in case you don't know about building RPMS, I recently wrote this down for somebody. If you do it my way, you will actually understand what goes on.

You don't need the option for --define "kernels" for most RPMS. That's just a livna/kmod thing.

Question: How to build RPMS from the SRPM files on livna. This is needed if, for example, one is testing a kernel for which there is no pre-made RPM from livna, or if one needs to create RPMs for other distributions, such as Scientific Linux.

Answer: Be careful to define the kernels variable in the rpmbuild command line. The following works.

$ rpmbuild --rebuild nvidia-kmod-100.14.19-18.lvn8.src.rpm --define "kernels $(uname -r)"

That builds a kernel module for the currently running version.
If you have never built rpms before, you will run into some beginner's trouble. You ought to build the RPM as a nonroot user (to protect your system), but the build process will try to use /usr/src/redhat to do its work. That will fail because an ordinary user has not write privileges there. DO NOT give in to the temptation to become root and run the rpm build. That can endanger a working operating system. To avoid that, in your user HOME directory, add a file called .rpmmacros with this line.

%_topdir  /home/your-user-name-here/MyRPMDir

Replace "your-user-name" with your username, of course.  Save that file.

MyRPMDir is just an example, you can create whatever directory name you like, but under that directory name, it is necessary to create a specific set of sub directories.

To create the required directories, run thees commands

$ mkdir -p $HOME/MyRPMDir/RPMS/i686

$ mkdir -p $HOME/MyRPMDir/RPMS/noarch

$ mkdir -p $HOME/MyRPMDir/RPMS/i386

$ mkdir -p $HOME/MyRPMDir/SOURCES

$ mkdir -p $HOME/MyRPMDir/SPECS

$ mkdir -p $HOME/MyRPMDir/SRPMS

$ mkdir -p $HOME/MyRPMDir/BUILD

After that, when you run the rpmbuild command, the work will be done in $HOME/MyRPMDir/BUILD and the resulting RPM will end up under MyRPMDir/RPMS in the appropriate architecture.


If you install the SRPM file with a command like "rpm -ivh nvidia-kmod-100.14.19-18.lvn8.src.rpm", It will drop the files into the relevant subdirectories of MyRPMDir. Under the SPECS directory, one should find "nvidia-kmod.spec". That is the file that controls the RPM build process. The following command will build an RPM of the nvidia proprietary driver, for example, for the SL5 distribution:

$ rpmbuild -ba nvidia-kmod.spec --define "kernels $(uname -r)" --define="dist SL5"

[snip]
Wrote: /home/pauljohn/MyRPMDir/SRPMS/nvidia-kmod-100.14.19-18SL5.src.rpm
Wrote: /home/pauljohn/MyRPMDir/RPMS/x86_64/kmod-nvidia-2.6.18-8.1.15.el5-100.14.19-18SL5.x86_64.rpm Wrote: /home/pauljohn/MyRPMDir/RPMS/x86_64/nvidia-kmod-debuginfo-100.14.19-18SL5.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.22144
+ umask 022
+ cd /home/pauljohn/MyRPMDir/BUILD
+ cd nvidia-kmod-100.14.19
+ rm -rf /var/tmp/nvidia-kmod-100.14.19-18SL5-root-pauljohn
+ exit 0

The dist option in rpmbuild is strictly optional. It simply inserts the label "SL5" into the RPM release version.

If one forgets to define the kernels option, the following bad result happens.

$ rpmbuild -ba nvidia-kmod.spec  --define="dist SL5"
error: Failed build dependencies:
buildsys-build-rpmfusion-kerneldevpkgs-newest-x86_64 is needed by nvidia-kmod-100.14.19-18SL5.x86_64


Caution: it is not generally necessary to install the packages associated with buildsys-build-rpmfusion-

--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://pj.freefaculty.org
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700


reply via email to

[Prev in Thread] Current Thread [Next in Thread]