Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#438 closed defect (worksforme)

Compilation fails on RH EL 4 64bit/AMD64

Reported by: mslama@… Owned by: diego@…
Priority: normal Component: build system
Version: unspecified Severity: normal
Keywords: MPlayer Cc: Dominik 'Rathann' Mierzejewski
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

System info:
RH EL 4 64bit/AMD 64, no patches are applied yet, I only added
glibc-devel-2.3.4-2.i386.rpm to be able to compile gcc.

uname -a:
Linux <hostname> 2.6.9-5.EL #1 Wed Jan 5 19:21:57 EST 2005 x86_64 x86_64 x86_64
GNU/Linux

$ ls -l /lib/libc[.-]*
-rwxr-xr-x 1 root root 1439335 Dec 20 2004 /lib/libc-2.3.4.so
lrwxrwxrwx 1 root root 13 Jan 17 14:44 /lib/libc.so.6 -> libc-2.3.4.so

$ gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-cxa_atexit
--disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f77
--enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

$ ld -v
GNU ld version 2.16.1
(I update binutils to last version but with default result was the same)

$ as --version
GNU assembler 2.16.1
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-unknown-linux-gnu'.

I will attach files with info.

Attachments (5)

config.h (20.5 KB ) - added by mslama@… 18 years ago.
config.h
config.mak (7.4 KB ) - added by mslama@… 18 years ago.
config.mak
configure.log (146.7 KB ) - added by mslama@… 18 years ago.
configure.log
configure.out (9.9 KB ) - added by mslama@… 18 years ago.
Output from configure
err.out (103.0 KB ) - added by mslama@… 18 years ago.
Output from make including compiler error

Download all attachments as: .zip

Change History (21)

by mslama@…, 18 years ago

Attachment: config.h added

config.h

comment:1 by mslama@…, 18 years ago

by mslama@…, 18 years ago

Attachment: config.mak added

config.mak

comment:2 by mslama@…, 18 years ago

by mslama@…, 18 years ago

Attachment: configure.log added

configure.log

comment:3 by mslama@…, 18 years ago

by mslama@…, 18 years ago

Attachment: configure.out added

Output from configure

comment:4 by mslama@…, 18 years ago

by mslama@…, 18 years ago

Attachment: err.out added

Output from make including compiler error

comment:5 by mslama@…, 18 years ago

comment:6 by mslama@…, 18 years ago

I also tried with gcc 3.4.5 and 4.0.2 I built myself (without any special
configuration option) with the same result.

comment:7 by mslama@…, 18 years ago

rep_platform: AllPC (AMD64)

comment:8 by reimar, 18 years ago

Since you didn't say which version you are using: The answer is "use CVS".

comment:9 by mslama@…, 18 years ago

Oops I am sorry I forgot to say. Of course I use CVS snapshot from Thursday 19
Jan I think

comment:10 by reimar, 18 years ago

Owner: changed from diego@… to Reimar.Doeffinger@…

In config.h you have
#define ARCH_X86 1
when compiling for 64 bit it should be
#define ARCH_X86_64 1
instead.
Please provide the output of uname -p, uname -m and whatever in that direction
you can find.
Or if you want to fix yourself: find out why the _def_arch and _target_arch
variables get incorrectly set in configure.

comment:11 by mslama@…, 18 years ago

Thanks for hint. I found cause: I used my own compiled gcc not system one. Some
programs are looking for cc first and it is by default delegated to system gcc.
So I removed gcc and symbolic link cc from /usr/bin. I add my custom gcc to
PATH. Then configure detects gcc correctly but fails to detect arch. When I add
symbolic link to /usr/bin/cc pointing to my gcc 4.0.2 mplayer configure detects
arch correctly and also make passes.

I think configure should handle this correctly if possible. Problem is this:

# x86/x86pc is used by QNX
case "uname -m 2>&1" in


i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC)
host_arch=i386 ;;

ia64) host_arch=ia64 ;;
x86_64|amd64)

if [ -n "$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'" -a \

-z "echo $CFLAGS | grep -- -m32" ]; then

host_arch=x86_64

else

host_arch=i386

fi

;;

It uses cc even if cc is not present. It is error message in my original output
from configure:
./configure: line 524: cc: command not found

comment:12 by Dominik 'Rathann' Mierzejewski, 18 years ago

Cc: Dominik 'Rathann' Mierzejewski added

No, it doesn't. It uses whatever $_cc is set to. Use --with-cc=/path/to/your/gcc
and it should be fine.

comment:13 by mslama@…, 18 years ago

As you can see from error message $_cc is set to cc even if cc is not present on
system. What I do now is not to change anything in /usr/bin (ie. I do not remove
symbolic link cc to gcc). I add symbolic link cc to gcc in my own gcc version
eg. if I compile gcc 3.4.5 and put it to /usr/local/gcc-3.4.5 I create symbolic
link /usr/local/gcc-3.4.5/bin/cc to /usr/local/gcc-3.4.5/bin/gcc. Then it works
fine. My PATH starts with /usr/local/gcc-3.4.5/bin:....

I think problem is that with custom gcc on PATH it configure still uses cc from
/usr/bin. If there is option --with-cc then ok you can close this issue. Still I
would prefer if this case could be handled without any special option. Usage:
I have system gcc in /usr/bin/gcc and /usr/bin/cc where /usr/bin/cc is symbolic
link to /usr/bin/gcc. Then I install another gcc version to eg /usr/gcc-3.4.5
and I have /usr/gcc-3.4.5/bin/gcc but not /usr/gcc-3.4.5/bin/cc as it is not
created by gcc make install. I prepend /usr/gcc-3.4.5/bin to PATH. Then result
is mplayer configure still uses system default gcc.

I leave it up to you if this should be addressed anyhow or not.

Thanks

Marek.

comment:14 by diego@…, 18 years ago

Component: libavcodecbuild system
Keywords: MPlayer added; FFmpeg removed
Owner: changed from Reimar.Doeffinger@… to diego@…
product: FFmpegMPlayer

comment:15 by Dominik 'Rathann' Mierzejewski, 18 years ago

Try setting the CC variable to /usr/local/gcc-3.4.5/bin/gcc. Either that, or use
--cc=/usr/local/gcc-3.4.5/bin/gcc for configure. Sorry about the mistake in my
first comment, but you should've checked configure --help in the first place.

comment:16 by diego@…, 18 years ago

Resolution: worksforme
Status: newclosed

This is a configure usage error. I'm resolving the bug for now. If you feel
this calls for a different solution reopen the bug when proposing an alternative.

Note: See TracTickets for help on using tickets.