I do not work much with git and patches and I'm trying to learn, but I am having problems. At the end of this email I found a work-around, but the problem I encountered persists.

I followed your link using Firefox in Windows 7, I clicked on the link "(patch)" to display the patch in its own window. I copied the contents from Firefox into Notepad++ and removed all "CR" leaving just "LF". I then copied the patch into an X-windows session of Emacs running off my Linux server. I'm sharing with you these detail to rule out any issues with Windows format and carriage returns as this seems to be a suggested problem in other instances where people are unable to "git am .." ending up with the same error message. The Emacs session saves the file to /usr/local/src/beagle/angstrom/setup-script/patch2. I then execute the following in my ssh session (PuTTy) to my linux server:

hermes setup-scripts # dos2unix patch2
dos2unix: converting file patch2 to Unix format ...
hermes setup-scripts #git am --abort
Unstaged changes after reset:
M       .gitignore
M       README
M       conf/bblayers.conf
M       conf/local.conf
M       sources/layers.txt
hermes setup-scripts # git am --directory sources/openembedded-core < patch2
Applying: openssl: add deprecated and unmaintained find.pl from perl-5.14 to fix perlpath.pl
fatal: git apply: bad git-diff - expected /dev/null on line 5
Patch failed at 0001 openssl: add deprecated and unmaintained find.pl from perl-5.14 to fix perlpath.pl
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
hermes setup-scripts #

Here are what I believe are the first five lines of the patch:

---
diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.0i/find.pl b/meta/recipes-connectivity/openssl/openssl-1.0.0i/find.pl
new file mode 100644
index 0000000..8e1b42c
--- a/dev/null

confirming that 1) the "a/b" line are on the same line (no inserted line feed), and 2) "--- a/dev/null" appears on what I believe is line 5 of the patch (it's actually line 44 of the file).

What am I missing?

Also, I'm wondering why patching is required here.  According to

http://patches.openembedded.org/patch/29989/

the patch was committed. Was the commit to a later version than what Ångström pulls?

I had another patch (getOpts http://patches.openembedded.org/patch/30719/) I had to apply dealing with a deprecated Perl method, too, and did not have any problems applying that patch, I was able to proceed with the build and became gated at task 2255:

NOTE: Running task 2255 of 3282 (ID: 2207, /usr/local/src/beagle/angstrom/setup-scripts/sources/openembedded-core/meta/recipes-connectivity/openssl/openssl_1.0.0i.bb, do_configure)
NOTE: package openssl-1.0.0i-r0.2: task do_configure: Started
ERROR: Function failed: do_configure (see /usr/local/src/beagle/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/armv7a-angstrom-linux-gnueabi/openssl-1.0.0i-r0.2/temp/log.do_configure.22805 for further information)

To move forward I did the following:
visited http://patches.openembedded.org/patch/29989/
copied the text enclosed by a box under the heading "Patch" into NoteTab++, removed the "CR", pasted into my Linux session as "patch3" and then executed:

hermes setup-scripts # git am --abort
Unstaged changes after reset:
M       .gitignore
M       README
M       conf/bblayers.conf
M       conf/local.conf
M       sources/layers.txt
hermes setup-scripts # git am --directory sources/openembedded-core < patch3
Patch does not have a valid e-mail address.
hermes setup-scripts # git apply --directory sources/openembedded-core < patch3 warning: sources/openembedded-core/meta/recipes-connectivity/openssl/openssl_1.0.0i.bb has type 100755, expected 100644
hermes setup-scripts #

My build started back at an earlier task, however, as I write this email, the build is at 2705 of 3282 which is farther along than where I was blocked at 2255.

John


On 9/4/2012 4:05 AM, Martin Jansa wrote:
On Tue, Sep 04, 2012 at 03:54:14AM -0700, John L. Poole wrote:
Following the instructions at
http://www.angstrom-distribution.org/building-angstrom
I proceeded with the 2nd step:
MACHINE=beagleboard ./oebb.sh bitbake virtual/kernel

where the configuration failed during the openssl phase.
You need this commit
http://git.openembedded.org/openembedded-core/commit/?id=c09bf5d177a7ecd2045ef7e13fff4528137a9775

Here's the error message:

Log data follows:

| ERROR: Function failed: do_configure (see
/usr/local/src/beagle/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/x86_64-linux/openssl-native-1.0.0i-r0.2/temp/log.do_configure.4575
for further information)
| Can't locate find.pl in @INC (@INC contains: ...

The full session and error message are located at:

http://pastebin.com/RqGpTbdQ

Specifically, something is using the old way (using "require") of using
Perl's File::Find module.  Here's
the file:

hermes util # cat perlpath.pl
#!/usr/local/bin/perl
#
# modify the '#!/usr/local/bin/perl'
# line in all scripts that rely on perl.
#

require "find.pl";

$#ARGV == 0 || print STDERR "usage: perlpath newpath  (eg /usr/bin)\n";
&find(".");

sub wanted
          {
          return unless /\.pl$/ || /^[Cc]onfigur/;

          open(IN,"<$_") || die "unable to open $dir/$_:$!\n";
          @a=<IN>;
          close(IN);

          if (-d $ARGV[0]) {
                  $a[0]="#!$ARGV[0]/perl\n";
          }
          else {
                  $a[0]="#!$ARGV[0]\n";
          }

          # Playing it safe...
          $new="$_.new";
          open(OUT,">$new") || die "unable to open $dir/$new:$!\n";
          print OUT @a;
          close(OUT);

          rename($new,$_) || die "unable to rename $dir/$new:$!\n";
          chmod(0755,$_) || die "unable to chmod $dir/$new:$!\n";
          }
hermes util #


what I did to move forward:

replaced: require "find.pl";
with: use File::Find;
replaced: &find(".");
with: &find(\&wanted, ".");

The use of "require find.pl" is a very old construct which I have not
seen for years. I am
the process of building now (task 503 of 911) and hope that
this deprecated use does not manifest itself elsewhere.  I am new to
Angstrom and
therefore do not know where this construct of File::Find is coming from in
the above temporary file.

I did find this which bears directly on the issue:
http://patches.openembedded.org/patch/29989/

I hope this helps.


John

begin:vcard
fn:John L. Poole
n:Poole;John
email;internet:jlpool...@gmail.com
tel;work:707-812-1323
tel;home:707-812-1323
x-mozilla-html:TRUE
version:2.1
end:vcard

_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel


--
Email Rider

John Laurence Poole
P.O. Box 6566
Napa CA 94581-6566
707-812-1323 office


_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel

Reply via email to