[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: Evan Hanson
Subject: Re: [Chicken-users] Duplicate symbol errors with functors and -static flag
Date: Wed, 21 Nov 2018 12:59:38 +1300

Hi Antoine,

The issue here is the "./" prefix on $(SCHEME_OBJECTS). Your project
works fine with just the following change:

    < 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,


P.S. Thank you for the very high-quality reproduction.

reply via email to

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