Unix Technical Forum

patch usb - error

This is a discussion on patch usb - error within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hi, For using my lego mindstorms robotics invention 2.0 on linux(kernel2.6.8) with the usb tower I need to patch ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 06:06 AM
Dirk
 
Posts: n/a
Default patch usb - error

Hi,

For using my lego mindstorms robotics invention 2.0 on linux(kernel2.6.8)
with the usb tower I need to patch brickOS so it can find the usb device.I
found the patch at sourceforge.net. This is what happens :

ganymedes:/usr/lib/brickos#zcat
/home/dirk/patch/legos-0.2.6-linux-usb-fastdl-sched.patch| patch -p0 **(I
tried different numbers here 1,2,3,4,5)**

can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nur legos-0.2.6/Makefile legos-0.2.6-linux-usb/Makefile
|--- legos-0.2.6/Makefile Thu Apr 11 23:42:52 2002
|+++ legos-0.2.6-linux-usb/Makefile Tue Sep 3 00:04:52 2002
--------------------------
File to patch:


What went wrong here?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 06:07 AM
Laurenz Albe
 
Posts: n/a
Default Re: patch usb - error

Dirk <d.bollen@pandora.be> wrote:
> ganymedes:/usr/lib/brickos#zcat
> /home/dirk/patch/legos-0.2.6-linux-usb-fastdl-sched.patch| patch -p0 **(I
> tried different numbers here 1,2,3,4,5)**
>
> can't find file to patch at input line 4
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |diff -Nur legos-0.2.6/Makefile legos-0.2.6-linux-usb/Makefile
> |--- legos-0.2.6/Makefile Thu Apr 11 23:42:52 2002
> |+++ legos-0.2.6-linux-usb/Makefile Tue Sep 3 00:04:52 2002
> --------------------------
> File to patch:


Go directly into the legos-0.2.6 directory on your machine
(so that 'ls Makefile' lists the makefile) and then try with -p1

I also recomment that you use the --dry-run flag first whenever you
patch something important. It will only show you the messages, but not
perform the actual patching. If that works without errors, do it
without --dry-run.

Yours,
Laurenz Albe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 06:07 AM
Dirk
 
Posts: n/a
Default Re: patch usb - error

It seems that I don't have the source installed. So I installed it like this
ganymedes:~# apt-get -b source brickos
After a while I receive the following error:

/usr/bin/make prefix=/usr
make[1]: Entering directory `/root/brickos-0.2.6.10.6'
make[2]: Entering directory `/root/brickos-0.2.6.10.6/util'
cc -o fontdesign fontdesign.c -O2 -Wall -O2 -Wall
fontdesign.c:26:19: stdio.h: No such file or directory
fontdesign.c: In function `show_it':
fontdesign.c:30: warning: implicit declaration of function `printf'
fontdesign.c: In function `main':
fontdesign.c:45: warning: implicit declaration of function `getchar'
make[2]: *** [fontdesign] Error 1
make[2]: Leaving directory `/root/brickos-0.2.6.10.6/util'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/brickos-0.2.6.10.6'
make: *** [build-arch-stamp] Error 2
Build command 'cd brickos-0.2.6.10.6 && dpkg-buildpackage -b -uc' fa
iled.
E: Child process failed

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 06:07 AM
Laurenz Albe
 
Posts: n/a
Default Re: patch usb - error

Dirk <d.bollen@pandora.be> wrote:
> It seems that I don't have the source installed. So I installed it like this
> ganymedes:~# apt-get -b source brickos
> After a while I receive the following error:
>
> /usr/bin/make prefix=/usr

[...]
> fontdesign.c:26:19: stdio.h: No such file or directory


Three things:
- Didn't you want to apply a patch? If you give the -b option the source
is downloaded and compiled in one step.
Please read the APT documentation.
(http://www.debian.org/doc/manuals/ap...ndling.en.html)

- The compile fails because stdio.h is missing on your system.
You need the C library header files. This is probably in a package
you have not installed. Again, read the manual for APT.

- Do you build the code as root user?
If yes, that's an unnecessary risk. You need root for installing
software, but not for building.

Yours,
Laurenz Albe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 06:07 AM
Dirk
 
Posts: n/a
Default Re: patch usb - error

Ok. Installing the source worked fine.
But applying the patch still gives some errors.

dirk@ganymedes:~/lego/brickos-0.2.6.10.6$ zcat
/home/dirk/patch/legos-0.2.6-linux-usb-fastdl-sched.patch|patch -p1
patching file Makefile
Hunk #1 FAILED at 16.
Hunk #2 FAILED at 38.
Hunk #3 FAILED at 58.
3 out of 3 hunks FAILED -- saving rejects to file Makefile.rej
patching file Makefile.common
Hunk #1 FAILED at 74.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.common.rej
The next patch would create the file Makefile,
which already exists! Assume -R? [n]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 06:09 AM
Laurenz Albe
 
Posts: n/a
Default Re: patch usb - error

Dirk <d.bollen@pandora.be> wrote:
> Ok. Installing the source worked fine.
> But applying the patch still gives some errors.
>
> patching file Makefile
> Hunk #1 FAILED at 16.
> Hunk #2 FAILED at 38.
> Hunk #3 FAILED at 58.
> 3 out of 3 hunks FAILED -- saving rejects to file Makefile.rej
> patching file Makefile.common
> Hunk #1 FAILED at 74.
> 1 out of 1 hunk FAILED -- saving rejects to file Makefile.common.rej
> The next patch would create the file Makefile,
> which already exists! Assume -R? [n]


Does the patch fix only makefiles? If yes, then you obviously got the
wrong patch (or the wrong source).
Check the versions, and if you are clueless, ask the person who published
the patch.

If there are some other files that are patched without error, then
maybe you changed the makefiles somehow after unpacking the source, e.g.
by running ./configure or whatever tool come with the software.
Since this is also software specific, ask the author of the patch if
in doubt.

Yours,
Laurenz Albe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 06:13 AM
Jeff Wiegley
 
Posts: n/a
Default Re: patch usb - error

Laurenz Albe <albe@culturallNOSPAM.com> wrote in message news:<cj8i1d$kjr$3@at-vie-newsmaster01.nextra.at>...
> Dirk <d.bollen@pandora.be> wrote:
> > Ok. Installing the source worked fine.
> > But applying the patch still gives some errors.
> >
> > patching file Makefile
> > Hunk #1 FAILED at 16.
> > Hunk #2 FAILED at 38.
> > Hunk #3 FAILED at 58.
> > 3 out of 3 hunks FAILED -- saving rejects to file Makefile.rej
> > patching file Makefile.common
> > Hunk #1 FAILED at 74.
> > 1 out of 1 hunk FAILED -- saving rejects to file Makefile.common.rej
> > The next patch would create the file Makefile,
> > which already exists! Assume -R? [n]

>
> Does the patch fix only makefiles? If yes, then you obviously got the
> wrong patch (or the wrong source).
> Check the versions, and if you are clueless, ask the person who published
> the patch.
>
> If there are some other files that are patched without error, then
> maybe you changed the makefiles somehow after unpacking the source, e.g.
> by running ./configure or whatever tool come with the software.
> Since this is also software specific, ask the author of the patch if
> in doubt.
>
> Yours,
> Laurenz Albe


The original user is not clueless. The people maintaining BrickOS...
well... they basically aren't (IMVHO). I've seen the promise of 1.0.0 for
a very long time with no changes. The USB patch is two *YEARS*
old and does NOT apply to the current BrickOS sources.

I'm having the exact same problems as the original poster. And the
only thing I can think of is that he and I have found the wrong
patch. In which case the developers of whatever the *real* patch
is have hidden it very well.

BrickOS people: *Please* add in the USB support. The lack of that one
feature is what is killing your project the most. Halt everything else
because if you can't download a program to the brick nothing else
matters.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:50 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com