pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

llvm with pkgsrc libexecinfo



Hi,

I'm using pkgsrc on Linux with musl libc, and since musl does not
provide libexecinfo, I am using the one from pkgsrc.

However, there seems to be a problem building llvm with pkgsrc
libexecinfo. llvm uses cmake as its build system and cmake depends on
libexecinfo. llvm will use libexecinfo if it is available, but it does
not use the libexecinfo buildlink3.mk and there does not appear to be
any cmake variable to force it on or off.

So, on a system using libexecinfo from pkgsrc, when building llvm,
cmake will detect libexecinfo presence in /usr/pkg, then fail to build
since libexecinfo is not added to BUILDLINK_DIR:

In file included from
/src/pkgsrc/lang/llvm/work/llvm-10.0.1.src/lib/Support/Unix/Unix.h:21,
                 from
/src/pkgsrc/lang/llvm/work/llvm-10.0.1.src/lib/Support/Unix/Signals.inc:35,
                 from
/src/pkgsrc/lang/llvm/work/llvm-10.0.1.src/lib/Support/Signals.cpp:220:
/src/pkgsrc/lang/llvm/work/build/include/llvm/Config/config.h:22:26:
fatal error: execinfo.h: No such file or directory
   22 | #define BACKTRACE_HEADER <execinfo.h>
      |                          ^
compilation terminated.
*** Error code 1

I've been able to work around this problem by adding

	.include "../../devel/libexecinfo/buildlink3.mk"

to lang/llvm/Makefile. Is this the right solution or is there some way
to prevent cmake from detecting the pkgsrc libexecinfo?


Home | Main Index | Thread Index | Old Index