Skip to content

Fix INTERFACE_COMPILE_DEFINITIONS for IMPORTED targets#15828

Merged
alexey-milovidov merged 2 commits intoClickHouse:masterfrom
azat:unbundled-INTERFACE_COMPILE_DEFINITIONS
Oct 11, 2020
Merged

Fix INTERFACE_COMPILE_DEFINITIONS for IMPORTED targets#15828
alexey-milovidov merged 2 commits intoClickHouse:masterfrom
azat:unbundled-INTERFACE_COMPILE_DEFINITIONS

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Oct 10, 2020

INTERFACE_COMPILE_DEFINITIONS does not work IMPORTED targets:

From 3.6:

Specify compile definitions to use when compiling a given <target>.
The named <target> must have been created by a command such as
add_executable() or add_library() and must not be an Imported Target.

Since 3.11:

Specify compile definitions to use when compiling a given <target>.
The named <target> must have been created by a command such as
add_executable() or add_library() and must not be an ALIAS target.

And this causes the -Wundef warning:

src/Functions/FunctionsHashing.h:1326:5: warning: 'USE_XXHASH' is not defined, evaluates to 0 [-Wundef]

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)
Details

HEAD:

  • 7ee01a62c6700dc5b075635a1160472278135793 ( with INTERFACE GLOBAL error)

@robot-clickhouse robot-clickhouse added pr-not-for-changelog This PR should not be mentioned in the changelog submodule changed At least one submodule changed in this PR. labels Oct 10, 2020
INTERFACE_COMPILE_DEFINITIONS does not work IMPORTED targets:

From 3.6:

    Specify compile definitions to use when compiling a given <target>.
    The named <target> must have been created by a command such as
    add_executable() or add_library() and must not be an Imported Target.

Since 3.11:

    Specify compile definitions to use when compiling a given <target>.
    The named <target> must have been created by a command such as
    add_executable() or add_library() and must not be an ALIAS target.

And this causes the -Wundef warning:
    src/Functions/FunctionsHashing.h:1326:5: warning: 'USE_XXHASH' is not defined, evaluates to 0 [-Wundef]
@azat azat force-pushed the unbundled-INTERFACE_COMPILE_DEFINITIONS branch from 7ee01a6 to 35335f0 Compare October 11, 2020 06:06
@azat
Copy link
Copy Markdown
Member Author

azat commented Oct 11, 2020

ClickHouse build check — 15/16 builds are OK

Actually unbundled jemalloc cannot be used, since it includes jemalloc_cpp.o that contains new/delete overrides, so as clickhouse:

2020-10-11 06:52:23 ld.lld: error: duplicate symbol: operator delete(void*, unsigned long)
2020-10-11 06:52:23 >>> defined at new_delete.cpp:147 (../src/Common/new_delete.cpp:147)
2020-10-11 06:52:23 >>>            new_delete.cpp.o:(operator delete(void*, unsigned long)) in archive src/libclickhouse_new_delete.a
2020-10-11 06:52:23 >>> defined at jemalloc_cpp.o:(.text+0x160) in archive /usr/lib/x86_64-linux-gnu/libjemalloc.a

unbundled jemalloc cannot be used, since it includes jemalloc_cpp.o that
contains new/delete overrides, so as clickhouse [1]:

    ld.lld: error: duplicate symbol: operator delete(void*, unsigned long)
    >>> defined at new_delete.cpp:147 (../src/Common/new_delete.cpp:147)
    >>>            new_delete.cpp.o:(operator delete(void*, unsigned long)) in archive src/libclickhouse_new_delete.a
    >>> defined at jemalloc_cpp.o:(.text+0x160) in archive /usr/lib/x86_64-linux-gnu/libjemalloc.a

  [1]: https://clickhouse-builds.s3.yandex.net/15828/35335f07dbf8cab89b4188a674b033c28409dc7b/clickhouse_build_check/build_log_793952627_1602401325.txt
@alexey-milovidov alexey-milovidov self-assigned this Oct 11, 2020
@alexey-milovidov alexey-milovidov merged commit 5570022 into ClickHouse:master Oct 11, 2020
@azat azat deleted the unbundled-INTERFACE_COMPILE_DEFINITIONS branch October 11, 2020 18:49
azat added a commit to azat/ClickHouse that referenced this pull request Aug 18, 2021
a) MALLOC_LIBARIRIES had been removed in
   528e42b ("Improve jemalloc contrib")
b) after JEMALLOC_LIBRARIES left, that had been removed in
   c160b25 ("Drop support for unbundled jemalloc") in ClickHouse#15828
azat added a commit to azat/ClickHouse that referenced this pull request Dec 22, 2021
Since after ClickHouse#15828 unbundled jemalloc support had been removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants