Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581402 - Compiling dev-libs/libgcrypt-1.7.0 with gcc-4* and -O[23] CFLAGS fails with "undefined reference to `__warn_memset_zero_len'"
Summary: Compiling dev-libs/libgcrypt-1.7.0 with gcc-4* and -O[23] CFLAGS fails with "...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-27 22:49 UTC by Peter Levine
Modified: 2016-07-11 11:30 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,21.30 KB, text/plain)
2016-04-27 22:51 UTC, Peter Levine
Details
libgcrypt-1.7.0.ebuild.patch (libgcrypt-1.7.0.ebuild.patch,778 bytes, patch)
2016-04-27 22:57 UTC, Peter Levine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Levine 2016-04-27 22:49:40 UTC
Using -O2 or -O3 CFLAGS and compiling with x86_64-pc-linux-gnu-gcc-4.9.2 or cross-compiling with armv7a-hardfloat-linux-gnueabi-gcc-4.9.2 causes failure in the compile phase with error "./.libs/libgcrypt.so: undefined reference to `__warn_memset_zero_len'". This is a known problem with gcc-4*. It builds fine with -O1 or when using gcc-5*.
Comment 1 Peter Levine 2016-04-27 22:51:05 UTC
Created attachment 432352 [details]
emerge --info
Comment 2 Peter Levine 2016-04-27 22:57:26 UTC
Created attachment 432354 [details, diff]
libgcrypt-1.7.0.ebuild.patch

Patch for libgcrypt-1.7.0.ebuild to change -O? to -O1 when using gcc-4*
Comment 3 Kristian Fiskerstrand (RETIRED) gentoo-dev 2016-06-17 20:48:42 UTC
(In reply to Peter Levine from comment #2)
> Created attachment 432354 [details, diff] [details, diff]
> libgcrypt-1.7.0.ebuild.patch
> 
> Patch for libgcrypt-1.7.0.ebuild to change -O? to -O1 when using gcc-4*

(In reply to Peter Levine from comment #0)
> Using -O2 or -O3 CFLAGS and compiling with x86_64-pc-linux-gnu-gcc-4.9.2 or
> cross-compiling with armv7a-hardfloat-linux-gnueabi-gcc-4.9.2 causes failure
> in the compile phase with error "./.libs/libgcrypt.so: undefined reference
> to `__warn_memset_zero_len'". This is a known problem with gcc-4*. It builds
> fine with -O1 or when using gcc-5*.

its not a generic issue, I'm building it successfully with -O2 and gcc 4.9.3. Do you have any references for the known issues? Also, please add configure and build logs
Comment 4 Mark Tomich 2016-06-23 10:05:44 UTC
(In reply to Peter Levine from comment #0)
> Using -O2 or -O3 CFLAGS and compiling with x86_64-pc-linux-gnu-gcc-4.9.2 or
> cross-compiling with armv7a-hardfloat-linux-gnueabi-gcc-4.9.2 causes failure
> in the compile phase with error "./.libs/libgcrypt.so: undefined reference
> to `__warn_memset_zero_len'". This is a known problem with gcc-4*. It builds
> fine with -O1 or when using gcc-5*.

Like Peter, I can't compile libgcrypt with gcc v4.9.3 and -O2.  However -O1 works.
Comment 5 Kristian Fiskerstrand (RETIRED) gentoo-dev 2016-06-23 10:14:31 UTC
(In reply to Mark Tomich from comment #4)
> (In reply to Peter Levine from comment #0)
> > Using -O2 or -O3 CFLAGS and compiling with x86_64-pc-linux-gnu-gcc-4.9.2 or
> > cross-compiling with armv7a-hardfloat-linux-gnueabi-gcc-4.9.2 causes failure
> > in the compile phase with error "./.libs/libgcrypt.so: undefined reference
> > to `__warn_memset_zero_len'". This is a known problem with gcc-4*. It builds
> > fine with -O1 or when using gcc-5*.
> 
> Like Peter, I can't compile libgcrypt with gcc v4.9.3 and -O2.  However -O1
> works.

Can you provide details as requested in comment 3?
Comment 6 Kristian Fiskerstrand (RETIRED) gentoo-dev 2016-07-11 11:30:28 UTC
(In reply to Kristian Fiskerstrand from comment #5)
> (In reply to Mark Tomich from comment #4)
> > (In reply to Peter Levine from comment #0)
> > > Using -O2 or -O3 CFLAGS and compiling with x86_64-pc-linux-gnu-gcc-4.9.2 or
> > > cross-compiling with armv7a-hardfloat-linux-gnueabi-gcc-4.9.2 causes failure
> > > in the compile phase with error "./.libs/libgcrypt.so: undefined reference
> > > to `__warn_memset_zero_len'". This is a known problem with gcc-4*. It builds
> > > fine with -O1 or when using gcc-5*.
> > 
> > Like Peter, I can't compile libgcrypt with gcc v4.9.3 and -O2.  However -O1
> > works.
> 
> Can you provide details as requested in comment 3?

Closing needinfo, reopen if able to reproduce and provide needed debug details as requested