Skip to content

Build housekeeping: vendored Boost on the Rtools path, stale src/CMakeLists.txt #637

Done

Description

@krlmlr

Two small build inconsistencies on main, neither of which breaks a build today.

Rtools branch of src/Makevars.win does not use the vendored Boost

The rwinlib branch passes -Ivendor, the Rtools branch (added in #486) does not:

ifneq ($(findstring ldap32,$(PKG_LIBS)),)
$(info using $(PKG_CONFIG_NAME) from Rtools)
PKG_CPPFLAGS := $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_NAME)) $(EXTRA_CFLAGS)
else
RWINLIB = ../windows/libpq
PKG_CPPFLAGS = -I$(RWINLIB)/include -Ivendor $(EXTRA_CFLAGS)

The sources include Boost headers (e.g. <boost/shared_ptr.hpp> in src/DbColumn.h), and DESCRIPTION has no LinkingTo: BH, so the vendored copy in src/vendor/boost (1.81) is meant to be the only source. On the Rtools path it is not on the include path at all; the build succeeds only because Rtools ships its own Boost. CRAN's r-release-windows-x86_64 install log for 1.4.10 shows "using libpq from Rtools" and compile lines with -ID:/rtools45/x86_64-w64-mingw32.static.posix/include and no -Ivendor. So the Windows binaries are built against whatever Boost Rtools carries, unlike every other platform, and a toolchain without Boost would fail to compile.

src/CMakeLists.txt lists a deleted file

logging.cpp

logging.cpp was removed with plogr in #545 (991d198), but the file generated by cynkrathis::use_cmakelists() was not regenerated. The file is only used for IDE support (it is in .Rbuildignore), where CMake would stop at the missing source.

Not included

The ^cleanup$ line in .Rbuildignore without a cleanup script is already addressed by #585, which adds the script and drops that line.

To do

  • Add -Ivendor to the Rtools branch's PKG_CPPFLAGS in src/Makevars.win (or move it into EXTRA_CFLAGS).
  • Regenerate src/CMakeLists.txt with cynkrathis::use_cmakelists().

Severity: low (proposed, Kirill may change).

Activity

  1. added a commit that references this issue on Nov 29, 2026
    f764ba1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions