a.out left in root directory when configuring --with-toolchain-type=clang
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Tue Apr 3 19:43:31 UTC 2018
On 2018-04-03 19:55, Martin Buchholz wrote:
> It's some kind of weird race.
Weird. I can't help you out here, since I cannot reproduce.
I can tell you what I did to find the strange a.out file for solaris --
I opened one terminal with a "while true; do ls -l a.out; done", and one
running configure, and then I pressed ctrl-c on configure as soon as the
a.out appeared. I checked the output, and that gave me an end limit on
where the file appeared from. Then I started breaking the script in
various places just ahead of that (by inserting "exit 1" in suitable
places), and bisected to find the problematic line.
If you have a race and it's not fully reproducible, maybe it's not so
easy for you.
If this is a recent regression, maybe the problems lies in the same
place, that is, in the new TOOLCHAIN_EXTRACT_LD_VERSION function?
/Magnus
>
> $ rm -f a.out; bash configure --with-toolchain-type=clang
> --with-toolchain-path=/usr/lib/llvm-3.9/bin >&/dev/null; ls -l a.out;
> file a.out
> bash configure --with-toolchain-type=clang >&/dev/null 5.04s user
> 3.81s system 94% cpu 9.323 total
> -rw-r--r-- 1 martin martin 568 Apr 3 10:32 a.out
> a.out: data
>
> but then I run it again
>
> $ rm -f a.out; bash configure --with-toolchain-type=clang
> --with-toolchain-path=/usr/lib/llvm-3.9/bin >&/dev/null; ls -l a.out;
> file a.out
> bash configure --with-toolchain-type=clang >&/dev/null 5.30s user
> 2.72s system 92% cpu 8.625 total
> ls: cannot access 'a.out': No such file or directory
> a.out: cannot open `a.out' (No such file or directory)
>
> (on my personal Ubuntu machine)
>
> $ readelf -ld a.out
> readelf: Error: Not an ELF file - it has the wrong magic bytes at the
> start
>
> What is this crazy phantom file?
>
> $ hd a.out
> 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> |................|
> *
> 00000040 06 00 00 00 05 00 00 00 40 00 00 00 00 00 00 00
> |........ at .......|
> 00000050 40 00 40 00 00 00 00 00 40 00 40 00 00 00 00 00
> |@. at .....@. at .....|
> 00000060 f8 01 00 00 00 00 00 00 f8 01 00 00 00 00 00 00
> |................|
> 00000070 08 00 00 00 00 00 00 00 03 00 00 00 04 00 00 00
> |................|
> 00000080 38 02 00 00 00 00 00 00 38 02 40 00 00 00 00 00
> |8.......8. at .....|
> 00000090 38 02 40 00 00 00 00 00 1c 00 00 00 00 00 00 00
> |8. at .............|
> 000000a0 1c 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
> |................|
> 000000b0 01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00
> |................|
> 000000c0 00 00 40 00 00 00 00 00 00 00 40 00 00 00 00 00
> |.. at .......@.....|
> 000000d0 44 06 00 00 00 00 00 00 44 06 00 00 00 00 00 00
> |D.......D.......|
> 000000e0 00 00 20 00 00 00 00 00 01 00 00 00 06 00 00 00 |..
> .............|
> 000000f0 10 0e 00 00 00 00 00 00 10 0e 60 00 00 00 00 00
> |..........`.....|
> 00000100 10 0e 60 00 00 00 00 00 20 02 00 00 00 00 00 00 |..`.....
> .......|
> 00000110 28 02 00 00 00 00 00 00 00 00 20 00 00 00 00 00 |(.........
> .....|
> 00000120 02 00 00 00 06 00 00 00 28 0e 00 00 00 00 00 00
> |........(.......|
> 00000130 28 0e 60 00 00 00 00 00 28 0e 60 00 00 00 00 00
> |(.`.....(.`.....|
> 00000140 d0 01 00 00 00 00 00 00 d0 01 00 00 00 00 00 00
> |................|
> 00000150 08 00 00 00 00 00 00 00 04 00 00 00 04 00 00 00
> |................|
> 00000160 54 02 00 00 00 00 00 00 54 02 40 00 00 00 00 00
> |T.......T. at .....|
> 00000170 54 02 40 00 00 00 00 00 20 00 00 00 00 00 00 00 |T. at .....
> .......|
> 00000180 20 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 |
> ...............|
> 00000190 50 e5 74 64 04 00 00 00 44 05 00 00 00 00 00 00
> |P.td....D.......|
> 000001a0 44 05 40 00 00 00 00 00 44 05 40 00 00 00 00 00
> |D. at .....D.@.....|
> 000001b0 2c 00 00 00 00 00 00 00 2c 00 00 00 00 00 00 00
> |,.......,.......|
> 000001c0 04 00 00 00 00 00 00 00 51 e5 74 64 06 00 00 00
> |........Q.td....|
> 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> |................|
> *
> 000001f0 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00
> |................|
> 00000200 52 e5 74 64 04 00 00 00 10 0e 00 00 00 00 00 00
> |R.td............|
> 00000210 10 0e 60 00 00 00 00 00 10 0e 60 00 00 00 00 00
> |..`.......`.....|
> 00000220 f0 01 00 00 00 00 00 00 f0 01 00 00 00 00 00 00
> |................|
> 00000230 01 00 00 00 00 00 00 00 |........|
> 00000238
>
> On Tue, Apr 3, 2018 at 6:44 AM, Magnus Ihse Bursie
> <magnus.ihse.bursie at oracle.com <mailto:magnus.ihse.bursie at oracle.com>>
> wrote:
>
> Actually, the clang issue is different. The fix for JDK-8200267 is
> solstudio only.
>
> Martin: I cannot reproduce the behaviour with "bash configure
> --with-toolchain-type=clang
> --with-toolchain-path=/usr/lib/llvm-3.9/bin". No a.out file for
> me. Is this repeatable? Are you sure you didn't accidentally hit
> ctrl-c at some point?
>
> /Magnus
>
>
> On 2018-03-27 22:11, Erik Joelsson wrote:
>
> https://bugs.openjdk.java.net/browse/JDK-8200267
> <https://bugs.openjdk.java.net/browse/JDK-8200267>
>
>
> On 2018-03-27 12:35, Martin Buchholz wrote:
>
> I notice that running bash ./configure ... leaves an a.out
> file in the root
> directory of the jdk, but only after adding configure flags
>
> --with-toolchain-type=clang
> --with-toolchain-path=/usr/lib/llvm-3.9/bin
>
> (i.e. not when building with default gcc)
>
> Probably there's a test compilation whose output does not
> go into the
> build/ directory, and whose output is not cleaned up.
>
>
>
>
More information about the build-dev
mailing list