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

make: *** No targets specified and no makefile found. Stop. #5727

Closed
scott-mackenzie opened this issue May 3, 2020 · 7 comments
Closed

make: *** No targets specified and no makefile found. Stop. #5727

scott-mackenzie opened this issue May 3, 2020 · 7 comments

Comments

@scott-mackenzie
Copy link

Description of problem:

Following the build from source guide:
https://bit.ly/3fh88bp
No make target is built using the defined approach.

Expected result is the ability to follow the build from source approach using single product and that the process works as described. Result is error:

make: *** No targets specified and no makefile found. Stop.

SCAP Security Guide Version:

Source version:
https://github.com/ComplianceAsCode/content/releases/download/v0.1.49/scap-security-guide-0.1.49.tar.bz2

Operating System Version:

VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"

Steps to Reproduce:

  1. Download source from above link to /usr/local/src
  2. Uncompress source tar zjvf scap-security-guide-0.1.49.tar.bz2
  3. cd scap-security-guide-0.1.49
  4. Following the procedure: (1) https://github.com/ComplianceAsCode/content/blob/master/docs/manual/developer_guide.adoc#building within section 3.3 Building

4a. ensure build director is present, if not create build directory --> then:
4b. ./build_product ubuntu1804
4.c cd build
4d. Following the procedure within 3.5. Testing run command cmake ../
4e. run command make -j4

Note: running command ctest -j4 produces "all tests passed"

At this stage the below error is produced:
make: *** No targets specified and no makefile found. Stop.

Actual Results:

make: *** No targets specified and no makefile found. Stop.

Expected Results:

Successful build. When building "all" sources this works. When using the product specific procedure the process fails.

Addition Information/Debugging Steps:

N/A

@scott-mackenzie
Copy link
Author

scott-mackenzie commented May 3, 2020

Output from command: cmake ../

SCAP Security Guide 0.1.49
-- (see /home/username/Projects/scap-security-guide-0.1.49/docs/manual/developer_guide.adoc for build instructions)
--
-- Found PY_json2html: /usr/local/lib/python3.8/dist-packages/json2html
-- CMake:
-- build type: Release
-- generator: Ninja
-- source directory: /home/username/Projects/scap-security-guide-0.1.49
-- build directory: /home/username/Projects/scap-security-guide-0.1.49/build
--
-- Tools:
-- python: /usr/bin/python3 (version: 3.8.2)
-- python yaml module: /usr/lib/python3/dist-packages/yaml
-- python jinja2 module: /usr/lib/python3/dist-packages/jinja2
-- oscap: /usr/local/bin/oscap (version: 1.3.3)
-- xsltproc: /usr/bin/xsltproc
-- xmllint: /usr/bin/xmllint
-- xmlwf: /usr/bin/xmlwf
-- sed: /usr/bin/sed
-- shellcheck (optional): SHELLCHECK_EXECUTABLE-NOTFOUND
-- linkchecker (optional): LINKCHECKER_EXECUTABLE-NOTFOUND
-- grep (optional): /usr/bin/grep
-- python pytest module (optional): /usr/lib/python3/dist-packages/pytest.py
-- ansible-playbook module (optional): /usr/bin/ansible-playbook
-- ansible-lint module (optional): ANSIBLE_LINT_EXECUTABLE-NOTFOUND
-- yamllint module (optional): YAMLLINT_EXECUTABLE-NOTFOUND
-- BATS framework (optional): BATS_EXECUTABLE-NOTFOUND
--
-- Build options:
-- SSG vendor string: ssgproject
-- Target OVAL version: 5.11
-- OVAL schematron validation: ON
-- shellcheck bash fixes validation: OFF
-- SVG logo in XCCDFs: ON
-- Separate SCAP files: ON
-- jinja2 cache: enabled
-- jinja2 cache dir: /home/username/Projects/scap-security-guide-0.1.49/build/jinja2_cache
--
-- Products:
-- Chromium: OFF
-- Debian 8: OFF
-- Debian 9: OFF
-- Debian 10: OFF
-- JBoss EAP 6: OFF
-- Example: OFF
-- Fedora: OFF
-- Firefox: OFF
-- JBoss Fuse 6: OFF
-- JRE: OFF
-- OCP3: OFF
-- OCP4: OFF
-- Oracle Linux 7: OFF
-- Oracle Linux 8: OFF
-- openSUSE: OFF
-- RHEL 6: OFF
-- RHEL 7: OFF
-- RHEL 8: OFF
-- RHOSP10: OFF
-- RHOSP13: OFF
-- RHV 4: OFF
-- SUSE 11: OFF
-- SUSE 12: OFF
-- Ubuntu 14.04: OFF
-- Ubuntu 16.04: OFF
-- Ubuntu 18.04: ON
-- WRLinux 8: OFF
-- WRLinux 1019: OFF
--
-- Scanning for dependencies of ubuntu1804 fixes (bash, ansible, puppet, anaconda and ignition)...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/username/Projects/scap-security-guide-0.1.49/build

@scott-mackenzie
Copy link
Author

scott-mackenzie commented May 3, 2020

Ran again cleaning up warnings to ensure all tools in place:

.
-- SCAP Security Guide 0.1.49
-- (see /home/username/Projects/scap-security-guide-0.1.49/docs/manual/developer_guide.adoc for build instructions)
--
-- CMake:
-- build type: Release
-- generator: Ninja
-- source directory: /home/username/Projects/scap-security-guide-0.1.49
-- build directory: /home/usernameProjects/scap-security-guide-0.1.49/build
--
-- Tools:
-- python: /usr/bin/python3 (version: 3.8.2)
-- python yaml module: /usr/lib/python3/dist-packages/yaml
-- python jinja2 module: /usr/lib/python3/dist-packages/jinja2
-- oscap: /usr/local/bin/oscap (version: 1.3.3)
-- xsltproc: /usr/bin/xsltproc
-- xmllint: /usr/bin/xmllint
-- xmlwf: /usr/bin/xmlwf
-- sed: /usr/bin/sed
-- shellcheck (optional): /usr/bin/shellcheck
-- linkchecker (optional): /usr/local/bin/linkchecker
-- grep (optional): /usr/bin/grep
-- python pytest module (optional): /usr/lib/python3/dist-packages/pytest.py
-- ansible-playbook module (optional): /usr/bin/ansible-playbook
-- ansible-lint module (optional): /usr/bin/ansible-lint
-- yamllint module (optional): /usr/bin/yamllint
-- BATS framework (optional): /usr/bin/bats
--
-- Build options:
-- SSG vendor string: ssgproject
-- Target OVAL version: 5.11
-- OVAL schematron validation: ON
-- shellcheck bash fixes validation: OFF
-- SVG logo in XCCDFs: ON
-- Separate SCAP files: ON
-- jinja2 cache: enabled
-- jinja2 cache dir: /home/username/Projects/scap-security-guide-0.1.49/build/jinja2_cache
--
-- Products:
-- Chromium: OFF
-- Debian 8: OFF
-- Debian 9: OFF
-- Debian 10: OFF
-- JBoss EAP 6: OFF
-- Example: OFF
-- Fedora: OFF
-- Firefox: OFF
-- JBoss Fuse 6: OFF
-- JRE: OFF
-- OCP3: OFF
-- OCP4: OFF
-- Oracle Linux 7: OFF
-- Oracle Linux 8: OFF
-- openSUSE: OFF
-- RHEL 6: OFF
-- RHEL 7: OFF
-- RHEL 8: OFF
-- RHOSP10: OFF
-- RHOSP13: OFF
-- RHV 4: OFF
-- SUSE 11: OFF
-- SUSE 12: OFF
-- Ubuntu 14.04: OFF
-- Ubuntu 16.04: OFF
-- Ubuntu 18.04: ON
-- WRLinux 8: OFF
-- WRLinux 1019: OFF
--
-- Scanning for dependencies of ubuntu1804 fixes (bash, ansible, puppet, anaconda and ignition)...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/username/Projects/scap-security-guide-0.1.49/build

@scott-mackenzie
Copy link
Author

scott-mackenzie commented May 3, 2020

I have purged the "build" directory and started from /usr/local/src/scap-security-guide-0.1.49/ running the ./build_product ubuntu1804

With the added tools 2 tests now fail
.
Test project /home/username/Projects/scap-security-guide-0.1.49/build
Start 1: linkchecker-ssg-guides
Start 2: linkchecker-ssg-tables
Start 3: unique-cces
Start 4: python-unit-build-scripts
1/27 Test #1: linkchecker-ssg-guides ...................................................***Failed 0.07 sec
Start 5: python-unit-utils
2/27 Test #2: linkchecker-ssg-tables ...................................................***Failed 0.07 sec
Start 6: python-unit-ssg-module
3/27 Test #3: unique-cces .............................................................. Passed 0.12 sec
Start 7: python-unit-ssg_test_suite
4/27 Test #4: python-unit-build-scripts ................................................ Passed 0.52 sec
Start 8: max-path-len
5/27 Test #5: python-unit-utils ........................................................ Passed 0.53 sec
Start 9: test-rule-dir-json
6/27 Test #8: max-path-len ............................................................. Passed 0.19 sec
Start 10: validate-parse-affected
7/27 Test #7: python-unit-ssg_test_suite ............................................... Passed 0.60 sec
Start 11: validate-parse-platform
8/27 Test #6: python-unit-ssg-module ................................................... Passed 1.59 sec
Start 12: stable-profile-ids
9/27 Test #12: stable-profile-ids ....................................................... Passed 0.10 sec
Start 13: stable-profiles
10/27 Test #13: stable-profiles .......................................................... Passed 0.08 sec
Start 14: machine-only-rules
11/27 Test #11: validate-parse-platform .................................................. Passed 2.63 sec
Start 15: bash-unit-tests
12/27 Test #14: machine-only-rules ....................................................... Passed 1.80 sec
Start 16: macros-oval
13/27 Test #15: bash-unit-tests .......................................................... Passed 0.69 sec
Start 17: ansible-playbook-syntax-check-ubuntu1804
14/27 Test #17: ansible-playbook-syntax-check-ubuntu1804 ................................. Passed 0.54 sec
Start 18: ubuntu1804-ansible-playbooks-generated-for-all-rules
15/27 Test #18: ubuntu1804-ansible-playbooks-generated-for-all-rules ..................... Passed 0.10 sec
Start 19: validate-ssg-ubuntu1804-cpe-dictionary.xml
16/27 Test #19: validate-ssg-ubuntu1804-cpe-dictionary.xml ............................... Passed 0.01 sec
Start 20: validate-ssg-ubuntu1804-cpe-oval.xml
17/27 Test #20: validate-ssg-ubuntu1804-cpe-oval.xml ..................................... Passed 3.09 sec
Start 21: validate-ssg-ubuntu1804-xccdf.xml
18/27 Test #21: validate-ssg-ubuntu1804-xccdf.xml ........................................ Passed 0.10 sec
Start 22: verify-references-ssg-ubuntu1804-xccdf.xml
19/27 Test #22: verify-references-ssg-ubuntu1804-xccdf.xml ............................... Passed 0.11 sec
Start 23: verify-ssg-ubuntu1804-xccdf.xml-override-true-all-profile-titles
20/27 Test #23: verify-ssg-ubuntu1804-xccdf.xml-override-true-all-profile-titles ......... Passed 0.03 sec
Start 24: verify-ssg-ubuntu1804-xccdf.xml-override-true-all-profile-descriptions
21/27 Test #24: verify-ssg-ubuntu1804-xccdf.xml-override-true-all-profile-descriptions ... Passed 0.04 sec
Start 25: validate-ssg-ubuntu1804-oval.xml
22/27 Test #16: macros-oval .............................................................. Passed 5.44 sec
Start 26: validate-ssg-ubuntu1804-ds.xml
23/27 Test #26: validate-ssg-ubuntu1804-ds.xml ........................................... Passed 0.28 sec
Start 27: validate-ssg-ubuntu1804-ds-1.2.xml
24/27 Test #27: validate-ssg-ubuntu1804-ds-1.2.xml ....................................... Passed 0.29 sec
25/27 Test #9: test-rule-dir-json ....................................................... Passed 14.54 sec
26/27 Test #25: validate-ssg-ubuntu1804-oval.xml ......................................... Passed 22.91 sec
27/27 Test #10: validate-parse-affected .................................................. Passed 49.83 sec

93% tests passed, 2 tests failed out of 27

Total Test time (real) = 50.54 sec

The following tests FAILED:
1 - linkchecker-ssg-guides (Failed)
2 - linkchecker-ssg-tables (Failed)
Errors while running CTest

@yuumasato
Copy link
Member

Hi,

I checked out 0.1.49 locally and I see a failure on the guides only:

[dagobah build{(HEAD detached at v0.1.49)}]$ ctest -j4 -R linkchecker --output-on-failure
Test project /home/wsato/git/content/build
    Start 1: linkchecker-ssg-guides
    Start 2: linkchecker-ssg-tables
1/2 Test #2: linkchecker-ssg-tables ...........   Passed    0.22 sec
2/2 Test #1: linkchecker-ssg-guides ...........***Failed   10.46 secLinkChecker 9.4.0              Copyright (C) 2000-2014 Bastian Kleineidam
LinkChecker comes with ABSOLUTELY NO WARRANTY!
This is free software, and you are welcome to redistribute it
under certain conditions. Look at the file `LICENSE' within this
distribution.
Get the newest version at http://wummel.github.io/linkchecker/
Write comments and bugs to https://github.com/wummel/linkchecker/issues
Support this project at http://wummel.github.io/linkchecker/donations.html

Start checking at 2020-05-14 17:13:25+002
10 threads active,    19 links queued,    4 links in  36 URLs checked, runtime 1 seconds
10 threads active,    11 links queued,   32 links in  63 URLs checked, runtime 6 seconds

URL        `https://www.debian.org/doc/manuals/debian-faq/ch-pkgtools.en.html'
Name       `apt'
Parent URL file:///home/wsato/git/content/build/guides/ssg-ubuntu1804-guide-default.html, line 2630, col 75
Real URL   https://www.debian.org/doc/manuals/debian-faq/ch-pkgtools.en.html
Check time 0.191 seconds
Size       7KB
Result     Error: 404 Not Found

Statistics:
Downloaded: 3.16MB.
Content types: 0 image, 46 text, 0 video, 0 audio, 7 application, 0 mail and 0 other.
URL lengths: min=18, max=241, avg=60.

That's it. 53 links in 76 URLs checked. 0 warnings found. 1 error found.
Stopped checking at 2020-05-14 17:13:35+002 (9 seconds)


50% tests passed, 1 tests failed out of 2

This specific URL was already fixed in #5647
Latest upstream seems to be OK.

@scott-mackenzie Could you try testing with --output-on-failure to check if the problematic URL is the same?

@yuumasato
Copy link
Member

Re-open if the issue persists.

@ayushgupta9198
Copy link

ayushgupta9198 commented May 26, 2021

*Hi all ,

This issue was solved by me you can find the solution in my profile

Thanks for your time*

@ggbecker
Copy link
Member

*Hi all ,

This issue was solved by me you can find the solution in my profile

Thanks for your time*

Ok, I think ^^^ this is some kind of spam ;)

Anyway I feel that the original issue of make not finding the target is that because the author's setup was using Ninja to build the system, this is automatically detected by the build_product script and used if it detects the presence of it. Ninja is supposed to build the content faster. In this case you should run ninja when rebuilding the content (https://complianceascode.readthedocs.io/en/latest/manual/developer/02_building_complianceascode.html#using-ninja-for-faster-builds)

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

4 participants