Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LDFLAG --as-needed / Speeding up of GNOME or KDE
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 9, 10, 11  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
namo
n00b
n00b


Joined: 29 Jun 2004
Posts: 28
Location: Berkeley

PostPosted: Sat May 06, 2006 7:22 am    Post subject: Reply with quote

Hello,

while trying to compile kdemultimedia-arts-3.5.2 with gcc-4.1.0 and --as-needed, I come across this error :
Code:
/bin/sh ../../libtool --silent --mode=link --tag=CXX i686-pc-linux-gnu-g++  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -pipe -Os -march=pentium-m -ftracer -fweb -fomit-frame-pointer -fvisibility-inlines-hidden -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION   -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -o artsbuilder -L/usr/kde/3.5/lib -L/usr/qt/3/lib -L/usr/lib -Wl,--as-needed -Wl,--enable-new-dtags  -R /usr/kde/3.5/lib -R /usr/kde/3.5/lib -R /usr/qt/3/lib -R /usr/lib artsbuilder.all_cpp.o  -lkio -lqtmcop -lX11  -lpthread ../../arts/runtime/libartsbuilder.la -lsoundserver_idl -lartskde

artsbuilder.all_cpp.o: In function `char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<char> const&, std::forward_iterator_tag)':

artsbuilder.all_cpp.cpp:(.text._ZNSs12_S_constructIN9__gnu_cxx17__normal_iteratorIPcSsEEEES2_T_S4_RKSaIcESt20forward_iterator_tag[char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<char> const&, std::forward_iterator_tag)]+0x47): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_set_length_and_sharable(unsigned int)'

Basically it can't find std::string, probably because of --as-needed, so I change the command, adding -lstdc++ :
Quote:
/bin/sh ../../libtool --silent --mode=link --tag=CXX i686-pc-linux-gnu-g++ -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -pipe -Os -march=pentium-m -ftracer -fweb -fomit-frame-pointer -fvisibility-inlines-hidden -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -o artsbuilder -L/usr/kde/3.5/lib -L/usr/qt/3/lib -L/usr/lib -Wl,--as-needed -Wl,--enable-new-dtags -R /usr/kde/3.5/lib -R /usr/kde/3.5/lib -R /usr/qt/3/lib -R /usr/lib artsbuilder.all_cpp.o -lstdc++ -lkio -lqtmcop -lX11 -lpthread ../../arts/runtime/libartsbuilder.la -lsoundserver_idl -lartskde

And it works. However, I would like to automate this, and provide patch that could be useful to everyone. I couldn't find where this command comes from - I have very limited knowledge of the autotools. Could someone point me in the right direction ?

Thanks !
Back to top
View user's profile Send private message
nabla²
Apprentice
Apprentice


Joined: 17 May 2005
Posts: 280

PostPosted: Fri Jun 09, 2006 8:41 pm    Post subject: Reply with quote

app-text/gocr fails as well.
_________________
Gentoo on Intel Core Duo 2 E6750, Gigabyte P35-DS3P, NVIDIA 8800GTS (amd64)
Back to top
View user's profile Send private message
nabla²
Apprentice
Apprentice


Joined: 17 May 2005
Posts: 280

PostPosted: Sat Jun 10, 2006 2:34 pm    Post subject: Reply with quote

media-gfx/autotrace compiles but fails when executing (cannot find acos function when compiling lilypond).
_________________
Gentoo on Intel Core Duo 2 E6750, Gigabyte P35-DS3P, NVIDIA 8800GTS (amd64)
Back to top
View user's profile Send private message
hans0r
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2005
Posts: 122
Location: Germany

PostPosted: Sun Jun 11, 2006 9:02 pm    Post subject: Reply with quote

x11-misc/qcomicbook-0.2.4 fails
Back to top
View user's profile Send private message
LXj
Tux's lil' helper
Tux's lil' helper


Joined: 03 Dec 2005
Posts: 107

PostPosted: Thu Jun 15, 2006 1:10 pm    Post subject: Reply with quote

I've set in make.conf:
Code:
LDFLAGS="-Wl,-O1 -Wl,--sort-common --enable-new_ldflags"


Then I tried to emerge some small packages and got the following error during ./configure:
Code:
checking for i686-pc-linux-gnu-gcc... (cached) gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.



UPD: Excluding --enable-new_ldflags fixes the problem
Back to top
View user's profile Send private message
vipernicus
Veteran
Veteran


Joined: 17 Jan 2005
Posts: 1462
Location: Your College IT Dept.

PostPosted: Thu Jun 15, 2006 1:26 pm    Post subject: Reply with quote

LXj wrote:
I've set in make.conf:
Code:
LDFLAGS="-Wl,-O1 -Wl,--sort-common --enable-new_ldflags"


Then I tried to emerge some small packages and got the following error during ./configure:
Code:
checking for i686-pc-linux-gnu-gcc... (cached) gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.



UPD: Excluding --enable-new_ldflags fixes the problem


The proper format would be:

Code:
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new_ldflags"


I don't really see any use for you to use --enable-new_ldflags, because if you are running ~x86, then --as-needed shouldn't give you but one or two fails.
_________________
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Back to top
View user's profile Send private message
LXj
Tux's lil' helper
Tux's lil' helper


Joined: 03 Dec 2005
Posts: 107

PostPosted: Thu Jun 15, 2006 4:26 pm    Post subject: Reply with quote

Thanx for the answer!

vipernicus wrote:
I don't really see any use for you to use --enable-new_ldflags, because if you are running ~x86, then --as-needed shouldn't give you but one or two fails.
Sorry, I don't understand you...

Shall I have failed emerges with my LDFLAGS? But it's written in a first post that --enable-new_ldflags will not enable --as-needed for packages which doesn't support it?
Back to top
View user's profile Send private message
pussi
l33t
l33t


Joined: 08 May 2004
Posts: 727
Location: Finland

PostPosted: Thu Jun 15, 2006 5:29 pm    Post subject: Reply with quote

He means almost every package on ~x86 should work with --as-needed, and afaik there's only a few packages that accept --enable-new_ldflags.
Back to top
View user's profile Send private message
nxsty
Veteran
Veteran


Joined: 23 Jun 2004
Posts: 1556
Location: .se

PostPosted: Thu Jun 15, 2006 7:57 pm    Post subject: Reply with quote

pussi wrote:
He means almost every package on ~x86 should work with --as-needed, and afaik there's only a few packages that accept --enable-new_ldflags.


--enable-new-ldlflags is a KDE configure option. It's nothing you should put in your LDFLAGS and it doesn't work for anything but KDE packages.
Back to top
View user's profile Send private message
LXj
Tux's lil' helper
Tux's lil' helper


Joined: 03 Dec 2005
Posts: 107

PostPosted: Thu Jun 15, 2006 8:03 pm    Post subject: Reply with quote

Ah, thanks for replies. I didn't know that from first post...
Back to top
View user's profile Send private message
ZeuZ_NG
Guru
Guru


Joined: 10 Sep 2008
Posts: 453
Location: Near /dev/urandom | /dev/null

PostPosted: Wed Jan 28, 2009 7:34 am    Post subject: Reply with quote

Since the last post is from mid 2006, any update on the work in progress here?
I guess I'll just attain to -Wl -O1
_________________
| Intel Core i7 920. | Intel DX58SO Extreme. |
| 8gb DDR3 1666mHz | 1TB 7200 RPM WD HDD.|
Unix´s guru view of sex:
unzip ; strip ; touch ; grep ; finger ; \
mount ; fsck ; more ; yes ; umount ; sleep.
Back to top
View user's profile Send private message
Xake
Guru
Guru


Joined: 11 Feb 2004
Posts: 588
Location: Göteborg, the rainy part of scandinavia

PostPosted: Wed Jan 28, 2009 9:46 pm    Post subject: Reply with quote

ZeuZ_NG wrote:
Since the last post is from mid 2006, any update on the work in progress here?
I guess I'll just attain to -Wl -O1


The only update I can give you is to look in the bugzilla and at the gentoo-dev mailinglist. Flameeyes and a couple of other people has been pushing makeing as-needed into the default compile-rules. Go search the bugzilla for more info.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Wed Jan 28, 2009 10:19 pm    Post subject: Reply with quote

Xake wrote:
ZeuZ_NG wrote:
Since the last post is from mid 2006, any update on the work in progress here?
I guess I'll just attain to -Wl -O1


The only update I can give you is to look in the bugzilla and at the gentoo-dev mailinglist. Flameeyes and a couple of other people has been pushing makeing as-needed into the default compile-rules. Go search the bugzilla for more info.

A quick look at /usr/portage/profiles/default/linux/make.defaults gives:
Code:
# 2008/07/09 - Doug Goldstein <cardoe@gentoo.org>
# Adding LDFLAGS="-Wl,-O1 for all Linux profiles by default
# after discussion on the gentoo-dev ML. As we bang out a clear
# direction with how LDFLAGS will be set by default, this entry
# may move.
LDFLAGS="-Wl,-O1"

Also binutils are compiled with --hash-style=both by default, so adding --hash-style=gnu is perfectly safe.

--as-needed works for most ebuilds in portage too.

The emul-linux-x86 binary packages are compiled with those 3 flags set.
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
ZeuZ_NG
Guru
Guru


Joined: 10 Sep 2008
Posts: 453
Location: Near /dev/urandom | /dev/null

PostPosted: Wed Jan 28, 2009 10:27 pm    Post subject: Reply with quote

Thanks for the update, guys..
Yeah, good for them to be doing this since even if there's no noticeable or no speed upgrade at all, keeping dependecies that are not actually needed away from software seems like a good motion to keep things ordered
_________________
| Intel Core i7 920. | Intel DX58SO Extreme. |
| 8gb DDR3 1666mHz | 1TB 7200 RPM WD HDD.|
Unix´s guru view of sex:
unzip ; strip ; touch ; grep ; finger ; \
mount ; fsck ; more ; yes ; umount ; sleep.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3 ... 9, 10, 11
Page 11 of 11

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum