Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: Thecoolgman on August 16, 2009, 05:12:09 AM

Title: [FIXED]Patches seem to not compile with SVN
Post by: Thecoolgman on August 16, 2009, 05:12:09 AM
Fro some reason most the the patches would work with the archives 7zips you guys use to update but now every HUNK in the patch except for the main .c file fails. This even happens with recent patches. Why is this?
Title: Re: Patches seem to not compile with SVN
Post by: bluebrother on August 16, 2009, 06:11:16 AM
Current svn has changes newer than the 7z archive that break your patch?

Sorry, but your question is too vague to give an explicit answer. Maybe you want to refine the question ...
Title: Re: Patches seem to not compile with SVN
Post by: Thecoolgman on August 16, 2009, 06:19:18 AM
Well before the daily build and current build source archives broke most of the patches would not fail when patching, for eg. This viewer patch I have worked completely fine when I used archives, but now every single HUNK fails on it with SVN (And it was updated in June). I also Have an iPod FM patch that was updated a couple days ago and every single HUNK fails. When I compile, it compiles the build and ignores the patches like they're not even there. Why dose it do this?
Title: Re: Patches seem to not compile with SVN
Post by: bluebrother on August 16, 2009, 07:51:29 AM
Building cannot "ignore patches". A patch is a collection of changes to the source code, and you need to apply that before building. When the build runs it has no idea if anything was changed (svn is invoked to figure the revision number of your source tree, and it can also tell if the source tree was modified -- but not why and who modified it) and what changed it -- having a patch applied is basically the same as having modifications in the code you did yourself. If the patch did not apply (for whatever reason) it's not applied. Period.

There's still the possibility that recent changes in svn broke the patches you're talking about. As you (again -- sic) haven't mentioned which patches *exactly* you are talking about there is no way for others to check if that's actually your issue. In general, the 7z archive is identical to svn -- except that svn is newer, and, presuming you checked it out as working copy, does include some special files used by svn. Those special files, however, are not to be modified by the user, and have no impact on applying patches or building.

You may want to refine your question ... (as in: tell us *which* patches you are talking about, *how* did you grab the sources, and *how* did you apply the patches. And of course, *what* is the error message. Oh, and *which* daily build are you talking about?)

May I also point to one of the links in my signature :o ?
Title: Re: Patches seem to not compile with SVN
Post by: BdN3504 on August 16, 2009, 09:21:03 AM
i think there's a good possibility that your patches don't work because the plugin API has changed.

strlcpy is now used for strncpy because it's safer (i.e. won't cause buffer problems) to use IIUC.

i don't know where this is documented, maybe a dev could point us to a wiki article, irc log or mailing list entry.
I
t would be very useful, if you posted the error message you receive (at best you redirect the output you get from patch to a file and post that files contents to pastie, pastebin or some other debugging site. redirect like this: patch -p0 < patch.patch > file.txt (the extension doesn't matter)).
Title: Re: Patches seem to not compile with SVN
Post by: Thecoolgman on August 16, 2009, 03:24:17 PM
i think there's a good possibility that your patches don't work because the plugin API has changed.

strlcpy is now used for strncpy because it's safer (i.e. won't cause buffer problems) to use IIUC.

i don't know where this is documented, maybe a dev could point us to a wiki article, irc log or mailing list entry.
I
t would be very useful, if you posted the error message you receive (at best you redirect the output you get from patch to a file and post that files contents to pastie, pastebin or some other debugging site. redirect like this: patch -p0 < patch.patch > file.txt (the extension doesn't matter)).

You seem to help me I did what you said and the patch seemed to compile fine, then I used "patch -p0 <" instead of "patch --binary -p0 <" which seems to be be why it wasn't patching before.