Skip to content

[libsupc++] file INSTALL cannot find "[...]/include/c++build/bits/c++config.h". #38493

Closed
@llvmbot

Description

@llvmbot
Bugzilla Link 39145
Resolution FIXED
Resolved on Dec 04, 2018 16:16
Version 7.0
OS Linux
Blocks #38454
Reporter LLVM Bugzilla Contributor
CC @mclow,@petrhosek,@tstellar
Fixed by commit(s) r343753 r348322

Extended Description

It seems that libcxx-7 introduces a regression in building against libsupc++. The resulting build fails to install with the following error:

CMake Error at cmake_install.cmake:40 (file):
file INSTALL cannot find
"/var/tmp/portage/sys-libs/libcxx-7.0.0/work/libcxx-7.0.0.src-.arm/include/c++build/bits/c++config.h".

It seems that the file is created in wrong directory with 'bits/bits' instead of just 'bits':

[3/46] cd /var/tmp/portage/sys-libs/libcxx-7.0.0/work/libcxx-7.0.0.src-.arm && /usr/bin/cmake -E copy_if_different /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/7.3.0/include/g++-v7/armv7a-unknown-linux-gnueabihf/bits/c++config.h /var/tmp/portage/sys-libs/libcxx-7.0.0/work/libcxx-7.0.0.src-.arm/include/c++build/bits/bits/c++config.h

A quick bisect uncovers that the issue was introduced by the following commit:

commit f48515b28b423e5387399524a7aef53c51810f59
Author: Petr Hosek phosek@chromium.org
Date: Tue Jun 12 03:10:02 2018 +0000

Reland "Use custom command and target to install libc++ headers"

Using file(COPY FILE...) has several downsides. Since the file command
is only executed at configuration time, any changes to headers made
after the initial CMake execution are ignored. This can lead to subtle
errors since the just built Clang will be using stale libc++ headers.
Furthermore, since the headers are copied prior to executing the build
system, this may hide missing dependencies on libc++ from other LLVM
components.

This changes replaces the use of file(COPY FILE...) command with a
custom command and target which addresses all aforementioned issues and
matches the implementation already used by other LLVM components that
also install headers like Clang builtin headers.

Differential Revision: https://reviews.llvm.org/D44773

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334468 91177308-0d34-0410-b5e6-96231b3b80d8

Original report: https://bugs.gentoo.org/667174

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillalibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions