openSUSE Forums > Install/Boot/Login » Cannot build "hello world" after upgrading 10.1 -> 11.1

Go Back   openSUSE Forums > Install/Boot/Login
Forums FAQ Members List Search Today's Posts Mark Forums Read


Install/Boot/Login Questions about installation, login, boot issues, partitioning, file systems, software that runs at boot (GRUB, LILO, boot scripts)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-Mar-2009, 19:00
Puzzled Penguin
 
Join Date: Mar 2009
Posts: 3
stuart_nj hasn't been rated much yet
Default Cannot build "hello world" after upgrading 10.1 -> 11.1

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?

Thanks in advance to for any help.
Reply With Quote
  #2 (permalink)  
Old 07-Mar-2009, 08:41
Student Penguin
 
Join Date: Aug 2008
Location: Temporarily, planet Earth
Posts: 50
BotKeeper hasn't been rated much yet
Default Re: Cannot build "hello world" after upgrading 10.1 -> 11.1

Quote:
Originally Posted by stuart_nj View Post
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?
Did you do a "top" to see if the linker (gcc or g++ or ld) is really running?

Quote:
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 /.
Reply With Quote
  #3 (permalink)  
Old 07-Mar-2009, 11:46
Puzzled Penguin
 
Join Date: Mar 2009
Posts: 3
stuart_nj hasn't been rated much yet
Default Re: Cannot build "hello world" after upgrading 10.1 -> 11.1

The linker appears to be running.

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.
Reply With Quote
  #4 (permalink)  
Old 07-Mar-2009, 14:49
Student Penguin
 
Join Date: Aug 2008
Location: Temporarily, planet Earth
Posts: 50
BotKeeper hasn't been rated much yet
Default Re: Cannot build "hello world" after upgrading 10.1 -> 11.1

Two things to try.

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
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.
Reply With Quote
  #5 (permalink)  
Old 07-Mar-2009, 15:45
Puzzled Penguin
 
Join Date: Mar 2009
Posts: 3
stuart_nj hasn't been rated much yet
Default Re: Cannot build "hello world" after upgrading 10.1 -> 11.1

Quote:
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.

Quote:
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:
Code:
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
Any suggestions?
Reply With Quote
  #6 (permalink)  
Old 07-Mar-2009, 16:39
Student Penguin
 
Join Date: Aug 2008
Location: Temporarily, planet Earth
Posts: 50
BotKeeper hasn't been rated much yet
Default Re: Cannot build "hello world" after upgrading 10.1 -> 11.1

A few more suggestions.
  1. 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.
  2. Check the versions of libtool and kdevelop against what is in the 11.1 repository. The command
    Code:
    rpm -q libtool kdevelop3
    will show what your have.
  3. Force an refresh of libtool and kdevelop. I'm not sure how to do with yast. The command line equivalent is
    Code:
    zypper install -f libtool kdevelop3
Reply With Quote
Reply

Bookmarks

Tags
hello world, kdevelop, upgrade


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2