Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Compressed file ends unexpectedly, While compiling
« previous next »
  • Print
Pages: [1]

Author Topic: Compressed file ends unexpectedly, While compiling  (Read 10934 times)

Offline psgarcha92

  • Member
  • *
  • Posts: 36
Compressed file ends unexpectedly, While compiling
« on: May 02, 2011, 03:58:24 PM »
Hey Guys
have just started my trials to compile RockBox with patches.
i have Ubuntu 11.04 setup on my laptop with an internet connection.
Now the problem is, i compile it, and am building it for Sansa fuze,
at the point i enter the "e", i get this
ROCKBOXDEV: extracting binutils-2.20.1.tar.bz2
bzip2: Compressed file ends unexpectedly;
   perhaps it is corrupted?  *Possible* reason follows.
bzip2: Inappropriate ioctl for device
   Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child returned status 2
tar: Error is not recoverable: exiting now

Whats going wrong?
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: Compressed file ends unexpectedly, While compiling
« Reply #1 on: May 02, 2011, 04:58:04 PM »
Probably a bad download, as the output says :) Remove the temporary files rockboxdrv.sh creates and try again.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline psgarcha92

  • Member
  • *
  • Posts: 36
Re: Compressed file ends unexpectedly, While compiling
« Reply #2 on: May 02, 2011, 05:32:34 PM »
Where are the temporary files exactly?
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Compressed file ends unexpectedly, While compiling
« Reply #3 on: May 02, 2011, 07:38:15 PM »
Quote from: psgarcha92 on May 02, 2011, 05:32:34 PM
Where are the temporary files exactly?

You will need to remove the directory /tmp/rbdev-dl/, if I remember correctly it's not good enough to delete the contents of rbdev-dl as I believe rockboxdev.sh complains if it encounters it present at all.


[St.]
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline psgarcha92

  • Member
  • *
  • Posts: 36
Re: Compressed file ends unexpectedly, While compiling
« Reply #4 on: May 03, 2011, 02:55:19 AM »
Hey
i am encountering a new problem now,
i have the source, downloaded using the command
"svn co svn://svn.rockbox.org/rockbox/trunk rockbox"
and then, "sudo apt-get install build-essential libc6-dev texinfo libgmp3-dev libmpfr-dev"
now, i guess before compiling is the point where i have to apply the patches, which in my case is the usb patch for sansa fuze.
so i put the patch files ending in .diff into the source directory /rockbox
and when i try to patch the sorce as follows, i get

prabhdeepsingh@ubuntu:~$ cd rockbox
prabhdeepsingh@ubuntu:~/rockbox$ sudo patch --binary -p0 < enable.diff
[sudo] password for prabhdeepsingh:
patching file b/firmware/export/config/sansaclipplus.h
Hunk #1 FAILED at 179.
1 out of 1 hunk FAILED -- saving rejects to file b/firmware/export/config/sansaclipplus.h.rej
patching file b/firmware/export/config/sansafuzev2.h
Hunk #1 FAILED at 193.
1 out of 1 hunk FAILED -- saving rejects to file b/firmware/export/config/sansafuzev2.h.rej



from what i get, i think that there is no directory and file that the patch specifies, which is backed by the fact that there is no actual a/firmware.... directory in the source folder.
what am i doing wrong guys?
Logged

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: Compressed file ends unexpectedly, While compiling
« Reply #5 on: May 03, 2011, 07:22:21 AM »
that i probably a git patch, they usually come with these paths beginning with a and b, use -p1 for the patch command to strip these.
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: Compressed file ends unexpectedly, While compiling
« Reply #6 on: May 03, 2011, 12:25:16 PM »
Quote from: psgarcha92 on May 03, 2011, 02:55:19 AM
prabhdeepsingh@ubuntu:~/rockbox$ sudo patch --binary -p0 < enable.diff

1. don't use sudo for applying patches. sudo is only needed for operations that require super user priviledges. Installing packages via the systems package manager needs that, building Rockbox at no point does.
2. You usually don't need --binary when applying patched. It doesn't hurt though.

Quote
patching file b/firmware/export/config/sansaclipplus.h
Hunk #1 FAILED at 179.
1 out of 1 hunk FAILED -- saving rejects to file b/firmware/export/config/sansaclipplus.h.rej
patching file b/firmware/export/config/sansafuzev2.h

The patch doesn't apply anymore. This can happen when the original file has been changed in the meanwhile and the changes made in that file conflict with the changes the patch would do. You need to apply the changes by hand.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline psgarcha92

  • Member
  • *
  • Posts: 36
Re: Compressed file ends unexpectedly, While compiling
« Reply #7 on: May 03, 2011, 05:30:00 PM »
guys, are these patches to be applied before compiling?
i mean, i go to terminal, type in cd rockbox/tools
then chmod +x rockboxdev.sh, and then i run ./rockboxdev.sh
select e, press enter and it starts to do all the downloading and compiling, i guess.
the patch can't be applied after this process right?

but in my case why are the patches not being installed/written?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Compressed file ends unexpectedly, While compiling
« Reply #8 on: May 03, 2011, 05:34:58 PM »
Quote from: psgarcha92 on May 03, 2011, 05:30:00 PM
guys, are these patches to be applied before compiling?
i mean, i go to terminal, type in cd rockbox/tools
then chmod +x rockboxdev.sh, and then i run ./rockboxdev.sh
select e, press enter and it starts to do all the downloading and compiling, i guess.
the patch can't be applied after this process right?

I think you're confusing a couple things here.  rockboxdev.sh compiles gcc.  If you want to patch gcc, then yes you'd have to patch the gcc source code before compiling it, but then you can't compile a patched gcc with rockboxdev.sh anyway (at least not without editing it quite a lot).

If you want to patch rockbox (which is what it sounds like you're doing), then you need to apply the patch before compiling rockbox.  It doesn't matter if you apply the patch before building gcc, but usually people install gcc first since you can't actually do much of anything without it.  

Quote from: psgarcha92 on May 03, 2011, 05:30:00 PM
but in my case why are the patches not being installed/written?

As bluebrother said, your patch is no good.  You'll have to manually apply its changes.  

Edit:  Have you seen this?  http://www.rockbox.org/wiki/DevelopmentGuide

Particularly the parts about settings up the dev tools and how to use patch would probably help you understand what you're doing.
« Last Edit: May 03, 2011, 05:42:09 PM by saratoga »
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Compressed file ends unexpectedly, While compiling
« Reply #9 on: May 03, 2011, 05:42:00 PM »
Er, as nls said, the patch is a git-style patch which needs to be applied with -p1
It may *also* be out of date and not apply, but -p0 will definately not work.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Compressed file ends unexpectedly, While compiling
« Reply #10 on: May 03, 2011, 05:47:56 PM »
Quote from: torne on May 03, 2011, 05:42:00 PM
Er, as nls said, the patch is a git-style patch which needs to be applied with -p1
It may *also* be out of date and not apply, but -p0 will definately not work.

If you try a git patch with p0, it'll give you a "can't find file to patch at input line .." message since the paths are wrong.  I assumed that he actually used p1 if he managed to get it to give him a rejects file (meaning it found a file to patch) and just typed it wrong into the forums window.   
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Compressed file ends unexpectedly, While compiling
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.104 seconds with 14 queries.