LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 08-02-2004, 03:03 PM   #1
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
A good practice for compiling?


This is silly, but I use Mandrake 9.1. I have NEVER been able to compile anything. yes, I've heard of the good old ./configure, make, make install but it NEVER works. There's always some error that comes out of all this and it's really annoying. So as a compiling n00b, can someone refer me to an easy program that can be compiled easily so I can tell myself "YES! I actually compiled something without a problem!!!"
 
Old 08-02-2004, 03:13 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try this:
1) Create a file called "hi.c" containing:
Code:
#include <stdio.h>

int main(void)
{
    printf( "Hello World!\n" );

    return 0;
}
2) Compile it:
gcc hi.c -o hi
3) Run it:
./hi

The chances are that you have some key libraries missing which are causing your other compilation problems. The next time you try to compile something post the last lines of the otuput where the error first occured and somebody should be able to help. Also try googling for the error you receive.
 
Old 08-02-2004, 10:30 PM   #3
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
Cool! I don't know what the programming lingo is, but it worked! Now I want to move onto the "real" stuff. Any other easy software compilations? cheesy 2D games? text based stuff?
 
Old 08-03-2004, 01:16 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Why not choose a program that you actually want to run?

I don't really see the point in compiling random software.
 
Old 08-03-2004, 03:45 PM   #5
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
Okay, if you really want to help out a compiling n00b, then my next software to get is XMMS. I'll post my errors when I get home and let's see if you guys can help me out.
 
Old 08-03-2004, 04:07 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
No problem. I'm subscribed to the thread so if you get any errors just post them along with the "./configure" string you used and the version of the software you are installing.

side note: I'm not sure what you are intending to use xmms for exactly but most people would probably suggest mplayer over xmms:
http://www.linuxquestions.org/questi...hreadid=116684

Last edited by david_ross; 08-03-2004 at 04:08 PM.
 
Old 08-04-2004, 08:30 PM   #7
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
At the end, it says I don't have glib 1.2.2 installed, but when I do URPMI glib, it says I have everything already installed. What do I do?

-----------------------------------------------------
[ken@localhost xmms-1.2.10]$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for prefix by checking for xmms... /usr/bin/xmms
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for strerror in -lcposix... no
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for an ANSI C-conforming const... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /bin/sed
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether -lc should be explicitly linked in... no
creating libtool
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for glib-config... no
checking for GLIB - version >= 1.2.2... no
*** The glib-config script installed by GLIB could not be found
*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GLIB_CONFIG environment variable to the
*** full path to glib-config.
configure: error: *** GLIB >= 1.2.2 not installed - please install first ***
 
Old 08-05-2004, 04:37 AM   #8
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Most of the time, when ./configure reports something missing, it is actually the devel files that are missing. Here, you should probably try something like urpmi glib-devel.
If you want to be sure, do that:
# urpmf /glib-config$
<the_good_package>: /usr/.../glib-config
# urpmi <the_good_package>

Yves.
 
Old 08-05-2004, 10:49 AM   #9
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by theYinYeti
Most of the time, when ./configure reports something missing, it is actually the devel files that are missing. Here, you should probably try something like urpmi glib-devel.
If you want to be sure, do that:
# urpmf /glib-config$
<the_good_package>: /usr/.../glib-config
# urpmi <the_good_package>

Yves.
Well I did what you said and here's what I got:

Code:
[root@localhost ken]# urpmf /glib-config$
libglib1.2-devel:/usr/bin/glib-config
[root@localhost ken]# urpmi libglib1.2-devel
installing /var/cache/urpmi/rpms/libglib1.2-devel-1.2.10-6mdk.i586.rpm

Preparing...                ##################################################
   1:libglib1.2-devel       ##################################################
[root@localhost ken]# exit
So it installed something. So then I go back to configuring XMMS

[ken@localhost xmms-1.2.10]$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for prefix by checking for xmms... /usr/bin/xmms
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for strerror in -lcposix... no
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for an ANSI C-conforming const... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /bin/sed
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether -lc should be explicitly linked in... no
creating libtool
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for glib-config... /usr/bin/glib-config
checking for GLIB - version >= 1.2.2... yes
checking for gtk-config... no
checking for GTK - version >= 1.2.2... no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
configure: error: *** GTK+ >= 1.2.2 not installed - please install first **

Last edited by Micro420; 08-05-2004 at 10:50 AM.
 
Old 08-05-2004, 01:48 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
So did you install GTK and GTK-devel
 
Old 08-05-2004, 02:47 PM   #11
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by david_ross
So did you install GTK and GTK-devel
I assume I just do:

urpmi GTK

and

urpmi GTK-devl

 
Old 08-05-2004, 07:31 PM   #12
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
urpmi gtk brings me this:


[root@localhost ken]# urpmi gtk
The following packages contain gtk: libgtk+mdk0.1_6 pygtk2.0-libglade gtkasp2php amaya-gtk libgtkhtml2_0-devel libgtkglarea5-devel php-gtk libgtkmm1.2-devel nautilus-gtkhtml libgtk+extra0-devel pygtk2.0-wrapper libgtkhtml1.1_3 gtk+2.0 rep-gtk ggz-gtk-games libgtkxmhtml1 gtk-doc libgtkspell0-devel libexif-gtk4-devel gtk+mdk libgtkglext1 gtkpod hotplug-gtk libwxgtk2.5-devel pygtk-libglade gtkwave ruby-gtk gtkgep gtk+licq gtktetris libgtk+-x11-2.0_0-devel ocaml-lablgtk gtkgraph gtklp libgtkglarea2.0-devel gtkfind rep-gtk-libglade gtkmotd libgtk+extra0 libgtk+2.0_0 pygtk2.0-glarea gtkhx gtk-theme-switch unixODBC-gui-gtk gtkdialogs gtkam guile-gtk-1.2 ggz-gtk-client gtk-theme-switch2 gnome-python-gtkhtml2 libgtk+mdk0.1_6-devel gtkeyboard fvwm2-gtk gtkhtml gtk+licq-nognome libgtk+1.2-devel gtktalog libwxgtkgl2.4 libwxgtk2.5 pygtk2.0-devel gocr-gtk libwxgtk2.4 pygtk libgtk+-linuxfb-2.0_0-devel mtr-gtk libgtk+1.2 gtk+licq-base gtk-gnutella pygtk-glarea libexif-gtk4 gtk-themes libguile-gtk-1.2_0-devel libgtkhtml1.1_3-devel libgtkglarea5 libgtk+-x11-2.0_0 gtk-engines libgtkspell0 libgtkglarea2.0 pygtk2.0 libguile-gtk-1.2_0 rep-gtk-gnome libgtkmm1.2 gtk-engines2 pygtk-devel libgtkodbcconfig0 libgtkhtml2_0 crossfire-client-gtk alsaplayer-plugin-ui-gtk mt_gtk_client libgtkglext1-devel libgtk+-linuxfb-2.0_0 libwxgtk2.4-devel libgtk+2.0_0-devel

Now what??
 
Old 08-05-2004, 07:35 PM   #13
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
urpmi GTK-devel
 
Old 08-05-2004, 08:45 PM   #14
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
this is what happened:


Code:
[root@localhost mplayerplug-in]# urpmi GTK-devel
To satisfy dependencies, the following packages are going to be installed (4 MB):
pygtk-0.6.9-6mdk.i586
pygtk-devel-0.6.9-6mdk.i586
python-numeric-22.0-2mdk.i586
Is this OK? (Y/n) y
    ftp://mirror.cs.wisc.edu/pub/mirrors...-6mdk.i586.rpm
    ftp://mirror.cs.wisc.edu/pub/mirrors...-2mdk.i586.rpm
    ftp://mirror.cs.wisc.edu/pub/mirrors...-6mdk.i586.rpm
installing /var/cache/urpmi/rpms/pygtk-devel-0.6.9-6mdk.i586.rpm /var/cache/urpmi/rpms/python-numeric-22.0-2mdk.i586.rpm /var/cache/urpmi/rpms/pygtk-0.6.9-6mdk.i586.rpm

Preparing...                ##################################################
   1:python-numeric         ##################################################
   2:pygtk                  ##################################################
   3:pygtk-devel            ##################################################
Then I did ./configure back at XMMS directory
(THis isn't looking good)


[ken@localhost xmms-1.2.10]$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for prefix by checking for xmms... /usr/bin/xmms
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for strerror in -lcposix... no
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for an ANSI C-conforming const... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /bin/sed
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether -lc should be explicitly linked in... no
creating libtool
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for glib-config... /usr/bin/glib-config
checking for GLIB - version >= 1.2.2... yes
checking for gtk-config... no
checking for GTK - version >= 1.2.2... no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
configure: error: *** GTK+ >= 1.2.2 not installed - please install first ***

Help!
 
Old 08-05-2004, 09:09 PM   #15
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
do
configure --prefix=/usr
 
  


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
iptables good practice - 2 questions ddaas Linux - Security 1 05-31-2005 07:09 AM
Is this good iptables practice ? michaelsanford Linux - Security 1 05-21-2005 09:32 PM
Help with Compiling and what's a good application to program with? johnnyICON Programming 11 01-12-2005 02:02 AM
installing and managing new apps. good practice! bikov_k Linux - Newbie 4 10-02-2004 04:23 PM
good enough compiling program Derek-kun Linux - Newbie 1 09-22-2003 01:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 11:29 PM.

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
Open Source Consulting | Domain Registration