I cannot build any of the “hello world” programs using kdevelop after upgrading from 10.1 to 11.1 The programs automake and compile fine, but then the linker goes into a loop. I have a gut feeling that kdevelop is pointing to the wrong libraries. How do I either:
Fix the linker issues?
or
Get the installer to perform a truely clean install?
Did you do a “top” to see if the linker (gcc or g++ or ld) is really running?
Get the installer to perform a truely clean install?
In this case, I would save as a minimum /var, /etc, /root to an alternate partition and save the output of “rpm -qa | sort” to the alternate location. Hopefully, your /home is on a different partition than /.
Here’s the output I get when I try to build “hello world”
cd ‘/home/stuart/GA/hello/debug’ && WANT_AUTOCONF_2_5=“1” WANT_AUTOMAKE_1_6=“1” LC_MESSAGES=“C” LC_CTYPE=“C” gmake -k
gmake all-recursive
Making all in src
linking hello (libtool)
/bin/sh: …/libtool: Too many open files in system
…/libtool: cannot make pipe for command substitution: Too many open files in system
…/libtool: line 718: *** Warning: inferring the mode of operation is deprecated.: command not found
…/libtool: line 719: *** Future versions of Libtool will require -mode=MODE be specified.: command not found
…/libtool: line 751: : warning: cannot infer operation mode without MODE-ARGS: command not found
…/libtool: line 6512: : you must specify a MODE: command not found
…/libtool: line 6513: Try ` --help’ for more information.: command not found
…/libtool: cannot make pipe for command substitution: Too many open files in system
…/libtool: line 718: *** Warning: inferring the mode of operation is deprecated.: command not found
…/libtool: line 719: *** Future versions of Libtool will require -mode=MODE be specified.: command not found
…/libtool: line 751: : warning: cannot infer operation mode without MODE-ARGS: command not found
The error messages just loop forever.
If I try to build a hello world program using the command line, the results are more perplexing. A “C” style hello world program using printf works just fine. However a “C++” style hello world program gives the following errors:
stuart@linux-bzjh:~/GA/hello/src> gcc hello.cpp
/tmp/ccWPn1dP.o: In function main': hello.cpp:(.text+0x1c): undefined reference to std::cout’
/tmp/ccWPn1dP.o: In function `__static_initialization_and_destruction_0(int, int)’:
Messages snipped
hello.cpp:(.text+0x60): undefined reference to std::ios_base::Init::Init()' hello.cpp:(.text+0x65): undefined reference to std::ios_base::Init::~Init()’
/tmp/ccWPn1dP.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0’
collect2: ld returned 1 exit status
Is there any easy way to fix this?
Also, I’ve copied everything I care about to a USB drive. What is the easiest way to perform a clean install? I choose “install” when I upgraded, but it looks like the installer left most of the old system intact.
When you make a hello world outside kdevelop, use “g++” rather than “gcc.” If you use gcc, the error you show appears.
g++ -o hello hello.c
Now, your kdevelop issue is most likely because it was compiled with an old set of libraries. In the top level directory of your kdevelop project, enter
make distclean
and then, inside kdevelop, run automake and friends and build.
When you make a hello world outside kdevelop, use “g++” rather than “gcc.” If you use gcc, the error you show appears.
Code:
g++ -o hello hello.c
Yes, that fixed one problem. Thanks.
Now, your kdevelop issue is most likely because it was compiled with an old set of libraries. In the top level directory of your kdevelop project, enter
Code:
make distclean
and then, inside kdevelop, run automake and friends and build.
The project was created after I upgraded. I tried cleaning and rebuilding everything a few times, but no luck.
I tried building the kdevelop program from the command line. Here’s the output:
stuart@linux-bzjh:~/GA/hello/debug/src> make
/bin/sh ../libtool --tag=CXX --mode=link g++ -O0 -g3 -o hello hello.o
../libtool: line 457: /usr/bin/sed: Too many open files in system
/bin/sh: ../libtool: Too many open files in system
../libtool: cannot make pipe for command substitution: Too many open files in system
../libtool: line 718: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 719: *** Future versions of Libtool will require -mode=MODE be specified.: command not found
../libtool: line 751: : warning: cannot infer operation mode without MODE-ARGS: command not found
../libtool: line 6512: : you must specify a MODE: command not found
../libtool: line 6513: Try ` --help' for more information.: command not found
../libtool: cannot make pipe for command substitution: Too many open files in system
Check all the repositories in /etc/zypp/repos.d and verify they are 11.1 repos rather than 11.0. You can do this with the yast “Software -> Software Repositories” tool.
Check the versions of libtool and kdevelop against what is in the 11.1 repository. The command
rpm -q libtool kdevelop3
will show what your have.
Force an refresh of libtool and kdevelop. I’m not sure how to do with yast. The command line equivalent is