Installing a new compiler

Discuss Applications
Post Reply
JoeDude
administrator
administrator
Posts: 355
Joined: Sun Feb 08, 2004 1:41 pm
Location: Sutton Coldfield, UK
Contact:

Installing a new compiler

Post by JoeDude »

I was attempting to install mplayer. I was rudely interupted by an error message that MPLAYER does not and will not support gcc 2.96 due to it's bugginess.

Ok, lets get a new compiler.

downloaded and extracted gcc 3.0.4

mkdir gcc-build

then the fun started

cd gcc-build
../gcc-3.0.4/configure

this is what happened...
/home/joedude/gcc-build
bash: /home/joedude/gcc-build: is a directory
joedude@joedude-desktop:~/gcc-build$ cd /home/joedude/gcc-build
joedude@joedude-desktop:~/gcc-build$ ../gcc-3.0.4/configure
Configuring for a i686-pc-linux-gnuoldld host.
Created "Makefile" in /home/joedude/gcc-build using "mt-frag"
/tmp/cNf13058/cNf13058.pos: line 7: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
joedude@joedude-desktop:~/gcc-build$
None of the instructions contain fixes for this error, so it must be a simple fix to people who "know" what they are doing.

Can someone help me out with what o do next...Even if the answer is to download a better compiler...Thanx

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

First question I have is what OS are you doing this on and why wouldn't you just install the binary packages for it? I can't imagine any recent distro not having gcc 3.x. I mean Fedora is up to gcc version 4.1.1. Anyway this should do it assuming you still have your old gcc installed which you'll need to compile the new version:

Code: Select all

$ export CC=gcc
I would follow the INSTALL doc that should be included in the source package though. It's also looks odd to me that you have not changed into the root source directory where the configure script resides but if that was the install documentation tells you to do then by all means...

JoeDude
administrator
administrator
Posts: 355
Joined: Sun Feb 08, 2004 1:41 pm
Location: Sutton Coldfield, UK
Contact:

Post by JoeDude »

Ubuntu 6.0.6

Didn't work, probably doing it wrong. Maybe I'm just reading it wrong...
Like most GNU software, GCC must be configured before it can be built. This document describes the recommended configuration procedure for both native and cross targets.
We use srcdir to refer to the toplevel source directory for GCC; we use objdir to refer to the toplevel build/object directory.
If you obtained the sources via CVS, srcdir must refer to the top gcc directory, the one where the MAINTAINERS can be found, and not its gcc subdirectory, otherwise the build will fail.
First, we highly recommend that GCC be built into a separate directory than the sources which does not reside within the source tree. This is how we generally build GCC; building where srcdir == objdir should still work, but doesn't get extensive testing; building where objdir is a subdirectory of srcdir is unsupported.
If you have previously built GCC in the same directory for a different target machine, do make distclean to delete all files that might be invalid. One of the files this deletes is Makefile; if make distclean complains that Makefile does not exist, it probably means that the directory is already suitably clean. However, with the recommended method of building in a separate objdir, you should simply use a different objdir for each target.
Second, when configuring a native system, either cc or gcc must be in your path or you must set CC in your environment before running configure. Otherwise the configuration scripts may fail.
Note that the bootstrap compiler and the resulting GCC must be link compatible, else the bootstrap will fail with linker errors about incompatible object file formats. Several multilibed targets are affected by this requirement, see host/target specific installation notes.

To configure GCC:

% mkdir objdir
% cd objdir
% srcdir/configure [options] [target]

Target specification

* GCC has code to correctly determine the correct value for target for nearly all native systems. Therefore, we highly recommend you not provide a configure target when configuring a native compiler.
* target must be specified as --target=target when configuring a cross compiler; examples of valid targets would be i960-rtems, m68k-coff, sh-elf, etc.
* Specifying just target instead of --target=target implies that the host defaults to target.

Options specification

Use options to override several configure time options for GCC. A list of supported options follows; configure --help may list other options, but those not listed below may not work and should not normally be used.
I assume by those directions I should be in the objdir when I start the confi, good enough, but there's no command switch for it to configure outside the directory I'm in, also there is no scrdir either... So I am now more confused than before

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

First of all, did you ever install the "build-essential" packages?

Code: Select all

$ sudo apt-get update
$ sudo apt-get install build-essential
You are trying to install a version of gcc that is older than what should come with Ubuntu.

Also, don't know how old this is:
http://www.oldskoolphreak.com/tfiles/hack/ubuntu.txt

Here's another link for you:
http://fontignie.blogspot.com/2006/04/i ... buntu.html

JoeDude
administrator
administrator
Posts: 355
Joined: Sun Feb 08, 2004 1:41 pm
Location: Sutton Coldfield, UK
Contact:

Post by JoeDude »

I have used both, the auto updater tool (when I first installed it, yesterday) and it d/l and installed 95 updates. When I apt-get, it says the system is up to date.

I'm trying the links now, the first one (oldskoolphreak), everything was going good until I tried to apt-get install x-window-system-dev. It said no such packet existed. Assuming (and hoping) I had all ready taken care of that with the other updates and steps. I got all the way to make for MPlayer-1.0pre8. It wouldn't register saying there was no make. I checked, there is a makefile in there.

This is the part where I headbutt things...a lot.

JoeDude
administrator
administrator
Posts: 355
Joined: Sun Feb 08, 2004 1:41 pm
Location: Sutton Coldfield, UK
Contact:

Post by JoeDude »

this is the output for ./config --enable-gui
joedude@joedude-desktop:~/MPlayer-1.0pre8$ ./configure --enable-gui
Detected operating system: Linux
Detected host architecture: i386
Checking for cc version ... 4.0.3, ok
Checking for host cc ... cc
Checking for cross compilation ... no
Checking for CPU vendor ... AuthenticAMD (6:10:0)
Checking for CPU type ... AMD Athlon(tm) XP 2800+
Checking for GCC & CPU optimization abilities ... athlon-xp
Checking for kernel support of mmx ... yes
Checking for kernel support of mmxext ... yes
Checking for kernel support of 3dnow ... yes
Checking for kernel support of 3dnowext ... yes
Checking for kernel support of sse ... yes
Checking for mtrr support ... yes
Checking for xmmintrin.h ... yes
Checking for mm3dnow.h ... yes
Checking for assembler support of -pipe option ... yes
Checking for assembler (as 2.16.91) ... ok
Checking for Linux kernel version ... 2.6.15-25-386, ok
Checking for MPlayer binary name ... mplayer
Checking for awk ... mawk
Checking for extra headers ... none
Checking for extra libs ... none
Checking for -lposix ... no
Checking for -lm ... yes
Checking for langinfo ... yes
Checking for language ... using en (man pages: en)
Checking for enable sighandler ... yes
Checking for runtime cpudetection ... no
Checking for restrict keyword ... __restrict
Checking for __builtin_expect ... yes
Checking for kstat ... no
Checking for posix4 ... no
Checking for lrintf ... yes
Checking for round ... yes
Checking for nanosleep ... yes
Checking for socklib ... yes (using -lnsl)
Checking for inet_pton() ... yes (using -lnsl)
Checking for inttypes.h (required) ... yes
Checking for int_fastXY_t in inttypes.h ... yes
Checking for word size ... 32
Checking for stddef.h ... yes
Checking for malloc.h ... yes
Checking for memalign() ... yes
Checking for alloca.h ... yes
Checking for mman.h ... yes
Checking for dynamic loader ... yes
Checking for dynamic a/v plugins support ... no
Checking for pthread ... yes (using -lpthread)
Checking for rpath ... no
Checking for iconv ... yes
Checking for sys/soundcard.h ... yes
Checking for sys/dvdio.h ... no
Checking for sys/cdio.h ... no
Checking for linux/cdrom.h ... yes
Checking for dvd.h ... no
Checking for BSDI dvd.h ... no
Checking for HP-UX SCSI header ... no
Checking for userspace SCSI headers (Solaris) ... no
Checking for termcap ... no
Checking for termios ... yes (using sys/termios.h)
Checking for shm ... yes
Checking for linux devfs ... no
Checking for scandir() ... yes
Checking for strsep() ... yes
Checking for strlcpy() ... no
Checking for strlcat() ... no
Checking for fseeko() ... yes
Checking for localtime_r() ... yes
Checking for vsscanf() ... yes
Checking for swab() ... yes
Checking for POSIX select() ... yes
Checking for gettimeofday() ... yes
Checking for glob() ... yes
Checking for setenv() ... yes
Checking for sys/sysinfo.h ... yes
Checking for Mac OS X APIs ... auto
Checking for Mac OS X Finder Support ... no
Checking for Mac OS X Bundle file locations ... no
Checking for Samba support (libsmbclient) ... no
Checking for 3dfx ... no
Checking for tdfxfb ... no
Checking for s3fb ... no
Checking for tdfxvid ... no
Checking for tga ... yes
Checking for DirectFB headers presence ... not found
Checking for DirectFB ... no
Checking for X11 headers presence ... yes (using /usr/include)
Checking for X11 ... yes (using /usr/X11R6/lib)
Checking for DPMS ... yes (using Xdpms 4)
Checking for Xv ... no
Checking for XvMC ... no
Checking for Xinerama ... no
Checking for Xxf86vm ... no
Checking for XF86keysym ... yes
Checking for DGA ... no
Checking for OpenGL ... no
Checking for /dev/mga_vid ... no
Checking for xmga ... no
Checking for GGI ... no
Checking for GGI extension: libggiwmh ... no
Checking for AA ... no
Checking for CACA ... no
Checking for SVGAlib ... no
Checking for FBDev ... yes
Checking for DVB ... no (specify path to DVB/ost/include with --with-dvbincdir=DIR)
Checking for DVB HEAD ... yes
Checking for PNG support ... yes
Checking for JPEG support ... no
Checking for PNM support ... yes
Checking for md5sum support ... yes
Checking for GIF support ... no
Checking for VESA support ... no
Checking for SDL ... no
Checking for Windows waveout ... no
Checking for Directx ... no
Checking for NAS ... no
Checking for DXR2 ... no
Checking for DXR3/H+ ... no
Checking for libmp1e ... no
Checking for libfame ... no
Checking for OSS Audio ... yes
Checking for aRts ... no
Checking for EsounD ... no
Checking for Polyp ... no
Checking for JACK ... no
Checking for OpenAL ... no
Checking for ALSA audio ... no
Checking for Sun audio ... no
Checking for Sun mediaLib ... no
Checking for SGI audio ... no
Checking for VCD support ... yes
Checking for DVD support (libmpdvdkit2) ... yes
Checking for DVD support (libdvdread) ... no (disabled by libmpdvdkit2)
Checking for cdparanoia ... no
Checking for libcdio ... no
Checking for freetype >= 2.0.9 ... no
Checking for fontconfig ... no (freetype support needed)
Checking for fribidi with charsets ... no
Checking for ENCA ... no
Checking for zlib ... yes
Checking for RTC ... yes
Checking for external liblzo support ... no
Checking for mad support ... no
Checking for Toolame ... no
Checking for Twolame ... no
Checking for OggVorbis support ... yes (internal Tremor)
Checking for libspeex (version >= 1.1 required) ... no
Checking for OggTheora support ... no
Checking for mp3lib support ... yes
Checking for liba52 support ... yes
Checking for libdts support ... no
Checking for libmpeg2 support ... yes
Checking for libmpcdec (musepack, version >= 1.2.1 required) ... no
Checking for FAAC (AAC encoder) support ... no
Checking for internal FAAD2 (AAC) support ... yes
Checking for external FAAD2 (AAC) support ... no
Checking for LADSPA plugin support ... no
Checking for Win32 codec DLL support ... yes (using /usr/local/lib/codecs)
Checking for Win32 loader support ... yes
Checking for DirectShow ... yes
Checking for XAnim DLL ... yes (using /usr/local/lib/codecs)
Checking for RealPlayer DLL ... yes (using /usr/local/lib/codecs)
Checking for LIVE555 Streaming Media libraries ... no
Checking for FFmpeg libavutil (static) ... yes
Checking for FFmpeg libavcodec (static) ... yes
Checking for FFmpeg libavformat (static) ... yes
Checking for FFmpeg libpostproc (static) ... yes
Checking for AMR narrowband ... no
Checking for AMR narrowband, fixed point ... no
Checking for AMR wideband ... no
Checking for libdv-0.9.5+ ... no
Checking for zr ... no
Checking for bl ... no
Checking for XviD ... no
Checking for x264 ... no
Checking for DivX4linux/DivX5linux/OpenDivX decore ... no
Checking for libmp3lame (for mencoder) ... no
Checking for DivX4linux encore (for mencoder) ... no
Checking for mencoder ... yes
Checking for fastmemcpy ... yes
Checking for UniquE RAR File Library ... yes
Checking for TV interface ... yes
Checking for *BSD BrookTree 848 TV interface ... no
Checking for Video 4 Linux TV interface ... yes
Checking for Video 4 Linux 2 TV interface ... yes
Checking for audio select() ... yes
Checking for network ... yes
Checking for ftp ... yes
Checking for vstream client ... no
Checking for byte order ... little-endian
Checking for OSD menu ... no
Checking for QTX codecs ... yes
Checking for Subtitles sorting ... yes
Checking for XMMS inputplugin support ... no
Checking for inet6 ... yes
Checking for gethostbyname2 ... yes
Checking for GUI ... yes
Checking for XShape extension ... yes
Checking for GTK+ version ... GTK-2 devel packages were not found, trying GTK 1.2
Checking for GTK version ... 1.2.10 (using gtk-config)
Checking for glib version ... 1.2.10 (using glib-config)
Creating Gui/config.mak
Checking for automatic gdb attach ... no
Checking for compiler support for -fno-PIC ... yes
Checking for compiler support for noexecstack ... yes
Checking for ftello() ... yes
Checking for VIDIX (internal) ... yes
Checking for VIDIX (external) ... no
Checking for joystick ... no
Checking for lirc ... no
Checking for lircc ... no
Creating config.mak
Creating config.h
Creating libvo/config.mak
Creating libao2/config.mak
Creating libaf/config.mak

Config files successfully generated by ./configure !

Install prefix: /usr/local
Data directory: /usr/local/share/mplayer
Config direct.: /usr/local/etc/mplayer

Byte order: little-endian
Optimizing for: athlon-xp mmx mmxext 3dnow 3dnowext sse mtrr

Languages:
Messages/GUI: en
Manual pages: en

Enabled optional drivers:
Input: ftp network tv-v4l2 tv-v4l tv mpdvdkit2 vcd dvb
Codecs: qtx libavcodec real xanim dshow/dmo win32 faad2(internal) libmpeg2 liba52 mp3lib tremor(internal)
Audio output: oss mpegpes(dvb)
Video output: xvidix cvidix md5sum pnm png mpegpes(dvb) fbdev x11 xover tga
Audio filters:
Disabled optional drivers:
Input: vstream tv-bsdbt848 live555 cdda dvdread smb
Codecs: opendivx x264 xvid libdv amr_wb amr_nb faac musepack libdts libtheora speex twolame toolame libmad liblzo gif
Audio output: sgi sun alsa openal jack polyp esd arts dxr2 nas dsound win32 sdl
Video output: winvidix bl zr zr2 dxr3 dxr2 directx sdl vesa gif89a jpeg svga caca aa ggi xmga mga opengl dga xvmc xv directfb tdfx_vid s3fb tdfxfb 3dfx
Audio filters: ladspa

'config.h' and 'config.mak' contain your configuration options.
Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
compile *** DO NOT REPORT BUGS if you tweak these files ***

'make' will now compile MPlayer and 'make install' will install it.
Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.

Please check mtrr settings at /proc/mtrr (see DOCS/HTML/en/video.html#mtrr)


Check configure.log if you wonder why an autodetection failed (check whether
the development headers/packages are installed).
Do not report compilation errors if you used any of the --enable-* options
(except --enable-gui and maybe --enable-debug).

If you suspect a bug, please read DOCS/HTML/en/bugreports.html.
and for make

nevermind..it seems to be compiling it now...I'll let you know when it's done.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

It's not a question of being up to date, it's a question of whether you have the build environment installed. What did this command specifically say:

Code: Select all

$ sudo apt-get install build-essential
You are trying to compile/install an old version of GCC when you shouldn't have to. Just install the proper current build environment via apt.

JoeDude
administrator
administrator
Posts: 355
Joined: Sun Feb 08, 2004 1:41 pm
Location: Sutton Coldfield, UK
Contact:

Post by JoeDude »

Reading package lists... Done
Building dependency tree... Done
gcc is already the newest version.
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It seems it was some sort of problem with MPlayer-1.0pre8. Following the instructions you found on olskool and bugs seems to have sorted it all out. it allowed me to make, make install add fonts and skins. The only problem I have had was for some reason it didn't get the icons it was supposed to. But those instructions were set for 0pre5 and I have gotten 0pre8. So the directory may not be used anymore.

Thanx, it seems sorted.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

Oh, I thought you were still trying to build and install that old version of GCC. I can't believe there weren't MPlayer packages already built as well though. You probably would have pointed to the non-free apt repos to get it.

JoeDude
administrator
administrator
Posts: 355
Joined: Sun Feb 08, 2004 1:41 pm
Location: Sutton Coldfield, UK
Contact:

Post by JoeDude »

nope, I was only trying to fix my terminal. Mplayer was telling me I was using 2.96. So I figured if I could fix that, I could get MPlayer up n running. Turns out the work around fixed both issues...weird huh?

Now I have to figure out why Azureus doesn't work right...

Post Reply