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

build: CMakeLists.txt Do not use private makefile targets #5819

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

ptsneves
Copy link
Contributor

@ptsneves ptsneves commented Aug 2, 2022

$< is a private detail from the Makefile generated by CMakefile and
are not under control or to be used at the CMakeLists level. In 3.20
that private generation changed pre-requisite targets[1] and now logs
contain the path compiler_depend.ts instead of the actual file.

Fixes #5492


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [ N/A ] Example configuration file for the change
  • [ N/A ] Debug log output from testing the change
  • [ N/A ] Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

Documentation

  • [ N/A ] Documentation required for this feature

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@ptsneves
Copy link
Contributor Author

ptsneves commented Aug 2, 2022

Not sure what is the issue with the commit message. How can i get a diagnostic besides to read the commit message guidelines?

@patrick-stephens
Copy link
Contributor

The commit message is fine but it's not signed off: https://github.com/fluent/fluent-bit/runs/7628179973

Basically needs the signed off by bit at the bottom.

@ptsneves ptsneves force-pushed the privates-makefile branch from 9c94708 to 13fa158 Compare August 2, 2022 10:51
@patrick-stephens patrick-stephens changed the title CMakeLists.txt Do not use private makefile $< target build: CMakeLists.txt Do not use private makefile $< target Aug 4, 2022
@patrick-stephens
Copy link
Contributor

Ah, @ptsneves the commit and PR message checker does not like the special characters you have $< I think in it's regex.

Checking commit messages against "^[a-z0-9A-Z\-_\s\,\.\/]+\:[ ]{0,1}[a-zA-Z]+[a-zA-Z0-9 \-\.\:_\#\(\)=\/'\"\,><\+\[\]\!\*\\]+$"...
- failed: "build: CMakeLists.txt Do not use private makefile $< target"

Can you just update it slightly (and the PR title to match) to remove it?

$< is a private detail from the Makefile generated by CMakefile and id
not under control or to be used at the CMakeLists level. In CMake 3.20
that private generation changed pre-requisite targets[1] and now logs
contain the path compiler_depend.ts instead of the actual file.

Signed-off-by: Paulo Neves <[email protected]>
@ptsneves ptsneves force-pushed the privates-makefile branch from 13fa158 to e7b87aa Compare August 4, 2022 13:26
@ptsneves ptsneves changed the title build: CMakeLists.txt Do not use private makefile $< target build: CMakeLists.txt Do not use private makefile target Aug 4, 2022
@ptsneves ptsneves changed the title build: CMakeLists.txt Do not use private makefile target build: CMakeLists.txt Do not use private makefile targets Aug 4, 2022
@ptsneves
Copy link
Contributor Author

ptsneves commented Aug 9, 2022

ping

Copy link
Collaborator

@niedbalski niedbalski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@niedbalski niedbalski merged commit fc32552 into fluent:master Aug 11, 2022
@nokute78
Copy link
Collaborator

@ptsneves
This patch causes below redefined warnings.
Could you check make clean && make ?

I confirmed https://github.com/fluent/fluent-bit/tree/fc325524d50fe179b76f127243ab9e03ddbdaaa4 is reported warnings.
I also confirmed previous commit https://github.com/fluent/fluent-bit/tree/1aae9362a7bec2ce67c62b6cba6cd8cccce774df is not reported.

[ 15%] Built target chunkio-static
[ 15%] Building C object lib/monkey/deps/rbtree/CMakeFiles/rbtree.dir/rbtree.c.o
<command-line>: warning: "__FILENAME__" redefined
<command-line>: note: this is the location of the previous definition
[ 15%] Linking C static library ../../library/librbtree.a
[ 15%] Built target rbtree
[ 15%] Building C object lib/monkey/deps/regex/CMakeFiles/regex.dir/re.c.o
<command-line>: warning: "__FILENAME__" redefined
<command-line>: note: this is the location of the previous definition
[ 15%] Linking C static library ../../library/libregex.a
[ 15%] Built target regex
[ 15%] Building C object lib/monkey/deps/flb_libco/CMakeFiles/co.dir/libco.c.o
<command-line>: warning: "__FILENAME__" redefined
<command-line>: note: this is the location of the previous definition
[ 15%] Linking C static library ../../library/libco.a
[ 15%] Built target co
[ 15%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_rconf.c.o
<command-line>: warning: "__FILENAME__" redefined
<command-line>: note: this is the location of the previous definition
[ 15%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_string.c.o
<command-line>: warning: "__FILENAME__" redefined
<command-line>: note: this is the location of the previous definition
[ 15%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_memory.c.o
<command-line>: warning: "__FILENAME__" redefined
<command-line>: note: this is the location of the previous definition
[ 15%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_event.c.o
<command-line>: warning: "__FILENAME__" redefined
<command-line>: note: this is the location of the previous definition

sashashura pushed a commit to sashashura/fluent-bit that referenced this pull request Aug 14, 2022
$< is a private detail from the Makefile generated by CMakefile and id
not under control or to be used at the CMakeLists level. In CMake 3.20
that private generation changed pre-requisite targets[1] and now logs
contain the path compiler_depend.ts instead of the actual file.

Signed-off-by: Paulo Neves <[email protected]>

Signed-off-by: Paulo Neves <[email protected]>
mgeriesa pushed a commit to mgeriesa/fluent-bit that referenced this pull request Oct 25, 2022
$< is a private detail from the Makefile generated by CMakefile and id
not under control or to be used at the CMakeLists level. In CMake 3.20
that private generation changed pre-requisite targets[1] and now logs
contain the path compiler_depend.ts instead of the actual file.

Signed-off-by: Paulo Neves <[email protected]>

Signed-off-by: Paulo Neves <[email protected]>
Signed-off-by: Manal Geries <[email protected]>
nikomauno added a commit to nikomauno/fluent-bit that referenced this pull request Oct 1, 2024
By extending the scope of changes introduced in commit
fc32552
("build: CMakeLists.txt Do not use private makefile targets (fluent#5819)")
we mitigate the following error produced BitBake in Yocto

  ERROR: fluentbit-3.1.9-r0 do_package_qa: QA Issue: File /usr/bin/fluent-bit in package fluentbit contains reference to TMPDIR [buildpaths]
  ERROR: fluentbit-3.1.9-r0 do_package_qa: Fatal QA errors were found, failing task.

stemming from

  $ strings packages-split/fluentbit/usr/bin/fluent-bit
  ...
  $(subst /yocto/upstream/build/tmp/work/cortexa57-poky-linux/fluentbit/3.1.9/git/,,$(abspath $<))
  ...

Signed-off-by: Niko Mauno <[email protected]>
nikomauno added a commit to nikomauno/fluent-bit that referenced this pull request Oct 1, 2024
By extending the scope of changes introduced in commit
fc32552
("build: CMakeLists.txt Do not use private makefile targets (fluent#5819)")
we mitigate the following error produced by BitBake in Yocto

  ERROR: fluentbit-3.1.9-r0 do_package_qa: QA Issue: File /usr/bin/fluent-bit in package fluentbit contains reference to TMPDIR [buildpaths]
  ERROR: fluentbit-3.1.9-r0 do_package_qa: Fatal QA errors were found, failing task.

stemming from

  $ strings packages-split/fluentbit/usr/bin/fluent-bit
  ...
  $(subst /yocto/upstream/build/tmp/work/cortexa57-poky-linux/fluentbit/3.1.9/git/,,$(abspath $<))
  ...

Signed-off-by: Niko Mauno <[email protected]>
nikomauno added a commit to nikomauno/fluent-bit that referenced this pull request Oct 1, 2024
By extending the scope of changes introduced in commit
fc32552
("build: CMakeLists.txt Do not use private makefile targets (fluent#5819)")
we mitigate the following error produced by BitBake in Yocto

  ERROR: fluentbit-3.1.9-r0 do_package_qa: QA Issue: File /usr/bin/fluent-bit in package fluentbit contains reference to TMPDIR [buildpaths]
  ERROR: fluentbit-3.1.9-r0 do_package_qa: Fatal QA errors were found, failing task.

stemming from

  $ strings packages-split/fluentbit/usr/bin/fluent-bit
  ...
  $(subst /yocto/upstream/build/tmp/work/cortexa57-poky-linux/fluentbit/3.1.9/git/,,$(abspath $<))
  ...

Signed-off-by: Niko Mauno <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't use $< to set __FILENAME__ in CMakeFiles.txt.
4 participants