Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Making uname lie to Tomcat 5 on a ppc64
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
jgombos
n00b
n00b


Joined: 27 Jul 2004
Posts: 64

PostPosted: Mon Aug 09, 2004 5:09 pm    Post subject: Making uname lie to Tomcat 5 on a ppc64 Reply with quote

I ran into multiple problems trying to get Tomcat installed on a ppc64 architecture, and plan to write a bug report. Any additional feedback would be appreciated.

After doing an emerge tomcat then an emerge search tomcat, everything appears to have gone well, and I get:
Code:
[ Results for search key : tomcat ]
[ Applications found : 1 ]
 
*  net-www/tomcat [ Masked ]
      Latest version available: 5.0.27-r1
      Latest version installed: 5.0.27-r1
      Size of downloaded files: 10,057 kB
      Homepage:    http://jakarta.apache.org/tomcat
      Description: Apache Servlet-2.4/JSP-2.0 Container
      License:     Apache-2.0


But then when I try to invoke startup.sh or /etc/init.d/tomcat start, I get the following output on both attempts:

Code:
Starting Tomcat...
Using CATALINA_BASE:   /opt/tomcat5
Using CATALINA_HOME:   /opt/tomcat5
Using CATALINA_TMPDIR: /opt/tomcat5/temp
Using JAVA_HOME:       /opt/ibm-jdk-bin-1.4.2
Usage: catalina.sh ( commands ... )
commands:
  debug             Start Catalina in a debugger
  debug -security   Debug Catalina with a security manager
  jpda start        Start Catalina under JPDA debugger
  run               Start Catalina in the current window
  run -security     Start in the current window with security manager
  start             Start Catalina in a separate window
  start -security   Start in a separate window with security manager
  stop              Stop Catalina
  stop -force       Stop Catalina (followed by kill -KILL)


It appears that the startup.sh script misuses catalina.sh. But digging deeper, it appears that emerge did not compile the binaries at all. There is no jsvc binary to be found on the system. The $CATALINA_HOME/bin folder contains a tarball that was never unpacked. So I unpacked it manually, and ran autoconf (as per the Tomcat install guide). The results of that were:
Code:
autoconf
autoconf: Undefined macros:
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH
***BUG in Autoconf--please report*** AC_PATH


The discussion forums have recommended running export WANT_AUTOCONF_2_5=1 to resolve this, and it works. Autoconf executes without error after setting that variable. However, the next step is to run ./configure, and that errors as follows:
Code:

./configure
loading cache ./config.cache
*** Current host ***
checking host system type... ./support/config.guess: unable to guess system type

This script, last modified 2001-04-20, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

    ftp://ftp.gnu.org/pub/gnu/config/

If the version you run (./support/config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2001-04-20

uname -m = ppc64
uname -r = 2.6.7-gentoo-r11
uname -s = Linux
uname -v = #1 SMP Wed Aug 4 09:01:07 UTC 2004

/usr/bin/uname -p = PPC970, altivec supported
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              = ppc64
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = ppc64
UNAME_RELEASE = 2.6.7-gentoo-r11
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP Wed Aug 4 09:01:07 UTC 2004
configure: error: can not guess host type; you must specify one


uname -m returns "ppc64," so my suspicion is that the installer cannot yet handle it. I would like know how to make uname lie, and just say that it's a "ppc." I think bruda had to do this with some installs. Is this possible? How do I do it?
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Tue Aug 10, 2004 1:54 pm    Post subject: Reply with quote

How I did it is outlined towards the end of the thread https://forums.gentoo.org/viewtopic.php?t=198684 and is really ugly but it works. I renamed /bin/uname to /bin/uname64. I then created a /bin/uname32 as a shell script (make it executable, of course) containing the following:

Quote:
#!/bin/sh
/bin/uname64 $1 $2 $3 $4 $5 $6 | sed -e s/ppc64/ppc/


Finally, I would symlink /bin/uname to point to /bin/uname32. Once the hack is no longer needed (e.g., tomcat is compiled and installed) the symlink would be changed to point to the real uname (/bin/uname64). Same goes for /bin/arch.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
jgombos
n00b
n00b


Joined: 27 Jul 2004
Posts: 64

PostPosted: Tue Aug 10, 2004 4:01 pm    Post subject: Reply with quote

Thanks bruda.

I first tried to be somewhat clean about it, and edited the Tomcat ./configure script. I was able to manipulate it so that the here-document it builds contains "ppc" for its architecture, but at some point the script does its own uname, and ignores its own here-document.

So I applied your hack and it worked.

I have a (probably working) binary, but this does not resolve the original problem. Running /etc/init.d/tomcat5 start still results in a display of the catalina.sh command syntax.


Last edited by jgombos on Tue Aug 10, 2004 4:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
jgombos
n00b
n00b


Joined: 27 Jul 2004
Posts: 64

PostPosted: Tue Aug 10, 2004 4:06 pm    Post subject: Reply with quote

BTW- For traceability, the bug in this thread is recorded as bug 59899.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum