LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-06-2011, 01:38 AM   #1
alexzander1211
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Rep: Reputation: Disabled
rpmbuild error --- Symlink points to BuildRoot:


hi all,
i am trying to create rpm for bzip2,
in building i am getting following error message. also i am building as non-root user.

{{{
+ rm -rf /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzcmp
+ ln -s -f /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzdiff /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzcmp
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
Processing files: bzip2-1.0.6-6.i386
error: Symlink points to BuildRoot: /usr/local/bin/bzcmp -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzdiff
error: Symlink points to BuildRoot: /usr/local/bin/bzegrep -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzgrep
error: Symlink points to BuildRoot: /usr/local/bin/bzfgrep -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzgrep
error: Symlink points to BuildRoot: /usr/local/bin/bzless -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzmore


RPM build errors:
Symlink points to BuildRoot: /usr/local/bin/bzcmp -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzdiff
Symlink points to BuildRoot: /usr/local/bin/bzegrep -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzgrep
Symlink points to BuildRoot: /usr/local/bin/bzfgrep -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzgrep
Symlink points to BuildRoot: /usr/local/bin/bzless -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzmore

}}}

It seams it is creating sybilic links in BUILDROOT.
I have seen similar threads before.But i am still not getting how to solve this problem. perhaps i need to a add some changes to install section of my spec file.
install section sample of my bzip2.spec file is as follows
{{{
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr/local

%clean

}}}
any help will be usefull
 
Old 11-06-2011, 04:54 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Theres hard links and symbolic links but I've never heard of sibyllic links... And unless you're certain you only need to change details best post your complete .spec file, more efficient. Anyway, %_buildroot (the "BuildRoot:" directive in your .spec file) shouldn't be in %_builddir but set to something like "%{_tmppath}/%{name}-%{version}" (if %_topdir defaults to /home/rpmuser/rpmbuild then %_builddir is set to %{_topdir}/BUILD and %_tmppath may be %{_topdir}/tmp or /var/tmp or whatever else you want to configure in your ~/.rpmmacros file). Then you should be able to 'make DESTDIR=$RPM_BUILD_ROOT install' as proposed.
 
Old 11-06-2011, 06:25 AM   #3
alexzander1211
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
hi ,
my .rpmmacros file contains
%_topdir /home/rpmuser/rpmbuild
%_tmppath /home/rpmuser/rpmbuild/tmp

and my complete spec file is
{{{
Name:bzip2
Version:1.0.6
Release:6
Summary:bzip2

Group:compressing
License:GPL
URL: http://sources.redhat.com/bzip2/
Source0:bzip2-1.0.6.tar.gz
BuildRoot: %{_tmppath}/ %{name}-root


#BuildRequires:
#Requires:

%description
start compressing

%prep
%setup -q


%build
make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr/local

%clean

rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc
/usr/local/bin/bunzip2
/usr/local/bin/bzcat
/usr/local/bin/bzcmp
/usr/local/bin/bzdiff
/usr/local/bin/bzegrep
/usr/local/bin/bzfgrep
/usr/local/bin/bzgrep
/usr/local/bin/bzip2
/usr/local/bin/bzip2recover
/usr/local/bin/bzless
/usr/local/bin/bzmore
/usr/local/include/bzlib.h
/usr/local/lib/libbz2.a
/usr/local/man/man1/bzcmp.1
/usr/local/man/man1/bzdiff.1
/usr/local/man/man1/bzegrep.1
/usr/local/man/man1/bzfgrep.1
/usr/local/man/man1/bzgrep.1
/usr/local/man/man1/bzip2.1
/usr/local/man/man1/bzless.1
/usr/local/man/man1/bzmore.1

%changelog
}}}

by still getting that Symlink points to BuildRoot error. what i need to change in spec file ?
 
Old 11-06-2011, 08:05 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by alexzander1211 View Post
by still getting that Symlink points to BuildRoot error. what i need to change in spec file ?
First, if you read BUILD/bzip2-1.0.6/README it tells you to use PREFIX and not DESTDIR. Second, the 'ln -s -f' part in the Makefile does not allow modification (which it should) as you do not want leading paths. I don't know how Red Hat accomplished this but I tried it the simple way. Maybe inform Julian Seward? Then your .spec file is also utterly incomplete, contains wrong information and does not adhere to ANY standard. Working with such a crippled .spec file causes all kinds of easily avoidable errors making the build process unnecessarily harder. Please read the RPM package builders documentation. Finally think twice if you're going to install this package on a host that gets updates from RHN as this is not SOP.

That said, find attached a 'diff -urN' with the .spec file you posted with comments and fix for the %install part and an example of how a .spec file could look like.

HTH
Attached Files
File Type: txt bzip2_alexzander1211.diff.txt (1.5 KB, 98 views)
File Type: txt bzip2.spec.txt (7.3 KB, 149 views)

Last edited by unSpawn; 11-06-2011 at 08:06 AM.
 
1 members found this post helpful.
  


Reply



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
glib error from buildroot sunr2007 Linux - Embedded & Single-board computer 3 04-30-2010 12:19 AM
Buildroot Error sunr2007 Linux - Embedded & Single-board computer 0 01-06-2010 12:21 AM
RTNETlink error! buildroot or kernel configuration? thelonesquirrely Linux - Embedded & Single-board computer 0 12-09-2009 05:19 PM
Buildroot m4 package make error parag_opensrc Linux - Embedded & Single-board computer 0 09-19-2009 01:43 AM
Maxtor Onetouch II: symlink points to wrong target Robert S Linux - Hardware 2 12-23-2007 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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