[CMake] Why is the binary md5sum value different?

Gregor Jasny gjasny at googlemail.com
Fri May 17 05:23:20 EDT 2019


On 17.05.19 02:53, Gelryun wrote:
> I write MakefileList.txt like this.
> 
> ------------------------------------------------------------------------
> include_directories(${COMMINC_DIR} ${DBINC_DIR} ./)
> link_directories(${DBLIB_DIR} ${COMMLIB_DIR})
> 
> set(DBUSERID withdb/ufdb)
> PREPROCESS_ORACLE_FILES(ACK_db.pc ${DBUSERID} "${DBINC_DIR};${COMMINC_DIR}")
> 
> set(ACK_P_SRCS
>          ACK_db.c ACK_p.c)
> 
> set(ACK_C_SRCS
>          ACK_db.c ACK_c.c)
> 
> add_executable(ACK_p ${ACK_P_SRCS})
> add_executable(ACK_c ${ACK_C_SRCS})
> ...
> When I install it, the md5sum value of the binaries there is different.
> 
> Why is the binary md5sum value different?

This is probably due to rpaths being re-written (see 
https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling).

You could use 
https://manpages.debian.org/testing/diffoscope/diffoscope.1.en.html to 
find out differences between two binaries.

Thanks,
Gregor


More information about the CMake mailing list