wisk / medusa

An open source interactive disassembler
Other
1.04k stars 92 forks source link

Compilation Error on Ubuntu 16.04 with boost 1.58 and QT 5.5.1 #63

Open tuxamito opened 8 years ago

tuxamito commented 8 years ago

I am very interesting in playing with this piece of software! but I have problems compiling it.

After executing make, and compiling for a while... I get this error:

make[2]: * No rule to make target 'src/db/soci/soci/src/soci-build/lib/soci_core_4_0.a', needed by 'lib/db_soci.so'. Stop. CMakeFiles/Makefile2:583: recipe for target 'src/db/soci/CMakeFiles/db_soci.dir/all' failed make[1]: * [src/db/soci/CMakeFiles/db_soci.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *\ [all] Error 2

Any way to solve this? Thanks!

w1gz commented 8 years ago

Hi @tuxamito!

On what branch did you tried to compile Medusa? I'm switching a lot between dev and hunter, dev was not affected by your issue whereas hunter failed at the same position.

To fix this, you simply need to edit this line:

"${CMAKE_CURRENT_BINARY_DIR}/soci/src/soci-build/lib/soci_core_4_0.a"
"${CMAKE_CURRENT_BINARY_DIR}/soci/src/soci-build/lib/libsoci_core.so.4.0"

And you should be good to go. I must warn you though, there is a few issues with the compilation at the moment, don't hesitate to report and/or fix any issue you can find :).

tuxamito commented 8 years ago

Thanks @w1gz! That helped.

I am using the dev branch. And manage to compile it. Does this verision have a GUI? no qMedusa was generated but I noticed there is no ui folder in the src. (I notice that the master branch has such directory).

msgersch commented 8 years ago

I am on Ubuntu 16.0.4.1 x64 Desktop. I checked out dev and had build issues as well.

The patch above partially fixes it, but it still had the same problem in: https://github.com/wisk/medusa/issues/61 I commented out below to get it to compile, but not sure what the ramifications are:

//py::enum_<u32>(rMod, "MemoryAccess") // .value("READ", MemoryArea::Read) // .value("WRITE", MemoryArea::Write) // .value("EXECUTE", MemoryArea::Execute) // ;

I think the above poster didn't include QT w/ cmake.

cmake .. -DQT5_CMAKE_PATH:PATH=/usr/lib/x86_64-linux-gnu/cmake make -j 16

Also, I copied all the ./build/lib files into ./build/bin to quickly get it up and running.

w1gz commented 8 years ago

@msgersch you are correct about the qt part, this is the message I was writing to @tuxamito:

Did you see any warning during the configure phase? For example, if you do not have the correct qt5 libraries configured for cmake, it will just skip qMedusa altogether.

An example for ODBC:

-- WARNING: 
-- ODBC not found, some libraries or features will be disabled. 
-- See the documentation for ODBC or manually set these variables: 
-- ODBC_INCLUDE_DIR                         = ODBC_INCLUDE_DIR-NOTFOUND 
-- ODBC_LIBRARIES                           = ODBC_LIBRARY-NOTFOUND 

For an ubuntu:16.04, here's something that is known to «work».

cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBOOST_ROOT:PATH=/usr/lib/ \
-DQT5_CMAKE_PATH:path=/usr/lib/ ..
make

@msgersch, regarding py::enum, this seems indeed related to #61, not sure what is the best workaround at the moment. We'll need to ask @wisk about that.

EDIT:

Ok I figured it out. Inside the py_memo_area.py file, just change this line:

py::enum_<u32>(rMod, "MemoryAccess")
py::enum_<MemoryArea::Access>(rMod, "MemoryAccess")

EDIT2:

I created this PR (#64) in order to fix those issues :)