LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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

Closed Thread
 
Search this Thread
Old 12-22-2010, 08:33 PM   #1
gosssamer
Member
 
Registered: Dec 2010
Posts: 41

Rep: Reputation: 0
Building RPM stops with "sort: Bad file descriptor"


Hi,

I've been struggling with this problem for almost a week now. I've posted this to linux-server forum, but no response. This is a more involved explanation.

I have an FC13 x86_64 server with all updates and having trouble building RPMs, but I am not sure it's specifically an RPM problem. I think it's a tty management or file I/O or other type of problem.

When spec files have a "%files -f filelist.txt", which contains the list of files for the RPM, it calls the /usr/lib/check-files script, which sorts the files that are supposed to be in the RPM and compares them with the files that are in the built RPM before they are packaged. At least I believe that is what happens.

Here is the actual code from the script that fails:

Code:
FILES_DISK=`mktemp $TMPDIR/rpmXXXXXX`
FILES_RPM=`mktemp $TMPDIR/rpmXXXXXX`

find $RPM_BUILD_ROOT -type f -o -type l | LC_ALL=C sort > $FILES_DISK
LC_ALL=C sort > $FILES_RPM
The trouble is that the sort fails. Here's the trace from the check-files script:

Code:
+ find /root/rpmbuild/BUILDROOT/sed-4.2.1-5.fc13.x86_64 -type f -o -type l
+ LC_ALL=C
+ sort
+ LC_ALL=C
+ sort
sort: stat failed: -: Bad file descriptor
+ diff -d /tmp/rpmv4Db1s /tmp/rpmPdDsKU
The first sort succeeds because it reads data sent by the "find" in the same shell. The second sort fails because (I think) it cannot read data from stdin for some reason.

What could possibly cause this? I've checked various permissions, libraries, even used strace extensively, all of which is inconclusive.

This is one of my test server boxes, so this problem is something that I've caused, but I have no idea what.

I also replaced sort with cat and just tried to redirect stdin in that file to a temporary file, and that also fails. It must not be receiving the data it expects.

I've tried running it with selinux disabled and that has no effect.

Ideas greatly appreciated.
Thanks,
Alex
 
Old 12-22-2010, 08:39 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Hi gosssamer,

Whatever additional information you have added to this thread, that is not in your original thread on this issue, should have been added to that other thread. This would now be considered double-posting or cross-posting the same thread in two locations.

Please click the "report" button on this thread or the other thread, and ask one of us (moderators) to either close one of the threads, or merge the two together.

Thanks & kind regards,

Sasha
 
Old 12-23-2010, 12:06 AM   #3
gosssamer
Member
 
Registered: Dec 2010
Posts: 41

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GrapefruiTgirl View Post
Hi gosssamer,

Whatever additional information you have added to this thread, that is not in your original thread on this issue, should have been added to that other thread. This would now be considered double-posting or cross-posting the same thread in two locations.

Please click the "report" button on this thread or the other thread, and ask one of us (moderators) to either close one of the threads, or merge the two together.

Thanks & kind regards,

Sasha
Okay, thanks, I've done that. This is the thread that I would appreciate people focus their efforts on to help me. Thanks, Alex
 
Old 12-23-2010, 12:17 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
Sorry, no -- you have on topic answers there.

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate/rewrite of:
http://www.linuxquestions.org/questi...errors-851488/

In reply to your report: By now you have seen the on-going resposes in the surviving thread. Good Luck w/ getting the answer you're looking for.

Last edited by archtoad6; 12-24-2010 at 02:32 PM.
 
  


Closed Thread


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
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 01:19 AM
File Descriptor does not become "ready" for read after select() Winnie Wilson Linux - Newbie 0 02-03-2009 10:59 AM
rmmod results in "bad file descriptor" wpbgent Linux - Newbie 1 07-29-2008 09:57 AM
help : the file descriptor was blocked in "select()" ..... makelinux Programming 1 06-09-2008 01:41 PM
Redhat crash - boot directory empty "dub2 bad descriptor" errors jjohnston62 Red Hat 3 11-14-2003 05:08 PM


All times are GMT -5. The time now is 07:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration