Skip to content

Creating compilation DB does not work with nested libraries #289

@rstub

Description

@rstub

I have tried to enable creating the compilation DB for swephR. After

pkgload:::use_compilation_db()
devtools::load_all()

I get the message

Warning message:
Expected same number of compilation commands as object files
ℹ This is an internal error that was detected in the pkgload package.
  Please report it at https://github.com/r-lib/pkgload/issues with a reprex and the full backtrace.

To me it looks like pkgload only finds the source files in src but not those in src/libswe which are build via src/Makevars:

all: $(SHLIB)
$(SHLIB): libswe.a

LIBSWE = libswe/swedate.o libswe/swehouse.o libswe/swejpl.o libswe/swemmoon.o \
	 libswe/swemplan.o libswe/sweph.o \
	 libswe/swephlib.o libswe/swecl.o libswe/swehel.o
libswe.a: $(LIBSWE)
	$(AR) rcs libswe.a $(LIBSWE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions