Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
glibc failing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ca_grover
Apprentice
Apprentice


Joined: 08 Jun 2003
Posts: 150
Location: Canada, Eh?

PostPosted: Wed Mar 23, 2005 5:59 am    Post subject: glibc failing Reply with quote

I'm on a relatively recent install (2 weeks old), and have done an emerge sync, then emerge world to do a quick update of my system. However glibc keeps failing on me and I can't figure out how to fix this. here's the error:
Code:
bash-2.05b# emerge glibc -Davt

These are the packages that I would merge, in reverse order:

Calculating dependencies ...done!
[ebuild     U ] sys-libs/glibc-2.3.4.20041102-r1 [2.3.4.20040808-r1] -build -debug -erandom -hardened(-multilib) +nls -nomalloccheck -nptl -nptlonly -pic -userlocales 0 kB

#....  snipped a bunch ....

checking for autoconf... autoconf
checking whether autoconf works... yes
checking whether ranlib is necessary... no
checking LD_LIBRARY_PATH variable... contains current directory
configure: error:
*** LD_LIBRARY_PATH shouldn't contain the current directory when
*** building glibc. Please change the environment variable
*** and run configure again.


Things I've tried:
unset LD_LIBRARY_PATH (before calling the emerge glibc)
env-update
etc-update (handling any config files), then env-update
setting an entry in /etc/portage/packages.keywords for "=sys-libs/glibc-2.3.4.20040808-r1" (though I think this might have been in the wrong file).

It seems something in the ebuild is setting a value into LD_LIBRARY_PATH that's messing up the compile. Is there anything I can do to my machine to fix this? (short of debugging an ebuild - I don't think I'm ready for that yet...) This problem will prevent emerge world from working for me...:cry:

Thanks for any tips.
Back to top
View user's profile Send private message
diastelo
Guru
Guru


Joined: 23 Feb 2004
Posts: 521

PostPosted: Wed Mar 23, 2005 2:24 pm    Post subject: Reply with quote

I'd look in /etc/ld.so.conf and /etc/ld.so.conf.d, if it exists. Past that, I'd try running ldconfig manually as root.
_________________
"No question is so difficult to answer as that to which the answer is obvious" -- George Bernard Shaw
Back to top
View user's profile Send private message
ca_grover
Apprentice
Apprentice


Joined: 08 Jun 2003
Posts: 150
Location: Canada, Eh?

PostPosted: Thu Mar 24, 2005 1:13 am    Post subject: Reply with quote

Thanks diastelo.

I had no luck looking in /etc/ld.so.conf or trying ldconfig as root. However you pointed me in the right direction. There is a note in the ld.so.conf file to not edit that file directly, but to modify the settings in the files in /etc/env.d. I checked that directory, and found 2 entries for gcc - 05gcc-i686-pc-linux-gnu and 05gcc. Neither of these files had the LD_LIBRARY_PATH variable. Then I remembered that grep is a great tool for finding text in a series of files. So, did
Code:
grep LD_LIBRARY_PATH *
from in the /etc/env.d directory. Wouldn't you know it, but Cold Fusion 7 sets a file in there, and sets the variable. (and here I was so proud that I finally got CF running under Linux). The contents of the file (22cfusion) are
Code:

# Establish variables
CF_HOME="/opt/tomcat/webapps/cfusion"
CF_WEB_INF=$CF_HOME/WEB-INF

# Add binary file directories to the system path
CF_SHARED_LIB=$CF_WEB_INF/cfusion/lib
CF_SHARED_LIBS=$CF_SHARED_LIB:$CF_SHARED_LIB/_ilnx21/bin
LD_LIBRARY_PATH="$CF_SHARED_LIBS:$LD_LIBRARY_PATH"
# If using sandbox security,
# establish security JVM options (all on one line).
CF_SECURITY_JVM_OPTIONS="-Djava.security.manager \
-Djava.security.policy=$CF_WEB_INF/cfusion/lib/coldfusion.policy \
-Djava.security.auth.policy=$CF_WEB_INF/cfusion/lib/neo_jaas.policy"

# Establish graphics JVM options (all on one line).
# For JDK 1.4.1 and higher, specify
# com.gp.java2d.ExHeadlessGraphicsEnvironment instead of
# com.gp.java2d.ExGraphicsEnvironment.
CF_GRAPHICS_JVM_OPTIONS="-Xbootclasspath/a:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar:\
$JAVA_HOME/lib/dt.jar:$JAVA_HOME/jre/lib/i18n.jar:$CF_WEB_INF/cfusion/lib/webchartsJava2D.jar
-Dcom.gp.java2d.ExHeadlessGraphicsEnvironment"

JAVA_OPTS="$CF_JVM_OPTIONS -Xms128m -Xmx256m -Dfile.encoding=iso8859-1"


So, I commented out the LD_LIBRARY_PATH line, then did
Code:
unset LD_LIBRARY_PATH
and ran env-update. Then tried to emerge glibc, and it's compiling as we speak (er type...).

Hopefully this info helps someone else out....
Back to top
View user's profile Send private message
bwallis42
n00b
n00b


Joined: 18 Aug 2005
Posts: 1

PostPosted: Sun Nov 27, 2005 12:37 am    Post subject: Reply with quote

Thanks! Helped me too.

In my case I found LD_LIBRARY_PATH was being set in /etc/profile.env and /etc/env.d/00basic, in both cases it was being set to /usr/lib which I don't think is necessary. Commented them out and now glibc is building nicely.

I have just been skipping the glibc update for the last few months, never bothered trying to fix it. Now all is good.
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sun Nov 27, 2005 10:18 am    Post subject: Reply with quote

Moved from Installing Gentoo to Portage & Programming.
Gentoo is already installed, so not an installing gentoo problem.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
dave_deu
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2005
Posts: 97
Location: East Anglia, UK

PostPosted: Sun Apr 30, 2006 7:41 pm    Post subject: Reply with quote

I used to have a problem that glibc-2.3.6-r3 would not emerge because "LD_LIBRARY_PATH shouldn't contain the current directory".

I solved this problem after reading your post. The solution was to type as root:

Code:
unset LD_LIBRARY_PATH
env-update
emerge glibc


Thanks for the indirect help!
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 487
Location: Sao Paulo, Brazil

PostPosted: Wed Jul 06, 2011 1:35 pm    Post subject: Reply with quote

Hi there,
This post seems to be rather old, however, it still useful. The dave_deu way did the trick.
G'Luck,
ferreirafm
Back to top
View user's profile Send private message
step
Apprentice
Apprentice


Joined: 16 May 2002
Posts: 198

PostPosted: Wed Oct 31, 2012 9:41 pm    Post subject: Reply with quote

ferreirafm wrote:
Hi there,
This post seems to be rather old, however, it still useful. The dave_deu way did the trick.
G'Luck,
ferreirafm


it's still useful :)
Back to top
View user's profile Send private message
eruvaer_ohta
n00b
n00b


Joined: 18 Jul 2007
Posts: 23

PostPosted: Sat Oct 19, 2019 5:00 pm    Post subject: Reply with quote

I do notice that this thread is ancient, but I can say from experience that googling for glibc emerge failing because of LD_LIBRARY_PATH, it still comes up.
After having used the workaround mentioned by dave_deu several times in the past, I finally decided to try to understand what LD_LIBRARY_PATH does and why glibc complains about it containing the current directory.
As mentioned in https://joshumax.github.io/general/2017/06/08/how-torch-broke-ls.html, a trailing colon in LD_LIBRARY_PATH causes the dynamic linker ld.so to add the current directory. As detailed in the linked article, this can lead to strange bugs and it can actually pose a significant security problem.
Moreover, according to http://xahlee.info/UnixResource_dir/_/ldpath.html and https://www.hpc.dtu.dk/?page_id=1180, it is more generally a very bad idea to set LD_LIBRARY_PATH globally.
In my case, it was set in the root .bashrc from a very old installation of CUDA. So the takeaway for me is to not just unset LD_LIBRARY_PATH for emerging glibc, but to solve the more fundamental problem that this variable is set at all in a global way.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
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