Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to libLLVM rather than to individual LLVM libs when USE_STATIC_LIBRARIES is off #3989

Merged
merged 1 commit into from
Jan 6, 2019

Conversation

orivej
Copy link
Contributor

@orivej orivej commented Jan 6, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

For changelog. Remove if this is non-significant change.

Category (leave one):

  • Build/Testing/Packaging Improvement

Short description (up to few sentences):

Link to libLLVM rather than to individual LLVM libs when USE_STATIC_LIBRARIES is off.

Detailed description (optional):

The clickhouse program links to LLVM and to the clickhouse library, that also links to LLVM. When the library is shared but LLVM is static, LLVM gets linked into the program twice (once via the library and once directly), which causes this error when running clickhouse:

: CommandLine Error: Option 'x86-use-base-pointer' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

A common LLVM installation provides static component libraries and a shared libLLVM. Linking to libLLVM when libclickhouse is shared solves this issue.

Issue found in NixOS/nixpkgs#53376 (comment)

…IBRARIES is off

The clickhouse program links to LLVM and to the clickhouse library, that also
links to LLVM. When the library is shared but LLVM is static, LLVM gets linked
into the program twice (once via the library and once directly), which causes
this error when running clickhouse:

     : CommandLine Error: Option 'x86-use-base-pointer' registered more than once!
     LLVM ERROR: inconsistency in registered CommandLine options

A common LLVM installation provides static component libraries and a shared
libLLVM. Linking to libLLVM when libclickhouse is shared solves this issue.
@alexey-milovidov alexey-milovidov merged commit 402d775 into ClickHouse:master Jan 6, 2019
@orivej orivej deleted the llvm branch January 6, 2019 16:55
orivej-nixos pushed a commit to r-ryantm/nixpkgs that referenced this pull request Jan 6, 2019
The clickhouse program links to LLVM and to the clickhouse library, that also
links to LLVM. When the library is shared but LLVM is static, LLVM gets linked
into the program twice (once via the library and once directly), which causes
this error when running clickhouse:

     : CommandLine Error: Option 'x86-use-base-pointer' registered more than once!
     LLVM ERROR: inconsistency in registered CommandLine options

A common LLVM installation provides static component libraries and a shared
libLLVM. Linking to libLLVM when libclickhouse is shared solves this issue.

Upstream pull request: ClickHouse/ClickHouse#3989
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants