Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

ERROR! Packages failed to build. #58

Closed
fuho opened this issue Sep 12, 2012 · 18 comments
Closed

ERROR! Packages failed to build. #58

fuho opened this issue Sep 12, 2012 · 18 comments

Comments

@fuho
Copy link

fuho commented Sep 12, 2012

Output from script:

oab-java.sh v0.2.5 - Create a local 'apt' repository for Sun Java 6 and/or Oracle Java 7 packages.

Copyright (c) Martin Wimpress, http://flexion.org. MIT License

By running this script to download Java you acknowledge that you have
read and accepted the terms of the Oracle end user license agreement.

If you want to see what this is script is doing while it is running then execute
the following from another shell:

tail -f /home/omero/oab-java6/oab-java.sh.log

[x] Installing Java build requirements success
[x] Making build directories success
[x] Removing clones of https://github.com/rraptorr/sun-java6 success
[x] Cloning https://github.com/rraptorr/sun-java6 success
[x] Checking out v6.35-1 success
[x] Getting Java SE download page success
[x] Getting current release download page success
[x] Getting previous releases download page success
[x] Downloading jdk-6u35-linux-i586.bin : success
[x] Symlinking jdk-6u35-linux-i586.bin success
[x] Downloading jdk-6u35-linux-x64.bin : success
[x] Symlinking jdk-6u35-linux-x64.bin success
[x] Getting Java Cryptography Extension download page success
[x] Downloading jce_policy-6.zip : 8.89 KB success
[x] Symlinking jce_policy-6.zip success
[x] Updating the changelog success
[x] Building the packages success
ERROR! Packages failed to build.

This is the last part of the log (the one with error):

Build information

TOP = usr/lib/jvm
VENDOR = sun
RELEASE = 6
PRODUCT = java6
basename = sun-java6
version = 6
releng_ver = 35
unpackdir = jdk1.6.0_35
srcdir = x64-jdk
all_archs = i586 x64
arch = x64
archdir = amd64
bin_pattern = jdk-6u35-linux-%.bin

rm -rf jdk1.6.0_35
binsize=$(wc -c jdk-6u35-linux-i586.bin | awk '{print $1}');
zipstart=$(unzip -ql jdk-6u35-linux-i586.bin 2>&1 >/dev/null | sed -n -e 's/.* ([0-9][0-9]) extra bytes./\1/p');
tail -c $(expr $binsize - $zipstart) jdk-6u35-linux-i586.bin > tmp-jdk.zip
expr: syntax error
tail: jdk-6u35-linux-i586.bin: invalid number of bytes
make: *** [unpack-i586-stamp] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2
��13917's retcode: 2
success

Running on fresh install of Ubuntu 11.04 64b server. Any idea what is going on?

@sbrattla
Copy link

I got the same error. Here is what I did.

  1. According to https://github.com/rraptorr/sun-java6/issues/8, you need to "manually" download the i586.bin and x64.bin files (JDK) files. In my case, these files were jdk-6u35-linux-i586.bin and jdk-6u35-linux-x64.bin. Copy these files to /var/local/oab/pkg
  2. Run ./oab-java.sh. The reason you get the error is that the files you just downloaded couldn't be downloaded (for some reason). For me, things now worked very well.

@fuho
Copy link
Author

fuho commented Sep 13, 2012

Thanks! I will try that as soon as I can. For now I installed it manually. The downloading part is the biggest pain imho, you have to locate them, login/create account, then sftp them to your server :(, the rest is pretty easy.

@kyeongsoo
Copy link

sbrattla,

What is your operating system? Mine is 64-bit Ubuntu 12.04.

I solved the downloading issues with some tweaking, but failed in building the packages as mentioned in issue #56.

@sbrattla
Copy link

@kyeongsoo : my operating system is 64bit Ubuntu 12.04 (Rackspace Cloud Server).

@sbrattla
Copy link

@fuho : yes, I agree it's a pain...it would be great if it was automatic (which after all is what the oab-java package is all about). However, as a workaround it's not that hard to do (once you've figured it out). No need to log in on sun, just go to http://www.oracle.com/technetwork/java/javase/downloads/jdk6u35-downloads-1836443.html to get the packages.

@kyeongsoo
Copy link

@sbrattla : Many thanks for the response. BTW it's strange because I cannot build packages even though I am using the same operating system as you.

@fuho
Copy link
Author

fuho commented Sep 13, 2012

Thanks for info @sbrattla, that link is definitely useful. I clicked myself all the way to downloads from Oracle.com and they made me sign up. Thanks cthulhu for 10minutemail.com ;)

Oh, could this be helpful to you?

wget -O - -o /dev/null http://www.oracle.com/technetwork/java/javase/downloads/jdk6u35-downloads-1836443.html | egrep -o "download\.oracle[^\"]+"

But I guess the problem is finding the link, not grepping it...

@sbrattla
Copy link

@kyeongsoo : weird...don't really know what that could be besides from maybe permissions? Try running it as root and see what happens?

@sbrattla
Copy link

@fuho : thanks!

@fuho
Copy link
Author

fuho commented Sep 14, 2012

@sbrattla I am back at the beginning :(
I have now downloaded the packages manually, and then uploaded them to '/var/local/oab/pkg' the script now fails with:

[x] Downloading jdk-6u35-linux-i586.bin :    http://: Invalid host name.                        11
669's retcode: 1
failed

How did you get the script to not check for the files online?

@wilki2021
Copy link

For those having trouble with the download step, change line 278 of oab-java6.sh to:
DOWNLOAD_INDEX=grep -P -o "/technetwork/java/javase/downloads/jdk${JAVA_VER}u${JAVA_UPD}-downloads-\d+\.html" /tmp/oab-index.html | uniq

There is an extraneous '-' character in the download path in the committed version.

@fuho
Copy link
Author

fuho commented Sep 14, 2012

Mine looks like this (after git clone)

DOWNLOAD_INDEX=`grep -P -o "/technetwork/java/javase/downloads/jdk${JAVA_VER}-downloads-\d+\.html" /tmp/oab-index.html | uniq`

And it's on line 443

@fuho
Copy link
Author

fuho commented Sep 14, 2012

But addidng "u${JAVA_UPD}" seems to have done the job, thanks.

Now the script gets stuck here:

root@dallas:~# oab-java6/oab-java.sh
oab-java.sh v0.2.5 - Create a local 'apt' repository for Sun Java 6 and/or Oracle Java 7 packages.

Copyright (c) Martin Wimpress, http://flexion.org. MIT License

By running this script to download Java you acknowledge that you have
read and accepted the terms of the Oracle end user license agreement.

* http://www.oracle.com/technetwork/java/javase/terms/license/

If you want to see what this is script is doing while it is running then execute
the following from another shell:

  tail -f /root/oab-java.sh.log

 [x] Installing Java build requirements success
 [x] Making build directories success
 [x] Removing clones of https://github.com/rraptorr/sun-java6 success
 [x] Cloning https://github.com/rraptorr/sun-java6 success
 [x] Checking out v6.35-1 success
 [x] Getting Java SE download page success
 [x] Getting current release download page success
 [x] Downloading jdk-6u35-linux-i586.bin : 68.43 MB success
 [x] Symlinking jdk-6u35-linux-i586.bin success
 [x] Downloading jdk-6u35-linux-x64.bin : 68.7 MB success
 [x] Symlinking jdk-6u35-linux-x64.bin success
 [x] Getting Java Cryptography Extension download page success
 [x] Downloading jce_policy-6.zip : 8.89 KB success
 [x] Symlinking jce_policy-6.zip success
 [x] Updating the changelog success
 [x] Building the packages success
 [x] Moving the packages success
 [x] Creating Packages.gz file success
 [x] Creating Release file success
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45.
Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44.
 [x] Create GnuPG configuration success
 [x] Start generating entropy failed
 [i] Showing the last 5 lines from the logfile (/root/oab-java.sh.log)...
 [x] Create GnuPG configuration success
Stopping Hardware RNG entropy gatherer daemon: (not running).
 [x] Start generating entropy   can't open /dev/random: Operation not permitted                                   17487's retcode: 10
failed
root@dallas:~#

@fuho fuho closed this as completed Sep 14, 2012
@fuho fuho reopened this Sep 14, 2012
@wilki2021
Copy link

Yeah - sorry. Just realized I was on an older version of oab-java6. You have the right line number and fix.

@fuho
Copy link
Author

fuho commented Sep 14, 2012

Don't be, I didn't mean to correct you :) I just wanted to be sure I am looking at the right line, thanks for help. Now I got a step further, looking into the other errors now, so far I have no clue what to do. But this probably isn't a problem with "oab-java6".

@fuho
Copy link
Author

fuho commented Sep 14, 2012

Srsly, fu*ck Oracle. Installing Java shouldn't be this difficuilt....

@sbrattla
Copy link

I didn't really correct anything in the oab-java. I see that you are all referring to the file 'oab-java6.sh'. Is that what it is called? The one I've been using is 'oab-java.sh'. Just to make sure we are all on the same page.

@fuho
Copy link
Author

fuho commented Sep 14, 2012

oab-java6 is the project name/dir name

oab-java.sh is the script name.

BTW I had to remove the check for amivirt because it is causing trouble.
And how are you supposed to install java when it's compiled and packaged? I just went to the dir and dpkg -i all i wanted. Is there better way? Because I haven't found any new repos on my system.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants