Bug#785365: clang-3.5: undefined reference to `__stack_chk_guard'

Jakub Wilk jwilk at debian.org
Fri May 15 09:47:07 UTC 2015

Package: clang-3.5
Version: 1:3.5.2-1
Severity: important
Control: affects -1 src:afl

I can't build programs with stack protector enabled on some 
architectures (at least kfreebsd-*, powerpc, ppc64el):

$ echo 'int main(int argc, char **argv) { int x[99]; return 0; }' > test.c
$ clang-3.5 -fstack-protector-strong test.c
/tmp/test-9eb12a.o: In function `main':
test.c:(.text+0x11): undefined reference to `__stack_chk_guard'
test.c:(.text+0x2f): undefined reference to `__stack_chk_guard'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i386)

Kernel: kFreeBSD 9.0-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages clang-3.5 depends on:
ii  binutils                 2.25-7
ii  libc0.1                  2.19-18
ii  libc0.1-dev [libc6-dev]  2.19-18
ii  libclang-common-3.5-dev  1:3.5.2-1
ii  libclang1-3.5            1:3.5.2-1
ii  libedit2                 3.1-20150325-1
ii  libffi6                  3.1-2+b2
ii  libgcc-4.9-dev           4.9.2-16
ii  libgcc1                  1:5.1.1-5
ii  libllvm3.5               1:3.5.2-1
ii  libobjc-4.9-dev          4.9.2-16
ii  libstdc++-4.9-dev        4.9.2-16
ii  libstdc++6               5.1.1-5
ii  libtinfo5                5.9+20140913-1+b1
ii  zlib1g                   1:1.2.8.dfsg-2+b1

Versions of packages clang-3.5 recommends:
pn  llvm-3.5-dev  <none>
ii  python        2.7.9-1

Jakub Wilk

More information about the Pkg-llvm-team mailing list