Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-6968

Out-of-tree (VPATH) builds from sources

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 6.0.0alpha3
    • Installation (I)
    • None
    • OpenBSD 7.0 (snapshot of -current)

      With the current autotools setup, out-of-tree builds are not possible due to the global include directory not being part of VPATH, not being populated in the build tree and being passed as a hardcoded relative path.

      I'm not sure if this was ever considered to be used, but it would definitely be nice, as I tend to build from source using different configurations (for supporting various database backends, different component configurations and similar).

      Steps to reproduce:

      1. Bootstrap the autotools (./bootstrap.sh)
      2. Create a build directory (mkdir build-opt && cd $_)
      3. Configure the build system to your liking (../configure CFLAGS='-O3 -fomit-frame-pointer' --enable-agent)
      4. Build the project (gmake)

      Result:
      The build system assumes that it's configured in the root of the source tree, so the include path to the global header directory passed to -I is incorrect. The above example creates a build tree as a subdirectory of the source tree, but the issue is more notable when having the build tree elsewhere, say, under /tmp. I've attached a log as an example.

      Expected:
      I would expect out-of-tree builds to just work.

            Unassigned Unassigned
            jxl Juris
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: