LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-15-2010, 02:54 AM   #1
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Rep: Reputation: 34
Not able to compile the source rpm file


I am trying to build a source rpm file through a source rpm package but while compiling i am getting the below errors as,

[root@nisserver tmp]# ls
gconfd-root mapping-root ssh-kvrIrp2633
keyring-fgwCIY nmap-5.21-1.src.rpm virtual-root.2hSYRa
keyring-vx1pvB orbit-root

[root@nisserver tmp]# rpmbuild --rebuild nmap-5.21-1.src.rpm
Installing nmap-5.21-1.src.rpm
warning: user fyodor does not exist - using root
warning: group fyodor does not exist - using root
warning: user fyodor does not exist - using root
warning: group fyodor does not exist - using root
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.49535
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf nmap-5.21
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/nmap-5.21.tgz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nmap-5.21
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.73783
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd nmap-5.21
+ CFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export FFLAGS
+ ./configure --host=i686-redhat-linux-gnu --build=i686-redhat-linux-gnu --target=i386-redhat-linux --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info '--with-openssl=%{openssl}' --without-zenmap --with-ndiff --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included
checking whether NLS is requested... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking for i686-redhat-linux-gnu-gcc... no
checking for gcc... no
checking for i686-redhat-linux-gnu-cc... no
checking for cc... no
checking for i686-redhat-linux-gnu-cl.exe... no
checking for cl.exe... no
configure: error: in `/usr/src/redhat/BUILD/nmap-5.21':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
error: Bad exit status from /var/tmp/rpm-tmp.73783 (%build)


RPM build errors:
user fyodor does not exist - using root
group fyodor does not exist - using root
user fyodor does not exist - using root
group fyodor does not exist - using root
Bad exit status from /var/tmp/rpm-tmp.73783 (%build)

Can anyone tell me that what next step need to be taken to install the rpm file from the source file.

Thanks
 
Old 10-15-2010, 03:22 AM   #2
aries_baluyot
Member
 
Registered: Oct 2010
Location: India
Distribution: Mandriva, Suse, Ubuntu, Centos, Maemo, Omnia Xp
Posts: 86

Rep: Reputation: -11
Quote:
Originally Posted by smilemukul View Post
I am trying to build a source rpm file through a source rpm package but while compiling i am getting the below errors as,

[root@nisserver tmp]# ls
gconfd-root mapping-root ssh-kvrIrp2633
keyring-fgwCIY nmap-5.21-1.src.rpm virtual-root.2hSYRa
keyring-vx1pvB orbit-root

[root@nisserver tmp]# rpmbuild --rebuild nmap-5.21-1.src.rpm
Installing nmap-5.21-1.src.rpm
warning: user fyodor does not exist - using root
warning: group fyodor does not exist - using root
warning: user fyodor does not exist - using root
warning: group fyodor does not exist - using root
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.49535
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf nmap-5.21
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/nmap-5.21.tgz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nmap-5.21
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.73783
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd nmap-5.21
+ CFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export FFLAGS
+ ./configure --host=i686-redhat-linux-gnu --build=i686-redhat-linux-gnu --target=i386-redhat-linux --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info '--with-openssl=%{openssl}' --without-zenmap --with-ndiff --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included
checking whether NLS is requested... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking for i686-redhat-linux-gnu-gcc... no
checking for gcc... no
checking for i686-redhat-linux-gnu-cc... no
checking for cc... no
checking for i686-redhat-linux-gnu-cl.exe... no
checking for cl.exe... no
configure: error: in `/usr/src/redhat/BUILD/nmap-5.21':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
error: Bad exit status from /var/tmp/rpm-tmp.73783 (%build)


RPM build errors:
user fyodor does not exist - using root
group fyodor does not exist - using root
user fyodor does not exist - using root
group fyodor does not exist - using root
Bad exit status from /var/tmp/rpm-tmp.73783 (%build)

Can anyone tell me that what next step need to be taken to install the rpm file from the source file.

Thanks
try to search it in google
 
Old 10-15-2010, 04:51 AM   #3
T0sh1r0
Member
 
Registered: Oct 2010
Location: Liège, Belgium
Distribution: Debian / Slackware
Posts: 47
Blog Entries: 1

Rep: Reputation: 7
Quote:
Originally Posted by smilemukul View Post
(...)
checking for i686-redhat-linux-gnu-gcc... no
checking for gcc... no
checking for i686-redhat-linux-gnu-cc... no
checking for cc... no
checking for i686-redhat-linux-gnu-cl.exe... no
checking for cl.exe... no
configure: error: in `/usr/src/redhat/BUILD/nmap-5.21':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
error: Bad exit status from /var/tmp/rpm-tmp.73783 (%build)
(...)
Looks like you don't have a compiler available. Have you gcc installed on your machine?

If yes, it seems that its location is not in your PATH.
In that case, let's say gcc is in /usr/bin (do "which gcc" to find it and change /usr/bin in my examples by whatever you have found)
Then do "echo $PATH" and check if /usr/bin is in it.
If not, you have to update $PATH: "export PATH=$PATH:/usr/bin"

Hope this help

">
 
1 members found this post helpful.
Old 10-15-2010, 06:01 AM   #4
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Original Poster
Rep: Reputation: 34
I had installed the gcc package as below but still getting some error regarding "[makefile.dep] Error 127".

[root@nisserver BUILD]# pwd
/usr/src/redhat/BUILD
[root@nisserver BUILD]# which gcc
/usr/bin/gcc

Configuration complete. Type make (or gmake on some *BSD machines) to compile.
+ make
Makefile:341: makefile.dep: No such file or directory
g++ -MM -Iliblua -Ilibdnet-stripped/include -Ilibpcre -I%{openssl}/include -Ilibpcap -Inbase -Insock/include main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc osscan2.cc output.cc payload.cc scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc service_scan.cc NmapOutputTable.cc MACLookup.cc nmap_tty.cc nmap_dns.cc traceroute.cc portreasons.cc nse_main.cc nse_nsock.cc nse_fs.cc nse_nmaplib.cc nse_debug.cc nse_pcrelib.cc nse_binlib.cc nse_bit.cc nse_openssl.cc nse_ssl_cert.cc > makefile.dep
/bin/sh: g++: command not found
make: *** [makefile.dep] Error 127
error: Bad exit status from /var/tmp/rpm-tmp.81865 (%build)

Thanks
 
Old 10-16-2010, 11:56 PM   #5
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
Quote:
/bin/sh: g++: command not found
You have to install g++, which is a compiler for c plus plus. gcc is compiler only for c.
if you are using any redhat based distributions you can use

Quote:
yum install g++

to install g++
 
Old 10-17-2010, 03:22 AM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,822

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
by just using the wrong command on red hat
the wrong yum install gcc -- or -- g++
you are MISSING a bunch of things

there is a reason that there are software groups in the repos
USE THEM

Code:
yum grouplist
and from that list install the needed groups
-- names might be a bit different i am not on CentOS at the moment --
Code:
yum groupinstall " Development Tools" "Development Librarys" "Gnome Development Software"
 
Old 10-23-2010, 01:23 PM   #7
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Original Poster
Rep: Reputation: 34
Thanks guys.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Musicbrainz Picard rpm for opensuse 10.3: I'm unable to compile by its source... pepeq Linux - Software 2 11-05-2007 08:48 PM
compile apache source rpm with mod rewrite robertngo Linux - Software 3 07-21-2005 04:44 AM
where does it go when rpm a rpm source file feetyouwell Linux - Software 1 09-03-2004 05:14 PM
need compilers, other stuff to dl, compile from source or rpm binaries - Mandrake 9.1 Kristal Mandriva 6 09-02-2003 11:03 PM
Installing using both RPM and compile from source Silly22 Linux - Newbie 1 07-24-2003 05:53 PM


All times are GMT -5. The time now is 08:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration