RFR: 8258925: configure script failed on WSL [v3]

Erik Joelsson erikj at openjdk.java.net
Fri Jan 8 14:17:57 UTC 2021


On Fri, 8 Jan 2021 13:07:02 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Refactoring
>
> Hi Yasumasa,
> 
> Okay I see the problem case now, and the latest fix seems to fix things in a way that makes sense to me now. We still need to wait to see what Magnus or Erik think though.
> 
> Thanks,
> David

I initially wanted to leave this for Magnus to look at since he wrote all of this, and I know he put a lot of effort into fixpath.sh. It's not a simple script. Now I have stared at it for a while, I think I understand the problem.

One very important aspect of fixpath.sh is to not do heavy work unnecessarily. The latest solution unfortunately adds a call to $PATHTOOL when winpath does not contain forbidden characters. This is a pretty common case and will have performance impact.

The problem is that on line 152, if we find the executable by adding .exe, we need to remember this and use it on line 166, but we cannot modify the variable "path" as it's also used in the else block starting on 168. I would propose introducing a new variable "unixpath" before line 151. Add .exe to it before line 152. Then overwrite it on line 162, and finally use it as the source on line 166.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1889



More information about the build-dev mailing list