Re: Fix order of -I and -L flags

Subject: Re: Fix order of -I and -L flags

Date: Fri, 17 Dec 2021 09:45:22 -0400

To: Ryan Schmidt, notmuch@notmuchmail.org

Cc:

From: David Bremner


Ryan Schmidt <notmuch@ryandesign.com> writes:

> The notmuch build system puts -I and -L flags in the wrong order.
>
> Specifically, -I flags the user might specify in the CPPFLAGS
> environment variable appear before the -I flags for the project's own
> directories, resulting in build failure if a previous version of
> notmuch (whose headers differ sufficiently from the new version) was
> already installed.
>
> https://trac.macports.org/ticket/63274
>
> Similarly, -L flags the user might specify in the LDFLAGS environment
> variable appear before the -L flags for the project's own directories,
> resulting in build failure if a previous version of notmuch (whose
> libraries differ sufficiently from the new version) was already
> installed.
>
> https://trac.macports.org/ticket/63665

Although I don't consider GNU standards normative for notmuch, there is
some value in doing things a standard way. In particular the way notmuch
uses {C,CPP,LD,CXX}FLAGS follows e.g. [1].

I guess on the Linux / BSD side we expect the configure script to do the
heavy lifting so that manual setting of CPPFLAGS / LDFLAGS at build time
is not needed in general. So one question is why isn't this the case for
macports?

I think there is value in letting individual end-users use these
variables to override things (we just saw a case the other day where
that fixed someone's unique build problem). 

I'm open to ideas for how we can make things easier for macports without
taking away existing functionality for other users.

d

[1]: https://www.gnu.org/prep/standards/html_node/Command-Variables.html.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: