-
Notifications
You must be signed in to change notification settings - Fork 91
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
Please sanitize the build system #69
Comments
Hi hasselmm, Thanks for reporting an issue. |
Hi wisk, sorry for late reply - lost focus on this, sorry. Good to hear that building without Hunter shall be possible, it's just that your instructions in README.rst seem to trigger a Hunter build, even if all dependencies are available. Well, have a closer look why this is happening. |
I'll leave this here for now, feel free to delete this post. -- [download 100% complete] |
I'm running into this issue when attempting to compile Medusa. Show libraries installed, clone and prepare build:
I try to build without Hunter. First hurdle:
Graphic output is not so important to me, so I define
I have a FindSQLIte3.cmake in my disk from another project (Minetest), so I copy it to <medusa>/cmake and SQLite3 is detected. Next hurdle: SOCI.
Indeed. SOCI.cmake is not there. Setting At this point, I give up, search the issue tracker, find this issue, and post this report. Is it possible to fix the build system so that a fresh clone compiles without Hunter? A comment above mentions that LLVM is a bit different. If LLVM is a requisite to compile Medusa, could the specific LLVM used be included as a submodule? I see that the only submodule is https://github.com/wisk/samples currently, so I didn't bother to fetch it. My aim is to reverse-engineer Z80 code. I'm currently using dz80 with .ctl files, but that's not very practical, and I wanted to give Medusa a go. |
Also ran into this problem, made progress thanks to the previous comment. diff --git a/src/compil/llvm/CMakeLists.txt b/src/compil/llvm/CMakeLists.txt
index 7582f1a..369254f 100644
--- a/src/compil/llvm/CMakeLists.txt
+++ b/src/compil/llvm/CMakeLists.txt
@@ -10,20 +10,11 @@ set(SRC
# TODO(KS): Probably not the optimal solution, but it works, so who cares?
set(MEDUSA_LLVM_LIBS all)
-if (UNIX AND NOT LLVM_ROOT)
- message(WARNING "Please, define LLVM_ROOT to compile compil_llvm")
-endif()
-
-if (MSVC AND (NOT LLVM_ROOT_DEBUG OR NOT LLVM_ROOT_RELEASE))
- message(WARNING "Please, define both LLVM_ROOT_DBUG AND LLVM_ROOT_RELEASE to compile compil_llvm")
-endif()
-
-if (UNIX AND LLVM_ROOT)
+if (UNIX)
add_library(compil_llvm SHARED ${SRC})
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LLVM_ROOT}/share/llvm/cmake")
- include(LLVMConfig)
+ find_package(LLVM)
include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})
add_definitions(${LLVM_DEFINITIONS})
diff --git a/src/db/soci/CMakeLists.txt b/src/db/soci/CMakeLists.txt
index 696d331..6311e29 100644
--- a/src/db/soci/CMakeLists.txt
+++ b/src/db/soci/CMakeLists.txt
@@ -10,13 +10,13 @@ set(SRC
)
find_package(SQLite3 REQUIRED)
-include("${SOCI_ROOT}/cmake/SOCI.cmake")
+find_package(Soci REQUIRED)
# define db soci target
include_directories(${SQLITE3_INCLUDE_DIRS})
include_directories(${SOCI_INCLUDE_DIRS})
add_library(db_soci SHARED ${SRC})
-target_link_libraries(db_soci medusa ${SQLITE3_LIBRARY} SOCI::soci_core_static SOCI::soci_sqlite3_static)
+target_link_libraries(db_soci medusa ${SQLITE3_LIBRARY} ${SOCI_LIBRARY} ${SOCI_sqlite3_PLUGIN})
set_target_properties(db_soci PROPERTIES
FOLDER "Databases"
PREFIX ""
diff --git a/src/emul/llvm/CMakeLists.txt b/src/emul/llvm/CMakeLists.txt
index 06e7b13..39e0818 100644
--- a/src/emul/llvm/CMakeLists.txt
+++ b/src/emul/llvm/CMakeLists.txt
@@ -10,20 +10,10 @@ set(SRC
# TODO(KS): Probably not the optimal solution, but it works, so who cares?
set(MEDUSA_LLVM_LIBS all)
-if (UNIX AND NOT LLVM_ROOT)
- message(WARNING "Please, define LLVM_ROOT to compile emul_llvm")
-endif()
-
-if (MSVC AND (NOT LLVM_ROOT_DEBUG OR NOT LLVM_ROOT_RELEASE))
- message(WARNING "Please, define both LLVM_ROOT_DBUG AND LLVM_ROOT_RELEASE to compile emul_llvm")
-endif()
-
-
-if (UNIX AND LLVM_ROOT)
+if (UNIX)
add_library(emul_llvm SHARED ${SRC})
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LLVM_ROOT}/share/llvm/cmake")
- include(LLVMConfig)
+ find_package(LLVM)
include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})
add_definitions(${LLVM_DEFINITIONS}) |
Thanks for the patch. Thanks to it, I made it past the configure phase, but there were more surprises: two more projects were being dowloaded during the build process, namely pybind11 and PEGTL (also in Debian):
One is invoked from the main CMakeLists.txt and the other from src/tools/pydusa/CMakeLists.txt. I've started to use Apart from that, the build failed in a way that I was afraid would happen: the OGDF dependency is not optional, despite having the |
Even if all dependencies listed in README.rst and the build instructions are followed the build system tries download and build giga bytes of common libraries which all are provided by typical Linux distributions. This simply doesn't make any sense as it wastes the time of potential users and contributors without giving them any benefit.
The text was updated successfully, but these errors were encountered: