Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

CMake stack smashing termination on builds

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
Author
Message
melts
n00b
n00b
Posts: 53
Joined: Sat Feb 21, 2004 5:03 pm

CMake stack smashing termination on builds

  • Quote

Post by melts » Sat Apr 02, 2022 5:55 am

Hi

As the title suggests I'm seeing the stack smashing protections kicking in when I use cmake, at least sometimes. I don't know how often cmake is called in builds.
I've spent a little bit of time trying to debug this but its a bit beyond me. The system was built a bit over a week ago following the raspberry pi build instructions, I used stage3-arm64-openrc-20220320T232720Z.tar.xz

After getting distcc working I moved onto emerging system tools and then tried nodejs - this is where the brotli-1.0.9-r3 package first had the issue. I was able to emerge gdb and take a look, initially attempted to rebuild cmake after finding that generated the core file, this had the same error with cmake stack smashing.
Focused on that core dump and saw /lib64/libc.so.6 involved and used gentoolkit to confirm its in glibc so remerged like so - emerge -va1 =sys-libs/glibc-2.33-r13
That merged fine but obviously didn't fix the issue as really it was just the tools protecting the system as I later realised.
I've tried merging cmake with and without distcc enabled to no avail - though it's failing in the config stage that the pi does unless I'm totally mistaken.

Here's a quick copy of what I'm seeing (for future internet searchers)

Code: Select all

-- <<< Gentoo configuration >>>
Build type      RelWithDebInfo
Install path    /usr
Compiler flags:
C               -march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -no-pie -ggdb3
C++             -march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -no-pie -ggdb3
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed
Module          -Wl,-O1 -Wl,--as-needed
Shared          -Wl,-O1 -Wl,--as-needed

*** stack smashing detected ***: terminated
/var/tmp/portage/dev-util/cmake-3.22.2/temp/environment: line 847:    65 Aborted                 (core dumped) "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
Here's links for pastebin files of what I think is needed
dmesg - https://dpaste.com//98W4WGXZC
emerge --info - https://dpaste.com//BLHE4GYUG
cmake build.log - http://dpaste.com//7F87AYJYT

output of gdb --core core (from the build dir)

Code: Select all

Core was generated by `cmake -C /var/tmp/portage/dev-util/cmake-3.22.2/work/cmake-3.22.2_build/gentoo_'.
Program terminated with signal SIGABRT, Aborted.
output of gdb /usr/bin/cmake --core core

Code: Select all

Reading symbols from /usr/bin/cmake...
(No debugging symbols found in /usr/bin/cmake)
[New LWP 65]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `cmake -C /var/tmp/portage/dev-util/cmake-3.22.2/work/cmake-3.22.2_build/gentoo_'.
Program terminated with signal SIGABRT, Aborted.
#0  0x0000007f90e325f8 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x0000007f90e325f8 in raise () from /lib64/libc.so.6
#1  0x0000007f90e1ef0c in abort () from /lib64/libc.so.6
#2  0x0000007f90e6bb90 in ?? () from /lib64/libc.so.6
#3  0x0000007f90edda68 in __fortify_fail () from /lib64/libc.so.6
#4  0x0000007f90edda34 in __stack_chk_fail () from /lib64/libc.so.6
#5  0x000000555e6490d0 in ?? ()
#6  0x000000555e861f0c in ?? ()
#7  0x000000555e86d5c8 in ?? ()
#8  0x000000555e604c90 in ?? ()
#9  0x000000555e606694 in ?? ()
#10 0x000000555e611358 in ?? ()
#11 0x000000555e504844 in ?? ()
#12 0x000000555e4ee5d0 in ?? ()
#13 0x0000007f90e1f214 in __libc_start_main () from /lib64/libc.so.6
#14 0x000000555e4feef8 in ?? ()
(gdb) 
I can't rebuild cmake to include the symbols so I don't quite know what to do now, if anyone has advice that'd be most welcome

thanks

Michael
=== === === === === ===
doh
=== === === === === ===
Top
Post Reply
  • Print view
1 post • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic