4paradigm / 4paradigm/OpenMLDB

build: swig and contrib/rapidjson

Aperta
#3,863 0 commenti 0 reazioni 1 assegnatario Rivendicata da @vagetablechicken Vedi su GitHub
build
Lingua principale
C++
Stelle
1.7k
Fork
331
Merge medio
12g 12h
PR unite (30g)
1

Descrizione

we set swig dir before find swig package, the var `SWIG_DIR` will be set by find cmake, no need to set here, and we have already set .deps/usr/ to be find path.
- [ ] may failed on hybridsql, but it can be find without swig_dir in centos6?

```
-- Adding contrib module rapidjson (configuring with rapidjson)
CMake Deprecation Warning at contrib/rapidjson/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
-- why trigger again?
-- CMAKE_PREFIX_PATH: /root/OpenMLDB/.deps/usr
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- MAC_TABLET_ENABLE: ON
-- hw test /root/OpenMLDB/.deps/usr/share/swig/4.0.1
-- Found Protobuf Libraries: /root/OpenMLDB/.deps/usr/lib/libprotobuf.a;-lpthread
-- Adding contrib module simdjson (configuring with simdjson)
CMake Error at contrib/simdjson/CMakeLists.txt:1 (add_library):
add_library cannot create target "_simdjson" because another target with
the same name already exists. The existing target is a static library
created in source directory "/root/OpenMLDB/contrib/simdjson". See
documentation for policy CMP0002 for more details.

-- Adding contrib module rapidjson (configuring with rapidjson)
CMake Deprecation Warning at contrib/rapidjson/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Error at contrib/rapidjson/doc/CMakeLists.txt:21 (add_custom_target):
add_custom_target cannot create target "doc" because another target with
the same name already exists. The existing target is a custom target
created in source directory "/root/OpenMLDB/contrib/rapidjson/doc". See
documentation for policy CMP0002 for more details.
```
contrib projects are not robust, rerun cmake may got dup targets. The cmake log shows it re-run after rapidjson module, so I make rapidjson thinner, don't build test or doc in it. Then cmake will be fine.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

The issue is about CMake configuration problems with the swig directory and duplicate targets in contrib/rapidjson and contrib/simdjson. Look at the CMakeLists.txt files in the contrib/ directory, especially rapidjson and simdjson. The goal is to modify the rapidjson CMake configuration to avoid building tests and docs, and ensure targets are not duplicated on reruns. Run cmake from the project root to reproduce the errors and verify the fix.

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
40/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.