[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Duplicate symbol errors with functors and -static fl

From: Antoine Luciani
Subject: Re: [Chicken-users] Duplicate symbol errors with functors and -static flag
Date: Tue, 20 Nov 2018 21:04:22 -0500

On Nov 20, 2018, at 6:59 PM, Evan Hanson <address@hidden> wrote:
> Hi Antoine,
> The issue here is the "./" prefix on $(SCHEME_OBJECTS). Your project
> works fine with just the following change:
>    3c3
>    < SOURCE_PREFIX = ./
>    ---
> CHICKEN uses a naive string comparison to deduplicate object files, so "./a.o"
> and "a.o" are considered to be distinct. The first of these files you provide
> explicitly in the Make rule for "test" (which is fine), while the second of
> them comes from CHICKEN's dependency resolution (as a prerequisite of the
> functor instantiation, b-foo). Because the two differ as strings, they are not
> deduplicated, both are passed to clang, and you get a linking error.
> We may want to improve on this in the future by normalising filenames or
> comparing them as paths, but for right now that is the cause and what you can
> do to solve it.
> All the best,
> Evan
> P.S. Thank you for the very high-quality reproduction.

Thanks for the fast and exhaustive answer. Your fix works for me. I can
easily rearrange my workflow and stop relying on this SOURCE_PREFIX


reply via email to

[Prev in Thread] Current Thread [Next in Thread]