On Mon, Jul 01, 2002 at 10:38:01AM +0200, K.J....@kpn.com wrote:
The message below just showed up on Freshports. Could someone elaborate on
why the build process gets confused?
Add a pre-build target to check for a setting of WRKDIRPREFIX which
result in the InvokerGen.java target failing. The bootstrapping Linux
JDK will confuse itself if WRKDIRPREFIX also exists in /compat/linux
as a symbolic link to the directory in the standard FreeBSD hierarchy.
Much appreciated sleuth work by: dillon
26 Jun 2002 - glewis
I'll attempt to explain this, although Matt Dillon was the one who did
all the detective work. Basically, the Linux JDK is trying to absolutely
resolve the path of the file and the symlinks confuse it. This is partly
due to how emulation works.
To give a concrete example. If there is a file in /usr/tmp that its
trying to compile and /compat/linux/usr/tmp is a symbolic link to
/usr/tmp it will basically get into a loop like this:
-> Emulation layer checks in /compat/linux first, finds /usr/tmp there.
-> Resolve /compat/linux/usr/tmp.
-> /compat/linux/usr/tmp is a symbolic link to /usr/tmp.
-> Back to top of loop.
Matt has a nice truss trace that shows the syscalls happening for this
instance. Eventually the JDK gives up and errors.
Let me know if that isn't clear and I'll ask Matt if I can forward the
explanation he sent to me.
The commit was to try and stop this happening at least some of the time
(its not perfect, but should catch the common cases).