-
Notifications
You must be signed in to change notification settings - Fork 78
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
reorganize cmake files(issue #113) #120
Conversation
Some fixes are needed; the comments are similar to those of opencog/atomspace#1832
|
updated |
It seems to make sense (although,with the exception of I suppose one of us need to test it on a fresh system before merging (I'll test it early next week if none of us has done it by then). |
On my machine
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above #120 (comment)
Solved by change #120 (review)
cmake/CMakeLists.txt
Outdated
${CMAKE_CURRENT_BINARY_DIR}/CogUtilConfigVersion.cmake | ||
${CMAKE_CURRENT_BINARY_DIR}/CogUtilConfig.cmake | ||
DESTINATION | ||
${CMAKE_INSTALL_PREFIX}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ${LIB_INSTALL_DIR}/CogUtil/cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot make clean build after CogUtil is installed. Cmake finds CogUtilConfig.cmake file but include paths doesn't work:
[ 2%] Building CXX object opencog/truthvalue/CMakeFiles/truthvalue.dir/AttentionValue.cc.o
/home/vital/projects/opencog/test/atomspace/opencog/truthvalue/AttentionValue.cc:25:10: fatal error: opencog/util/exceptions.h: No such file or directory
#include <opencog/util/exceptions.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vital/projects/opencog/test/atomspace/opencog/atoms/proto/FloatValue.cc:23:10: fatal error: opencog/util/exceptions.h: No such file or directory
#include <opencog/util/exceptions.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
@vsbogd Thanks, i fixed include path, it should work now with custom prefix. |
Checked again, CogUtil buils succesfully. I also can build atomspace but cannot build atomspace unit tests. See linkage error:
|
CogUtil build successful, unit tests passed. Atomspace build successful, unit tests failed, but this is equal to baseline (opencog/atomspace master branch):
|
Um, these unit tests never-ever fail for me; they've been passing just fine for years (well two of them are newer than that, but they always pass) For me, 121 tests total run, and they always pass. We need a distinct bug report for each, to track down the problems. VectorAPI might be failing for the same reason that Nil has already reported. |
Master branch unit test states
Pull request's unit test states
|
Raised issue opencog/atomspace#1834 on VectorAPIUTest failure. Looks like it fails on clean build because there are no OpenCog node types which are used in test data. |
Other tests fail because I didn't do |
cmake/OpenCogFunctions.cmake
Outdated
IF ("${MODULE_NAME}.scm" STREQUAL "${FILE_NAME}") | ||
EXECUTE_PROCESS( | ||
COMMAND ${CMAKE_COMMAND} -E make_directory ${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH} | ||
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_NAME}" "${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}/${FILE_NAME}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not this PR issue but rather an issue that exists in opencog/atomspace master branch.
EXECUTE_PROCESS chaining make_directory and create_symlink actions fails sporadically because directory is not created at the moment when symlinks is being created:
failed to create symbolic link '/tmp/test/atomspace-build/opencog/scm//opencog/matrix.scm': No such file or directory
Can be fixed by replacing one EXECUTE_PROCESS with two commands by two EXECUTE_PROCESS lines with one command in each:
IF ("${MODULE_NAME}.scm" STREQUAL "${FILE_NAME}")
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E make_directory ${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}
)
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_NAME}" "${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}/${FILE_NAME}"
)
SET(FILE_INSTALL_PATH "${GUILE_INSTALL_DIR}/${MODULE_FILE_DIR_PATH}"
PARENT_SCOPE
)
ELSE()
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E make_directory ${GUILE_SYMLINK_DIR}/${MODULE_DIR_PATH}
)
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_NAME}" "${GUILE_SYMLINK_DIR}/${MODULE_DIR_PATH}/${FILE_NAME}"
)
SET(FILE_INSTALL_PATH "${GUILE_INSTALL_DIR}/${MODULE_DIR_PATH}"
PARENT_SCOPE
)
ENDIF()
Raising it here because it should be fixed either in this PR or after this PR is merged.
Testing this is proving more difficult. I could persevere but it seems it has been sufficiently tested by you guy (thanks a lot for your effort!). I'll wait 24h in case you have something else to say about it and I'll merge. |
@ngeiswei I moved some opencog cmake files here as well. |
@noskill, I would prefer raising next PR to move .cmake files from opencog/opencog to opencog/cogutil to not test this PR twice. |
@vsbogd I've sent you an invite so you have merging rights, to share a bit the burden :-) hopefully nobody has something against that and I trust you'll use your rights wisely. |
Thanks, @ngeiswei, will do my best to do the things right. |
@vsbogd I removed commit with opencog cmake files.. |
Yeah, OK. |
FYI, in issue opencog/atomspace#1923, it has been observed that three files were moved from atomspace to cogutils by mistake: |
@linas OPENCOG_ADD_ATOM_TYPES defined in OpenCogMacros.cmake is used in other projects, not only in atomspace. I think that commonly used cmake files better stay in cogutil. |
But that is only useful if the atomspace is installed. It makes sense to have it in the atomspace repo don't it. |
@noskill Yes, I'm the one who designed it so that other projects use OPENCOG_ADD_ATOM_TYPES. :-) So @Dagiopia is correct, that macro only makes sense if the atomspace is installed; it references files that exist only in the atomspace, and requires glue code that exists only in the atomspace. It really did get moved by accident; I just wasn't paying attention when your original pull req went through; and apparently no one else was, either. Accidents happen. |
The point is: @Dagiopia please do go ahead to create a pull req to fix this. It will take a while to get through, as we need a cooling-off period to make sure that the other repos (opencog, as-moses and agi-bio) are not adversely affected. With a bit of luck, this change should be invisible to the other repos. |
It's my attempt at reorganizing cmake files #113