a.out left in root directory when configuring --with-toolchain-type=clang

Martin Buchholz martinrb at google.com
Tue Apr 3 17:55:30 UTC 2018


It's some kind of weird race.

 $ 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.@
.....|
00000090  38 02 40 00 00 00 00 00  1c 00 00 00 00 00 00 00  |8.@
.............|
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.@
.....|
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> 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
>>
>>
>> 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