4paradigm / 4paradigm/OpenMLDB

build: choose the libraries shipped in third-party (by default) or the system libraries

Aperta
#1,277 6 commenti 0 reazioni 2 assegnatari Rivendicata da @aceforeverd Vedi su GitHub
bug build enhancement
Lingua principale
C++
Stelle
1.7k
Fork
331
Merge medio
12g 12h
PR unite (30g)
1

Descrizione

If users compile in its own physical machines rather than the provided docker environment, there may be some linking issues.

## Expected Behavior
use the static libraries located in `.deps/usr/` first, then system dynamic libraries

## Current Behavior
If the system has already installed some libraries, it will link these libraries from system locations rather than the static libraries in the project-specific locations (i.e., `.deps/usr`).

e.g., brpc protobuf glog gflags unwind ssl crypto leveldb z snappy and others

## Possible Solution

use `find_library` or `find_package` to look for the libraries in the project library location (`.deps/usr`) first, then other system locations.

## Steps to Reproduce

1. if the system has already installed the dependent libraries which do not meet the requirements of OpenMLDB, the complication will fail.

## Context (Environment)

custom os environment (not provided docker environment)

## Detailed Description

## Possible Implementation

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

The issue is about CMake linking order for libraries like brpc, protobuf, glog, etc. Look at the CMakeLists.txt files to see how find_library or find_package is currently used. The goal is to modify the CMake configuration to prioritize static libraries in .deps/usr/ over system libraries. Test by building in a custom OS environment without the provided Docker setup to verify linking works correctly.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cmake, cpp
Ambito
build-system
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.