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
inline errors in debug build (1.11.0 #256
Comments
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this issue
Mar 2, 2023
With DEBUG_BUILD = "1", the following error occurs: src/relpsess.c:95:1: error: inlining failed in call to 'relpSessFreePermittedPeers': function not considered for inlining [-Werror=inline] so use the compiler flag '-Wno-error=inline' for DEBUG_OPTIMIZATION only. Tracked by upstream bug: rsyslog/librelp#256 but it's looking like a toolchain bug. Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this issue
Mar 29, 2023
With DEBUG_BUILD = "1", the following errors occur: src/relpsess.c:95:1: error: inlining failed in call to 'relpSessFreePermittedPeers': function not considered for inlining [-Werror=inline] src/tcp.c:146:1: error: inlining failed in call to 'relpTcpFreePermittedPeers': function not considered for inlining [-Werror=inline] src/tcp.c:158:1: error: inlining failed in call to 'callOnAuthErr': function not considered for inlining [-Werror=inline] Compiler does not inline any functions when not optimizing unless you specify the ‘always_inline’ attribute for the function. Add "> Upstream-Status: Tracked by upstream bug: rsyslog/librelp#256 Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this issue
Mar 30, 2023
With DEBUG_BUILD = "1", the following errors occur: src/relpsess.c:95:1: error: inlining failed in call to 'relpSessFreePermittedPeers': function not considered for inlining [-Werror=inline] src/tcp.c:146:1: error: inlining failed in call to 'relpTcpFreePermittedPeers': function not considered for inlining [-Werror=inline] src/tcp.c:158:1: error: inlining failed in call to 'callOnAuthErr': function not considered for inlining [-Werror=inline] Compiler does not inline any functions when not optimizing unless you specify the ‘always_inline’ attribute for the function. Add "__attribute__((always_inline))" to avoid these function inline errors. Also revert the work-around made earlier in librelp_1.11.0.bb. Upstream-Status: Tracked by upstream bug: rsyslog/librelp#256 Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this issue
Aug 4, 2023
Compiler does not inline any functions when using debug optimization (-Og). Hence, remove -Winline flag when compiling with debug optimization. Backport upstream fix: rsyslog/librelp#258 Remove previous local fix: rsyslog/librelp#256 Signed-off-by: Nicolas Marguet <nicolas.marguet@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this issue
Aug 5, 2023
Compiler does not inline any functions when using debug optimization (-Og). Hence, remove -Winline flag when compiling with debug optimization. Backport upstream fix: rsyslog/librelp#258 Remove previous local fix: rsyslog/librelp#256 Signed-off-by: Nicolas Marguet <nicolas.marguet@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In a Yocto (cross-compile) build, using gcc-12.2, when building with DEBUG_OPTIMIZATION, I see:
Adding the following:
DEBUG_OPTIMIZATION:append = " -Wno-error=inline"
works around the compile failure and rsyslog passes it's tests as you'd hope.
Using the git tree and:
make -C src librelp_la-relpsess.lo CFLAGS=" -Winline -Werror -Og "
I was not able to reproduce the error when compiling natively using Ubuntu-22.04 (gcc-11.3) but
was able to reproduce it using Fedora-37, gcc --version : gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
Oh and it only happens when using -Og not -O[0-3]
I suspect that this is a toolchain bug rather than a librelp bug. Do you agree?
The text was updated successfully, but these errors were encountered: