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

Makefile.PL Invokes $Config{cpp} instead of $Config{cpprun} #139

Closed
kentfredric opened this issue Jul 7, 2020 · 1 comment
Closed

Makefile.PL Invokes $Config{cpp} instead of $Config{cpprun} #139

kentfredric opened this issue Jul 7, 2020 · 1 comment
Assignees

Comments

@kentfredric
Copy link
Contributor

See Perl/perl5#17948

We've locally got perl configured with -Dcpp=$GCC -E, which is a perfectly valid C PreProcessor.

However, cpp only contains the "path" aspect of that, and strips the arguments.

https://github.com/Perl/perl5/blob/48a788454f1719093d08e80bbb70723ae345163a/Porting/Glossary#L315-L350

cpp (Loc.U):
	This variable is used internally by Configure to determine the
	full pathname (if any) of the cpp program.  After Configure runs,
	the value is reset to a plain "cpp" and is not useful.
...
cpprun (cppstdin.U):
	This variable contains the command which will invoke a C preprocessor
	on standard input and put the output to stdout. It is guaranteed not
	to be a wrapper and may be a null string if no preprocessor can be
	made directly available. This preprocessor might be different from the
	one used by the C compiler. Don't forget to append cpplast after the
preprocessor options.
#perl -V:cpp.*
cpp='x86_64-pc-linux-gnu-gcc';
cpp_stuff='42';
cppccsymbols='';
cppflags='-fwrapv -fno-strict-aliasing -pipe';
cpplast='-';
cppminus='-';
cpprun='x86_64-pc-linux-gnu-gcc  -E';
cppstdin='x86_64-pc-linux-gnu-gcc  -E';
cppsymbols='_FILE_OFFSET_BITS=64 _FORTIFY_SOURCE=2 _LARGEFILE_SOURCE=1 _LP64=1 _POSIX_C_SOURCE=200809L _POSIX_SOURCE=1 __BYTE_ORDER__=1234 __ELF__=1 __GLIBC_MINOR__=31 __GLIBC__=2 __GNUC_MINOR__=1 __GNUC__=10 __GNU_LIBRARY__=6 __LP64__=1 __PIC__=2 __STDC__=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __amd64=1 __amd64__=1 __linux=1 __linux__=1 __pic__=2 __unix=1 __unix__=1 __x86_64=1 __x86_64__=1 linux=1 unix=1';
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jul 7, 2020
- EAPI7
- Add subslot deps for zlib
- Ensure CFLAGS passed to make/compiler
- Fix problem introduced by -Dcpp=$(tc-getCPP) in dev-lang/perl where
  Devel-NYTProf incorrectly uses $Config{cpp} instead of
  $Config{cpprun}, which results in trying to invoke $GCC to
  pre-process headers for grep-based feature detection, where it
  *SHOULD* be invoking "$GCC -E", which in turn, leads to trying
  to compile system headers and in turn, writing precompiled headers
  to /usr/include, tripping a sandbox violation.

Bug: https://bugs.gentoo.org/724506
Bug: timbunce/devel-nytprof#139
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Kent Fredric <[email protected]>
jkeenan added a commit to jkeenan/devel-nytprof that referenced this issue Apr 13, 2021
For: timbunce#139

Thanks to the late Kent Fredric.
@jkeenan jkeenan self-assigned this Apr 13, 2021
jkeenan added a commit to jkeenan/devel-nytprof that referenced this issue Apr 13, 2021
@jkeenan
Copy link
Collaborator

jkeenan commented Apr 13, 2021

Addressed via 07778bf. Closing ticket. Thank you very much.

@jkeenan jkeenan closed this as completed Apr 13, 2021
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