Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 05-07-2007, 09:52 PM   #1
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400

Rep: Reputation: 30
Wrote spec file, installed RPM, binary gives relocation error and refers to build dir

I finally decided to get around to learning how to properly build an RPM. The RPM builds and puts everything where I want it to put things, but I get an error after I install it and run the app. The spec file and error are below.

Name: armagetronad
Release: 1.fc6
Summary: 3D Tron lightcycle game
Group: Amusement/Games
License: GPL

Source: %{name}-%{version}.src.tar.bz2
Patch0: armagetronad-
Buildroot: %{_tmproot}/%{name}-%{version}-root
BuildRequires: libstdc++-devel, zlib-devel, libpng-devel, libjpeg-devel
BuildRequires: SDL_image-devel, SDL_mixer-devel, SDL-devel, libxml2-devel
BuildRequires: libXt-devel, mesa-libGLU-devel

A 3D Tron lightcycle game with an advanced AI and network play.

%patch0 -p1 -b .uninstall

./configure \
    --enable-music \
    --disable-sysinstall \
    --disable-uninstall \
%{__install} -D -p -m 0644 desktop/%{name}.desktop \
%{__install} -D -p -m 0644 desktop/icons/large/%{name}.png \
%{__mv} %{buildroot}/%{_datadir}/doc/%{name} \

%defattr(-, root, root)
%config /etc/%{name}/*
%doc %{_datadir}/doc/%{name}-%{version}/*


the error:
$ armagetronad 
Error: Error in tString GeneratePrefix() in tools/tDirectories.cpp:1332 : 
        Relocation error. The binary was supposed to be installed into /home/hollywoodb/rpmbuild/BUILD/armagetronad- and found itself in /usr/bin and could not find out what this means for the prefix /usr/local.
Old 05-18-2007, 08:15 AM   #2
LQ Newbie
Registered: Feb 2006
Posts: 9

Rep: Reputation: 0
Maybe I missed it, but I didn't see where you installed the binary under %makeinstall. Try adding:

%{__install} -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
under %makeinstall and see if that helps. You might have to tweak a thing or two in the example above, though, as I don't have the source to check it out.
Old 05-19-2007, 10:27 AM   #3
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400

Original Poster
Rep: Reputation: 30
Yeah, the issue was my misunderstanding of how %install and %makeinstall differ.

I've got it working now, the spec file is at


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
RPM Spec file adddy Linux - Software 8 11-07-2006 05:02 AM
RPM relocation error ertmann|CPH Fedora 3 11-20-2003 12:25 PM
where to get a recent spec file to build rpms for kde3.1.4? mmodem Mandriva 0 11-15-2003 09:09 PM
rpm error only says"rpm: relocation error: rpm: undefined symbol: poptAliasOptions" dlrsims Linux - Newbie 2 11-14-2003 09:22 PM
RPM relocation error smaisnie Linux - Software 2 08-29-2003 01:31 PM

All times are GMT -5. The time now is 05:08 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration