Skip to content
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

Installing XTDMAKE on Centos 7 #34

Open
unvaare opened this issue Nov 7, 2018 · 16 comments
Open

Installing XTDMAKE on Centos 7 #34

unvaare opened this issue Nov 7, 2018 · 16 comments

Comments

@unvaare
Copy link

unvaare commented Nov 7, 2018

Hi,

I have installed XTDMAKE from source as given in the documentation and have added the required configuration in CMakeLists at root and CMakeLists in the modules. When trying to run "cmake .." from build folder I get following error:
Unknown CMake command "xtdmake_init"

Also I am not sure about the "core" mentioned in the CMakeLists, i think it's just for example, right?

Thanks.

@psycofdj
Copy link
Owner

psycofdj commented Nov 7, 2018

Hi @unvaare

Seems that cmake cannot find your XTDMake module.
You can help it with the following instruction (prior to xtdmake_init call) :

find_package(XTDMake REQUIRED HINTS "/usr/local/share/xtdmake/") # or whatever is your custom install directory

The core directory is indeed given as example. It is taken from xtdcpp C++ project where you can find example usage of XTDMake.

I've never tried XTDMake on Centos system. Feel free to report me any issue encountered and/or any pull requests that might improve compatibility.

@unvaare
Copy link
Author

unvaare commented Nov 7, 2018

Thanks @psycofdj ,

Now I am getting below mentioned error:

-- Found module CodeDupRule : FALSE (unmet required dependencies)
CMake Error at /usr/local/share/xtdmake/codedup/FindCodeDupRule.cmake:52 (message):
Unable to load required module CodeDupRule
Call Stack (most recent call first):
/usr/local/share/xtdmake/XTDMakeConfig.cmake:41 (find_package)
CMakeLists.txt:21 (xtdmake_init)

@psycofdj
Copy link
Owner

psycofdj commented Nov 8, 2018

XTDMake cannot find some dependencies of the CodeDupRule module.
You should find some previous errors that tells you which dependency is missing.

This particular module depends on:

  • xsltproc binary
  • java binary
  • a java program called PMD that must be found in CodeDupRule_PMD_HOME (which defaults to /usr/share/pmd-bin-5.7.0)

You can see what's going on reading this file

Alternatively, you can disable CodeDupRule module by removing it from the xtdmake_init function arguments.

@unvaare
Copy link
Author

unvaare commented Nov 8, 2018

Thanks @psycofdj that helped. But there is some other errors I am facing now. Could you please look into this?
https://pastebin.com/Rc7230HQ

@psycofdj
Copy link
Owner

psycofdj commented Nov 8, 2018

Good news is: you're pretty close to a first run !

make sure you have only 1 cmake call to project function (in your root CMakeLists.txt), with enable_testing() and definition of your project MAJOR, MINOR and PATCH versions. You can use the following example:

project(xtd)
enable_testing()
set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 1)
set(PROJECT_VERSION_PATCH 2)

subdirs should NOT call project() function, only define your tagets and XTDMake targets. See here to get an example xtdcpp/core/CMakeLists.txt

I have more concerns about the two following errors:

CMake Warning (dev) at /usr/local/share/xtdmake/memcheck/FindMemcheckRule.cmake:58 (get_target_property):
Policy CMP0045 is not set: Error on non-existent target in
get_target_property.  Run "cmake --help-policy CMP0045" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

get_target_property() called with non-existent target "engine-check".
Call Stack (most recent call first):
engine/CMakeLists.txt:23 (add_memcheck)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at /usr/local/share/xtdmake/memcheck/FindMemcheckRule.cmake:65 (get_property):
get_property given TEST name that does not exist: l_test_list-NOTFOUND
Call Stack (most recent call first):
engine/CMakeLists.txt:23 (add_memcheck)

Make sure that your engine subdirs calls that add_check(...) function with expected parameters (example here).

These two errors are basically telling us that cmake cannot find the engine-check target, in which it should find a property called TESTLIST. The target and the property are normally defined by the CheckRule triggers by the add_check call in your engine/CMakeLists.txt file.

Make sure you call add_check with engine as first parameter. A common mistake is to copy/paste calls from another subdir and forget to modify the first parameters.

@unvaare
Copy link
Author

unvaare commented Nov 8, 2018

I tried following your instructions but still getting the following errors:
https://pastebin.com/qxkHYG6V

Please find my root and module CMAKELISTS.txt on the links below:
Root CMAKELISTS: https://pastebin.com/UPbRA3Yr
Module (Engine) CMAKELISTS: https://pastebin.com/cTQEALdZ

@psycofdj
Copy link
Owner

psycofdj commented Nov 8, 2018

Can you try adding the add_check call BEFORE the add_memcheck one ?

@psycofdj
Copy link
Owner

psycofdj commented Nov 8, 2018

Such situation should have been detected by XTDMake on this line.

The test is not working and should be fixed.

@unvaare
Copy link
Author

unvaare commented Nov 9, 2018

That worked! Thank you.

Now coming to final part, getting following error when running make reports command:
[dev@localhost build]$ make reports
Scanning dependencies of target engine-doc-coverage
[ 8%] Generating engine API documentation
[ 16%] Generating engine documentation coverage informations
[ 25%] Generating engine documentation coverage HTML report
make[3]: *** [reports/doc-coverage/engine/index.html] Error 255
make[2]: *** [engine/CMakeFiles/engine-doc-coverage.dir/all] Error 2
make[1]: *** [CMakeFiles/reports.dir/rule] Error 2
make: *** [reports] Error 2

May be make with debug enable could help:
https://pastebin.com/97kyDBGk

@psycofdj
Copy link
Owner

psycofdj commented Nov 10, 2018

Something is wrong with the doc-coverage target but I can't figure what from your output.

Can you please re-run with make VERBOSE=1 reports instead of make --debug reports ?

Also, you can run targets individually:

  • make doc
  • make check
  • make doc-coverage
  • make ...

@unvaare
Copy link
Author

unvaare commented Nov 12, 2018

Output for make VERBOSE=1 reports: https://pastebin.com/p0gew7wa

make doc :

[dev@localhost build]$ make doc
Scanning dependencies of target engine-doc
[100%] Built target engine-doc
Scanning dependencies of target doc
Scanning dependencies of target reports-caravan-update
[ 50%] Installing report interface for caravan
[100%] Updating reports data for caravan
[100%] Built target reports-caravan-update
Scanning dependencies of target reports-update
[100%] Built target reports-update
Built target doc

make check :

[dev@localhost build]$ make check
Scanning dependencies of target engine-check
[100%] Generating engine tests HTML and XML reports
Scanning dependencies of target engine-check-run-forced
   Site: 
   Build name: (empty)
Create new tag: 20181112-0937 - Experimental
Test project /home/caravan/poc/src/build/engine
No tests were found!!!
Built target engine-check-run-forced
Built target engine-check
Scanning dependencies of target check
[ 50%] Updating reports data for caravan
[100%] Built target reports-caravan-update
[100%] Built target reports-update
Built target check

make doc-coverage :

[dev@localhost build]$ make doc-coverage
[ 33%] Generating engine documentation coverage HTML report
make[3]: *** [reports/doc-coverage/engine/index.html] Error 255
make[2]: *** [engine/CMakeFiles/engine-doc-coverage.dir/all] Error 2
make[1]: *** [CMakeFiles/doc-coverage.dir/rule] Error 2
make: *** [doc-coverage] Error 2

make ...

[dev@localhost build]$ make ...
make: *** No rule to make target `...'.  Stop.

@psycofdj
Copy link
Owner

Can you please run the following command ?

cd /home/caravan/poc/src/build/engine && \
/usr/bin/genhtml  --no-function-coverage --no-branch-coverage \ 
  /home/caravan/poc/src/build/reports/doc-coverage/engine/doc-coverage.info \
  -o /home/caravan/poc/src/build/reports/doc-coverage/engine/ \
  -t "engine documentation coverage"

I guess that file doc-coverage/engine/doc-coverage.info is inavalid or not compatible with your genhtml version (from lcov package).

Additionally, can you give me:

  • the content of the doc-coverage/engine/doc-coverage.info
  • the oupout of the command: make doc-coverage-clean; make doc-coverage VERBOSE=1

@unvaare
Copy link
Author

unvaare commented Nov 12, 2018

I get follwing error when running the first command:
genhtml: ERROR: no valid records found in tracefile /home/caravan/poc/src/build/reports/doc-coverage/engine/doc-coverage.info


doc-coverage/engine/doc-coverage.info is empty


make doc-coverage-clean
Scanning dependencies of target engine-doc-coverage-clean
Built target engine-doc-coverage-clean
Scanning dependencies of target doc-coverage-clean
[ 50%] Updating reports data for caravan
[100%] Built target reports-caravan-update
[100%] Built target reports-update
Built target doc-coverage-clean


make doc-coverage VERBOSE=1:
https://pastebin.com/WAhSU69Y

@psycofdj
Copy link
Owner

is there anything in your /home/caravan/poc/src/build/reports/doc/engine/xml/ directory ?

@unvaare
Copy link
Author

unvaare commented Nov 12, 2018

Yes.
[root@localhost ~]# ls /home/caravan/poc/src/build/reports/doc/engine/xml/
combine.xslt compound.xsd index.xml index.xsd

@unvaare
Copy link
Author

unvaare commented Nov 14, 2018

@psycofdj Any luck with finding the solutions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants