Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 851225 - net-libs/webkit-gtk-2.36.1 compile fails ld when compiled with "-Os"
Summary: net-libs/webkit-gtk-2.36.1 compile fails ld when compiled with "-Os"
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-11 16:23 UTC by Martin
Modified: 2022-07-13 10:18 UTC (History)
1 user (show)

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


Attachments
var_tmp_portage_net-libs_webkit-gtk-2.36.3_temp_with-Os-build.log (var_tmp_portage_net-libs_webkit-gtk-2.36.3_temp_with-Os-build.log.xz,109.59 KB, application/x-xz)
2022-06-19 23:26 UTC, Martin
Details
var_tmp_portage_net-libs_webkit-gtk-2.36.3_temp_with-Os-environment (var_tmp_portage_net-libs_webkit-gtk-2.36.3_temp_with-Os-environment,157.19 KB, text/plain)
2022-06-19 23:29 UTC, Martin
Details
emerge--info_with-Os-build.txt (emerge--info_with-Os-build.txt,8.19 KB, text/plain)
2022-06-19 23:30 UTC, Martin
Details
emerge-1v-webkit-gtk-2.36.3_with-O3_build.log (emerge-1v-webkit-gtk-2.36.3_with-O3_build.log.xz,114.41 KB, application/x-xz)
2022-06-19 23:32 UTC, Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 2022-06-11 16:23:34 UTC
Compiling with "-Os" set in /etc/portage/make.conf:

CFLAGS="-march=native -mtune=native -Os -fomit-frame-pointer -pipe -fstack-protector-strong"
CXXFLAGS="${CFLAGS}"

gives the following fail during emerge:

/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: lib/../Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-68aea4ac-6.cpp.o: in function `WebCore::getBackingMap(JSC::JSGlobalObject&, JSC::J
SObject&)':
UnifiedSource-68aea4ac-6.cpp:(.text+0x6143): undefined reference to `JSC::HashMapImpl<JSC::HashMapBucket<JSC::HashMapBucketDataKeyValue> >::finishCreation(JSC::JSGlobalObject*, JSC::VM&)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
 * ERROR: net-libs/webkit-gtk-2.36.1::gentoo failed (compile phase):
 *   ninja -v -j7 -l0 failed
 * 
 * Call stack:
 *     ebuild.sh, line  127:  Called src_compile
 *   environment, line 4029:  Called cmake_src_compile
 *   environment, line 1755:  Called cmake_build
 *   environment, line 1724:  Called eninja
 *   environment, line 2250:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"


The ld fail occurs for each of:

net-libs/webkit-gtk-2.36.1
net-libs/webkit-gtk-2.36.2
net-libs/webkit-gtk-2.36.3


Workaround:

Compiling using instead "-O3" completes fine.

(Use of -O3 specifically for net-libs/webkit-gtk can be set using /etc/portage/package.env)



FYI:

$ ninja --version
1.11.0

$ gcc --version
gcc (Gentoo 11.3.0 p4) 11.3.0

$ ld --version
ls (GNU coreutils) 8.32
Packaged by Gentoo (8.32-r1 (p0))
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-11 20:34:33 UTC
Please include the full build.log and emerge --info.
Comment 2 Martin 2022-06-19 23:26:26 UTC
Created attachment 786347 [details]
var_tmp_portage_net-libs_webkit-gtk-2.36.3_temp_with-Os-build.log
Comment 3 Martin 2022-06-19 23:29:43 UTC
Created attachment 786350 [details]
var_tmp_portage_net-libs_webkit-gtk-2.36.3_temp_with-Os-environment
Comment 4 Martin 2022-06-19 23:30:39 UTC
Created attachment 786353 [details]
emerge--info_with-Os-build.txt
Comment 5 Martin 2022-06-19 23:32:23 UTC
Created attachment 786356 [details]
emerge-1v-webkit-gtk-2.36.3_with-O3_build.log
Comment 6 Martin 2022-06-19 23:43:26 UTC
(In reply to Sam James from comment #1)
> Please include the full build.log and emerge --info.

Attached as listed above for the failed case for building with -Os (gcc-11.3.0).


There is also a successful build log attached for the example for using -O3 set in /etc/portage/make.conf

(For some reason, bugs.gentoo.org gives a server error for attempting to upload any further attachments...)


Aside:

Using -Os with gcc-10.3.1 gives the same ld fail.

And /etc/portage/package.env appears to be ignored for attempting to set -O3 in there for webkit. Another bug to note?


Regards,
Martin
Comment 7 Martin 2022-06-19 23:44:32 UTC
Also note the current similar bug for https://bugs.gentoo.org/840861 ?
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-21 01:25:48 UTC
(In reply to Martin from comment #6)
> (In reply to Sam James from comment #1)
> > Please include the full build.log and emerge --info.
> 
> Attached as listed above for the failed case for building with -Os
> (gcc-11.3.0).
> 
> 
> There is also a successful build log attached for the example for using -O3
> set in /etc/portage/make.conf
> 
> (For some reason, bugs.gentoo.org gives a server error for attempting to
> upload any further attachments...)

This usually happens when trying to attach a file your user can't access. It's a bad error message.
> 
> 
> Aside:
> 
> Using -Os with gcc-10.3.1 gives the same ld fail.
> 
> And /etc/portage/package.env appears to be ignored for attempting to set -O3
> in there for webkit. Another bug to note?
> 

Not sure why that'd be. It should work fine. But I'd use -O2.

> 
> Regards,
> Martin