-
Notifications
You must be signed in to change notification settings - Fork 560
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
Building debug version on Windows 11 with gcc12: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp' #20395
Comments
I haven't yet managed to reproduce that failure. If it still throws that same error then I'll make some more attempts to reproduce it. Cheers, |
@sisyphus Yes, good idea. But it still gives the same error:
|
OK ... thanks for checking; sorry that it was a bum steer.
(AFAICT, that's essentially the same command as @hakonhagland ran, except that I've modified CCHOME to be correct for my environment.) The make process begins with:
and, after a while, terminates with the same error as reported by @hakonhagland. There's a recent (Aug 28) commit affecting win32/GNUmakefile, that's probably relevant here. I'm not very experienced in -DDEBUGGING builds. The same commit implemented another change from Cheers, |
This issue seems to be specific to gcc version 12. Has a similar issue not been seen on Linux -DDEBUGGING builds that use gcc-12 ? It seems that, on Windows at least, the "always_inline" attribute is unacceptable to gcc-12 when The obvious workaround is to not specify @hakonhagland , the required optimization level can be specified on the command line, - which makes it fairly easy to experiment with different settings.. I looked at https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html to see if I could find an optimization flag that could be added to Cheers, |
@sisyphus Interesting! I now tried with
The complete log is here: gmake.log |
I hadn't tried building with I can't reproduce the issue you're seeing. However, IMO, the important questions are "why does It would be nice to hear from someone who knows about such things. Cheers, |
@sisyphus Yes, that seems to be the case. But why did not |
I always run 'make distclean' to clean up the perl source and 'make realclean' to clean up a module's source. I think what probably happened in your case is that you started a new build after a successful cleanup but then, after toke.c and regcomp.c had been compiled, you killed that build (perhaps because you realized that you had not selected the 'gmake' arguments you intended). I'm pretty weak on git, but I'm guessing that Cheers, |
@sisyphus Maybe yes! Anyway, after building successfully with |
Does the same problem arise if you try to install other modules using cpan, or is it just with App::Cpanminus ? |
@sisyphus I think not. I tried with |
It seems like |
I think we should first determine 2 things:
@hakonhagland, unfortunately neither you nor I have the answer to either question, and apparently everyone else is either disinterested or has nothing to contribute. In a couple of days from now, perl-5.37.5 will be released. In the meantime, if you really need a functional debugging perl I would suggest using an MSVCRT build of gcc-11.3.0 from Winlibs, and build with Cheers, PS If you do try that build with gcc-11.3.0 and strike trouble, please do report it here (in this issue), as it's something I'd like to be informed of. |
Duplicate of #19776 |
@sisyphus Yes I tried it now, and it installs fine here (building with |
With gcc-11.3.0 (building with
Since all modules seem to be affected by this, I believe the bugto not be in App::cpanminus. Since Cheers, |
Duh ... 'cpan' was working across my various builds of perl on Windows 11, but now it's not working on any of them (except for cygwin). |
I noticed something interesting. It seems that INST_TOP is not respected for some files when running
Then I ran "gmake test", and then "gmake install" which should then install into directory "c:\perl-debug2" according to the above command line. But from the log file I see the following at line 2098:
notice that it copies |
For "gmake install", I think you'll need to run When I build perl with command line configuration options, I always pass the same arguments to "gmake test" and "gmake install" as I passed to "gmake". I'm guessing that's how stuff got into your c:\perl\bin. The GNUmakefile sets:
and then runs:
So you can see that those batch files will end up in whatever is specified by Cheers, |
@sisyphus Yes, you are right. I tested this now and that seems to solve the issue with |
With gcc 12 when building with the -Og forcing inline causes the build to fail, with the compiler complaining it can't inline those functions. With -O2, the functions are inlined anyway. Note that -Og is the gcc recommended optimization option to build with if you are going to debug the binary. Fixes Perl#20395
I reported the bug in GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107931 |
This is a workaround for a bug in GCC 12: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107931 For some reason, when compiling with the -Og flag, GCC 12 is unable to inline the comparators. It's fatal because they're marked with __attribute__((always_inline)). To avoid the bug, the comparators have to be defined before their first use. Fixes Perl#19776, fixes Perl#20395
With gcc 12 when building with the -Og forcing inline causes the build to fail, with the compiler complaining it can't inline those functions. With -O2, the functions are inlined anyway. Note that -Og is the gcc recommended optimization option to build with if you are going to debug the binary. Fixes #20395
With gcc 12 when building with the -Og forcing inline causes the build to fail, with the compiler complaining it can't inline those functions. With -O2, the functions are inlined anyway. Note that -Og is the gcc recommended optimization option to build with if you are going to debug the binary. Fixes #20395 (cherry picked from commit f5a1889)
With gcc 12 when building with the -Og forcing inline causes the build to fail, with the compiler complaining it can't inline those functions. With -O2, the functions are inlined anyway. Note that -Og is the gcc recommended optimization option to build with if you are going to debug the binary. Fixes Perl#20395
With gcc 12 when building with the -Og forcing inline causes the build to fail, with the compiler complaining it can't inline those functions. With -O2, the functions are inlined anyway. Note that -Og is the gcc recommended optimization option to build with if you are going to debug the binary. Fixes Perl#20395
I am trying to build a debug version of perl from blead on Windows 11 using MinGW-w64 and gcc 12.2 from https://winlibs.com/ (using the MSVCRT runtime library).
After downloading WinLibs to
C:\Winlibs64-Gcc12-msvcrt
, I needed to rename gnu make binary togmake.exe
:This is gcc version 12.2.0, and gnu make version 4.3:
To build perl I needed to set the environment variable
CCHOME
:Now, I tried to run make like this:
The complete log is here: gmake.log
The text was updated successfully, but these errors were encountered: