[erlang-bugs] (unconditional) rebuild caused by gen_git_version

Tuncer Ayaz tuncer.ayaz@REDACTED
Wed Feb 26 19:31:35 CET 2014


On Wed, Feb 19, 2014 at 11:55 AM, Lukas Larsson <lukas@REDACTED> wrote:
> Hello,
>
> When implementing this I noticed it as well and tried to do something about
> it. Alas it proved quite difficult and I had to settle on a compromise where
> it does a rebuild once. i.e.
>
> commit change
> make
> LD
> make
> LD
> make
> make
> make
> make

With GNU Make 4.0, gcc 4.8.2, and binutils 2.24:
# unmodified tree since last build
make
LD
make
LD
make
LD
make
LD
make
LD
make
LD

> At least that is the way it works for me on Ubuntu Linux.
>
> If someone else feels like having a go at making it work they are most
> welcome.
>
> Lukas
>
>
> On 18/02/14 18:53, Tuncer Ayaz wrote:
>>
>> On Tue, Feb 18, 2014 at 1:40 PM, Tuncer Ayaz wrote:
>>>
>>> Since R16 it's not possible anymore to quickly run make in a
>>> previously built and otherwise unmodified tree.
>>>
>>> $ make
>>> # everything built
>>> # run make again
>>> $ make
>>> ...
>>>   GEN    x86_64-unknown-linux-gnu/gen_git_version.mk
>>>   CC     obj/x86_64-unknown-linux-gnu/opt/plain/erl_bif_info.o
>>> ..
>>>   LD     /tmp/otp/master/bin/x86_64-unknown-linux-gnu/beam
>>>
>>> This doesn't take long, but recreating an object file and relinking
>>> the vm every time doesn't seem right to me. AFAICT, it was introduced
>>> to include the git revision of the tree the vm was built from.
>>>
>>> I don't have time to look into this right now, so no patch from me.
>>
>> If anyone wants to submit a fix, presumably adding a check that
>> compares the previous build's git revision for inequality should fix
>> the bug. I assume it's probably already cached in a file.
>> _______________________________________________
>> erlang-bugs mailing list
>> erlang-bugs@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-bugs
>>
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs



More information about the erlang-bugs mailing list