[size=120][color=0000FF][font=Arial]After downloading this file
java-1.6.0-sun-1.6.0.4-1jpp.nosrc.rpm
and installing it, and separately providing this file in the redhat/SOURCES directory:
jdk-6u4-linux-x64.bin <-- came from java.sun.com
I was able build new x86_64 rpms from it, specifically these:
[rlcl@deafeng2 ~]$ ls -al redhat/RPMS/x86_64
total 69452
drwxr-xr-x 2 rlcl rlcl 4096 Feb 15 21:33 .
drwxrwxr-x 3 rlcl rlcl 4096 Feb 15 21:03 ..
-rw-rw-r-- 1 rlcl rlcl 35253361 Feb 15 21:33 java-1.6.0-sun-1.6.0.4-1jpp.x86_64.rpm
-rw-rw-r-- 1 rlcl rlcl 36643 Feb 15 21:33 java-1.6.0-sun-alsa-1.6.0.4-1jpp.x86_64.rpm
-rw-rw-r-- 1 rlcl rlcl 5619576 Feb 15 21:33 java-1.6.0-sun-demo-1.6.0.4-1jpp.x86_64.rpm
-rw-rw-r-- 1 rlcl rlcl 11078580 Feb 15 21:33 java-1.6.0-sun-devel-1.6.0.4-1jpp.x86_64.rpm
-rw-rw-r-- 1 rlcl rlcl 1259715 Feb 15 21:33 java-1.6.0-sun-fonts-1.6.0.4-1jpp.x86_64.rpm
-rw-rw-r-- 1 rlcl rlcl 28422 Feb 15 21:33 java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64.rpm
-rw-rw-r-- 1 rlcl rlcl 17728184 Feb 15 21:33 java-1.6.0-sun-src-1.6.0.4-1jpp.x86_64.rpm
Attempting to install them all results in these rpm errors:[/color]
[color=ff0000]
[root@deafeng2 ~]# rpm -Uvh --test /home/rlcl/redhat/RPMS/x86_64/java-1.6.0-sun-*
error: Failed dependencies:
libXp.so.6()(64bit) is needed by java-1.6.0-sun-1.6.0.4-1jpp.x86_64
/usr/lib64/libodbcinst.so is needed by java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64
libodbcinst.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64
libodbc.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64[/color]
[color=0000ff]
Does anyone know where I can find the missing files? Or is the spec file from Jpackage.org out of date with respect to JDK 1.6, update 4?
Finally, suppose I had installed these files successfully. Would they have installed correctly under the Java alternatives system (since I am not installing a "sun-compat" package with them)?
Thanks
Bob Cochran
Greenbelt, Maryland, USA
[/font][/color][/size]
Rebuilding Sun 1.6.0_04 Using JPackage.org "nosrc" rpm
-
- Posts: 18
- Joined: 2006/09/23 22:30:35
- Contact:
Rebuilding Sun 1.6.0_04 Using JPackage.org "nosrc" rpm
[quote][...]
Attempting to install them all results in these rpm errors:[/color]
[color=ff0000]
[root@deafeng2 ~]# rpm -Uvh --test /home/rlcl/redhat/RPMS/x86_64/java-1.6.0-sun-*
error: Failed dependencies:
libXp.so.6()(64bit) is needed by java-1.6.0-sun-1.6.0.4-1jpp.x86_64
/usr/lib64/libodbcinst.so is needed by java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64
libodbcinst.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64
libodbc.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64[/color]
[color=0000ff]
Does anyone know where I can find the missing files? Or is the spec file from Jpackage.org out of date with respect to JDK 1.6, update 4?[/quote]The spec file is probably fine. You're just missing a few packages on your machine that these packages depend on.
You can have the Yum package manager resolve those dependencies for you by installing the packages using yum:
[code]yum localinstall /home/rlcl/redhat/RPMS/x86_64/java-1.6.0-sun-*[/code]
I'm not sure if [i]yum localinstall[/i] accepts wildcards like that. If not, try
[code]ls /home/rlcl/redhat/RPMS/x86_64/java-1.6.0-sun-* | xargs yum localinstall[/code]
[quote]Finally, suppose I had installed these files successfully. Would they have installed correctly under the Java alternatives system (since I am not installing a "sun-compat" package with them)?[/quote]No idea. Check afterwards using
[code]alternatives --config java[/code] and see if it looks OK.
Attempting to install them all results in these rpm errors:[/color]
[color=ff0000]
[root@deafeng2 ~]# rpm -Uvh --test /home/rlcl/redhat/RPMS/x86_64/java-1.6.0-sun-*
error: Failed dependencies:
libXp.so.6()(64bit) is needed by java-1.6.0-sun-1.6.0.4-1jpp.x86_64
/usr/lib64/libodbcinst.so is needed by java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64
libodbcinst.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64
libodbc.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.4-1jpp.x86_64[/color]
[color=0000ff]
Does anyone know where I can find the missing files? Or is the spec file from Jpackage.org out of date with respect to JDK 1.6, update 4?[/quote]The spec file is probably fine. You're just missing a few packages on your machine that these packages depend on.
You can have the Yum package manager resolve those dependencies for you by installing the packages using yum:
[code]yum localinstall /home/rlcl/redhat/RPMS/x86_64/java-1.6.0-sun-*[/code]
I'm not sure if [i]yum localinstall[/i] accepts wildcards like that. If not, try
[code]ls /home/rlcl/redhat/RPMS/x86_64/java-1.6.0-sun-* | xargs yum localinstall[/code]
[quote]Finally, suppose I had installed these files successfully. Would they have installed correctly under the Java alternatives system (since I am not installing a "sun-compat" package with them)?[/quote]No idea. Check afterwards using
[code]alternatives --config java[/code] and see if it looks OK.
-
- Posts: 6
- Joined: 2007/09/05 16:54:42
- Location: Boulder, CO
- Contact:
Re: Rebuilding Sun 1.6.0_04 Using JPackage.org "nosrc" rpm
Same issue still exist even with the later versions of Java, currently building the same with Java 1.60 u11 and getting the same errors with the java-jdbc package.
I followed the instructions on how to build the RPM packages from http://wiki.centos.org/HowTos/JavaOnCentOS#head-42e9afa9c99251820007bc780c3fe72bca6eae5c
When attempting to install the java-1.6.0-sun-jdbc-1.6.0.11-1jpp.x86_64.rpm package the following error is given during install:
error: Failed dependencies:
libodbcinst.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.11-1jpp.x86_64
libodbc.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.11-1jpp.x86_64
Yet a quick check for these files shows that they are there. These files are part of unixODBC and are installed in both x86 and x86_64 on my system. (files exsist in both /usr/lib and /usr/lib64)
Anyone know how to fix this? Haven't found a clear solution as of yet.
I followed the instructions on how to build the RPM packages from http://wiki.centos.org/HowTos/JavaOnCentOS#head-42e9afa9c99251820007bc780c3fe72bca6eae5c
When attempting to install the java-1.6.0-sun-jdbc-1.6.0.11-1jpp.x86_64.rpm package the following error is given during install:
error: Failed dependencies:
libodbcinst.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.11-1jpp.x86_64
libodbc.so()(64bit) is needed by java-1.6.0-sun-jdbc-1.6.0.11-1jpp.x86_64
Yet a quick check for these files shows that they are there. These files are part of unixODBC and are installed in both x86 and x86_64 on my system. (files exsist in both /usr/lib and /usr/lib64)
Anyone know how to fix this? Haven't found a clear solution as of yet.
Re: Rebuilding Sun 1.6.0_04 Using JPackage.org "nosrc" rpm
[b][u]Option 1 - the quick fix[/u][/b]
First, manually install the [i]unixODBC[/i] and [i]unixODBC-devel[/i] packages.:
[code]$ yum install unixODBC unixODBC-devel[/code]
Next, Install the JDBC package using [i][b]--nodeps[/b][/i] parameter with rpm:
[code]rpm -ivh --nodeps java-1.6.0-sun-jdbc-1.6.0.11-1jpp.x86_64.rpm[/code]
[b][u]Option 2 - "fix" the problem[/u][/b]
To stop the dependency problem you'll have to alter the SPEC file that's used when building the RPM packages.
In order to do so, you'll first have to install the source RPM into your own RPM build tree (Which should be at ~/rpmbuild). As your normal user (ie not root):
[code]rpm -ivh java-1.6.0-sun-1.6.0.10-1jpp.nosrc.rpm[/code]
Next, edit the file [b]~/rpmbuild/SPECS/java-1.6.0-sun.spec[/b] in your favourite text editor. Scroll down to the part that says:
[code]%package jdbc
Summary: JDBC/ODBC bridge driver for %{name}
Group: Development/Libraries/Java
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: %{_libdir}/libodbc.so, %{_libdir}/libodbcinst.so
[/code]We'll add a directive there that will stop the auto-generation of "requires" info for the jdbc subpackage:
[code]%package jdbc
Summary: JDBC/ODBC bridge driver for %{name}
Group: Development/Libraries/Java
[b][color=55BB00]AutoReqProv: no[/color][/b]
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: %{_libdir}/libodbc.so, %{_libdir}/libodbcinst.so[/code]Now rebuild the JDK fileset again:
[code]rpmbuild -bb ~/rpmbuild/SPECS/java-1.6.0-sun.spec[/code]Once that's done, you'll have a JDBC package that can be installed without the missing dependencies.
First, manually install the [i]unixODBC[/i] and [i]unixODBC-devel[/i] packages.:
[code]$ yum install unixODBC unixODBC-devel[/code]
Next, Install the JDBC package using [i][b]--nodeps[/b][/i] parameter with rpm:
[code]rpm -ivh --nodeps java-1.6.0-sun-jdbc-1.6.0.11-1jpp.x86_64.rpm[/code]
[b][u]Option 2 - "fix" the problem[/u][/b]
To stop the dependency problem you'll have to alter the SPEC file that's used when building the RPM packages.
In order to do so, you'll first have to install the source RPM into your own RPM build tree (Which should be at ~/rpmbuild). As your normal user (ie not root):
[code]rpm -ivh java-1.6.0-sun-1.6.0.10-1jpp.nosrc.rpm[/code]
Next, edit the file [b]~/rpmbuild/SPECS/java-1.6.0-sun.spec[/b] in your favourite text editor. Scroll down to the part that says:
[code]%package jdbc
Summary: JDBC/ODBC bridge driver for %{name}
Group: Development/Libraries/Java
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: %{_libdir}/libodbc.so, %{_libdir}/libodbcinst.so
[/code]We'll add a directive there that will stop the auto-generation of "requires" info for the jdbc subpackage:
[code]%package jdbc
Summary: JDBC/ODBC bridge driver for %{name}
Group: Development/Libraries/Java
[b][color=55BB00]AutoReqProv: no[/color][/b]
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: %{_libdir}/libodbc.so, %{_libdir}/libodbcinst.so[/code]Now rebuild the JDK fileset again:
[code]rpmbuild -bb ~/rpmbuild/SPECS/java-1.6.0-sun.spec[/code]Once that's done, you'll have a JDBC package that can be installed without the missing dependencies.
Re: Rebuilding Sun 1.6.0_04 Using JPackage.org "nosrc" rpm
Excellent solution!
I cobbled together a more complicated one based on other posts; basically, you change the way that the RPMs look for the ODBC driver - here's a link, although I would certainly go with either of the solutions mentioned above in preference to the one that I describe: http://tinyurl.com/b5b37d
Thanks!
Ben Chapman
I cobbled together a more complicated one based on other posts; basically, you change the way that the RPMs look for the ODBC driver - here's a link, although I would certainly go with either of the solutions mentioned above in preference to the one that I describe: http://tinyurl.com/b5b37d
Thanks!
Ben Chapman
Re: Rebuilding Sun 1.6.0_04 Using JPackage.org "nosrc" rpm
Will setting the AutoReqProv to "no" in the spec file make it so the jdk can't find the odbc stuff when it actually needs it when running the jdk later? I'm trying to decide if I should just change the AutoReqProv or if I need to do the more complex spec file change described elsewhere.
The more complex spec file change says to add the following (as well as some other things I don't list here):
[code]# Kludge to remove bogus odbc dependencies
cat <<EOF >%{our_find_requires}
#!/bin/sh
echo unixODBC
exec %{__find_requires} | /bin/egrep -v ^(libodbc(inst)?\.so)$
exit 0
EOF
chmod +x %{our_find_requires}
%define __find_requires %{our_find_requires}[/code]
I am using the 1.6.0.14 spec file from the jpackage no src rpm and this is what is in that spec file under %prep:
[code]%prep
rm -rf $RPM_BUILD_DIR/%{toplevel_dir}
export MORE=10000
sh %{SOURCE0} <<EOF >/dev/null
yes
EOF
%setup -T -D -n %{toplevel_dir}
chmod -R go=u-w *
chmod -R u+w *[/code]
So I am not sure if I need to replace some of that code or just add it after the last line of this %prep section. Has anyone done this before?
The more complex spec file change says to add the following (as well as some other things I don't list here):
[code]# Kludge to remove bogus odbc dependencies
cat <<EOF >%{our_find_requires}
#!/bin/sh
echo unixODBC
exec %{__find_requires} | /bin/egrep -v ^(libodbc(inst)?\.so)$
exit 0
EOF
chmod +x %{our_find_requires}
%define __find_requires %{our_find_requires}[/code]
I am using the 1.6.0.14 spec file from the jpackage no src rpm and this is what is in that spec file under %prep:
[code]%prep
rm -rf $RPM_BUILD_DIR/%{toplevel_dir}
export MORE=10000
sh %{SOURCE0} <<EOF >/dev/null
yes
EOF
%setup -T -D -n %{toplevel_dir}
chmod -R go=u-w *
chmod -R u+w *[/code]
So I am not sure if I need to replace some of that code or just add it after the last line of this %prep section. Has anyone done this before?