public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] ffmpeg - fails to compile on amd64
@ 2011-12-12 19:28 Joseph
  2011-12-12 19:32 ` Michael Hampicke
  2011-12-12 19:52 ` [gentoo-user] " Michael Mol
  0 siblings, 2 replies; 12+ messages in thread
From: Joseph @ 2011-12-12 19:28 UTC (permalink / raw
  To: gentoo-user

I"m trying to install "kino" but ffmpeg fails to compile:

>>> Configuring source in /var/tmp/portage/media-video/ffmpeg-0.7.8/work/ffmpeg-0.7.8 ...
x86_64-pc-linux-gnu-gcc is unable to create an executable file.
If x86_64-pc-linux-gnu-gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.

  * ERROR: media-video/ffmpeg-0.7.8 failed (configure phase):
  *   (no error message)
  * 
  * Call stack:
  *     ebuild.sh, line  56:  Called src_configure
  *   environment, line 2680:  Called die
  * The specific snippet of code:
  *       ./configure --prefix=/usr --libdir=/usr/$(get_libdir) --shlibdir=/usr/$(get_libdir) --mandir=/usr/share/man --enable-shared --cc="$(tc-getCC)" 
$(use_enable static-libs static) ${myconf} || die
  * 
  * If you need support, post the output of 'emerge --info =media-video/ffmpeg-0.7.8',
  * the complete build log and the output of 'emerge -pqv =media-video/ffmpeg-0.7.8'.
  * The complete build log is located at '/var/tmp/portage/media-video/ffmpeg-0.7.8/temp/build.log'.
  * The ebuild environment file is located at '/var/tmp/portage/media-video/ffmpeg-0.7.8/temp/environment'.
  * S: '/var/tmp/portage/media-video/ffmpeg-0.7.8/work/ffmpeg-0.7.8'

-- 
Joseph



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 19:28 [gentoo-user] ffmpeg - fails to compile on amd64 Joseph
@ 2011-12-12 19:32 ` Michael Hampicke
  2011-12-12 20:28   ` Joseph
  2011-12-12 19:52 ` [gentoo-user] " Michael Mol
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Hampicke @ 2011-12-12 19:32 UTC (permalink / raw
  To: gentoo-user

> Configuring source in
> /var/tmp/portage/media-video/ffmpeg-0.7.8/work/ffmpeg-0.7.8 ...
> x86_64-pc-linux-gnu-gcc is unable to create an executable file.
> If x86_64-pc-linux-gnu-gcc is a cross-compiler, use the
> --enable-cross-compile option.
> Only do this if you know what cross compiling means.
> C compiler test failed.

Do you have enabled the "cpudetection" and/or "custom-cflags" use flags?
Or do you use some crazy CFLAGS?
ffmpeg 0.7.8 compiles just fine on my amd64 box.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 19:28 [gentoo-user] ffmpeg - fails to compile on amd64 Joseph
  2011-12-12 19:32 ` Michael Hampicke
@ 2011-12-12 19:52 ` Michael Mol
  2011-12-12 20:23   ` Joseph
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Mol @ 2011-12-12 19:52 UTC (permalink / raw
  To: gentoo-user

On Mon, Dec 12, 2011 at 2:28 PM, Joseph <syscon780@gmail.com> wrote:
> I"m trying to install "kino" but ffmpeg fails to compile:
>
>>>> Configuring source in
>>>> /var/tmp/portage/media-video/ffmpeg-0.7.8/work/ffmpeg-0.7.8 ...
>
> x86_64-pc-linux-gnu-gcc is unable to create an executable file.
> If x86_64-pc-linux-gnu-gcc is a cross-compiler, use the
> --enable-cross-compile option.
> Only do this if you know what cross compiling means.
> C compiler test failed.
>
>  * ERROR: media-video/ffmpeg-0.7.8 failed (configure phase):
>  *   (no error message)
>  *  * Call stack:
>  *     ebuild.sh, line  56:  Called src_configure
>  *   environment, line 2680:  Called die
>  * The specific snippet of code:
>  *       ./configure --prefix=/usr --libdir=/usr/$(get_libdir)
> --shlibdir=/usr/$(get_libdir) --mandir=/usr/share/man --enable-shared
> --cc="$(tc-getCC)" $(use_enable static-libs static) ${myconf} || die
>  *  * If you need support, post the output of 'emerge --info
> =media-video/ffmpeg-0.7.8',
>  * the complete build log and the output of 'emerge -pqv
> =media-video/ffmpeg-0.7.8'.
>  * The complete build log is located at
> '/var/tmp/portage/media-video/ffmpeg-0.7.8/temp/build.log'.
>  * The ebuild environment file is located at
> '/var/tmp/portage/media-video/ffmpeg-0.7.8/temp/environment'.
>  * S: '/var/tmp/portage/media-video/ffmpeg-0.7.8/work/ffmpeg-0.7.8'

That sounds like a configure-script-time error. I somehow borked up my
gcc profile pretty badly the other day, and the solution turned out to
be re-running:

gcc-config $SOME_PROFILE

where SOME_PROFILE is something you'll find under /etc/env.d/gcc

After that, things worked fine for me again.

(I was in the process of building an email because I was going to ask
this list for help, and I figured out the solution while building the
narrative of things I was trying and testing. It'll probably show up
as another blog post.)
-- 
:wq



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 19:52 ` [gentoo-user] " Michael Mol
@ 2011-12-12 20:23   ` Joseph
  2011-12-12 20:29     ` Dale
  0 siblings, 1 reply; 12+ messages in thread
From: Joseph @ 2011-12-12 20:23 UTC (permalink / raw
  To: gentoo-user

On 12/12/11 14:52, Michael Mol wrote:
[snip]
>
>gcc-config $SOME_PROFILE
>
>where SOME_PROFILE is something you'll find under /etc/env.d/gcc
>
>After that, things worked fine for me again.
>
>(I was in the process of building an email because I was going to ask
>this list for help, and I figured out the solution while building the
>narrative of things I was trying and testing. It'll probably show up
>as another blog post.)
>-- 
>:wq

I have only three files in there
ll /etc/env.d/gcc/
.NATIVE
config-x86_64-pc-linux-gnu  
x86_64-pc-linux-gnu-4.5.3 

Should I run it on config-x86_64-pc-linux-gnu or x86_64-pc-linux-gnu-4.5.3 ?

-- 
Joseph



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 19:32 ` Michael Hampicke
@ 2011-12-12 20:28   ` Joseph
  2011-12-12 20:49     ` Michael Hampicke
  2011-12-12 20:52     ` Michael Schreckenbauer
  0 siblings, 2 replies; 12+ messages in thread
From: Joseph @ 2011-12-12 20:28 UTC (permalink / raw
  To: gentoo-user

On 12/12/11 20:32, Michael Hampicke wrote:
>> Configuring source in
>> /var/tmp/portage/media-video/ffmpeg-0.7.8/work/ffmpeg-0.7.8 ...
>> x86_64-pc-linux-gnu-gcc is unable to create an executable file.
>> If x86_64-pc-linux-gnu-gcc is a cross-compiler, use the
>> --enable-cross-compile option.
>> Only do this if you know what cross compiling means.
>> C compiler test failed.
>
>Do you have enabled the "cpudetection" and/or "custom-cflags" use flags?
>Or do you use some crazy CFLAGS?
>ffmpeg 0.7.8 compiles just fine on my amd64 box.

No nothing crazy:
CFLAGS="-Os -pipe -mtune=i686"

I'm not even sure if these flags are correct for my CPU:
AMD FX(tm)-8150 Eight-Core Processor

The flags suggestion I found on gentoo wiki are crazy:
http://en.gentoo-wiki.com/wiki/Safe_Cflags/AMD#AMD_FX-8xxx.2F6xxx.2F4xxx_.28Bulldozer.29

CFLAGS="-O2 -pipe -fomit-frame-pointer -march=bdver1 -mtune=bdver1 -mcx16 -msahf -maes -mpclmul -mpopcnt -mabm -mlwp -mavx"

Whoever suggested these flags must have been on some drugs :-/

-- 
Joseph



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 20:23   ` Joseph
@ 2011-12-12 20:29     ` Dale
  2011-12-12 20:43       ` Joseph
  0 siblings, 1 reply; 12+ messages in thread
From: Dale @ 2011-12-12 20:29 UTC (permalink / raw
  To: gentoo-user

Joseph wrote:
> On 12/12/11 14:52, Michael Mol wrote:
> [snip]
>>
>> gcc-config $SOME_PROFILE
>>
>> where SOME_PROFILE is something you'll find under /etc/env.d/gcc
>>
>> After that, things worked fine for me again.
>>
>> (I was in the process of building an email because I was going to ask
>> this list for help, and I figured out the solution while building the
>> narrative of things I was trying and testing. It'll probably show up
>> as another blog post.)
>> -- 
>> :wq
>
> I have only three files in there
> ll /etc/env.d/gcc/
> .NATIVE
> config-x86_64-pc-linux-gnu  x86_64-pc-linux-gnu-4.5.3
> Should I run it on config-x86_64-pc-linux-gnu or 
> x86_64-pc-linux-gnu-4.5.3 ?
>

Use this command to see if one is set:

gcc-config -l

Then you can use gcc-config <number you want to select> to set it if it 
is not set.  If it is set, it should look like this:

  [1] x86_64-pc-linux-gnu-4.4.5
  [2] x86_64-pc-linux-gnu-4.5.3 *

Note the little * on the end?  That is the one that it is trying to 
use.  Sometimes it gets unset, especially if you install a new gcc and 
remove the old without setting it to use the new one first, then things 
tend to error out when gcc is called and it is not there.

Hope that helps.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 20:29     ` Dale
@ 2011-12-12 20:43       ` Joseph
  0 siblings, 0 replies; 12+ messages in thread
From: Joseph @ 2011-12-12 20:43 UTC (permalink / raw
  To: gentoo-user

On 12/12/11 14:29, Dale wrote:

[snip}
>
>gcc-config -l
>
>Then you can use gcc-config <number you want to select> to set it if it
>is not set.  If it is set, it should look like this:
>
>  [1] x86_64-pc-linux-gnu-4.4.5
>  [2] x86_64-pc-linux-gnu-4.5.3 *
>
>Note the little * on the end?  That is the one that it is trying to
>use.  Sometimes it gets unset, especially if you install a new gcc and
>remove the old without setting it to use the new one first, then things
>tend to error out when gcc is called and it is not there.
>
>Hope that helps.
>
>Dale

Yes the profile is set to:
[1] x86_64-pc-linux-gnu-4.5.3 *

everything compiled without any problems except that ffmpeg :-/ 

-- 
Joseph



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 20:28   ` Joseph
@ 2011-12-12 20:49     ` Michael Hampicke
  2011-12-12 20:52     ` Michael Schreckenbauer
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Hampicke @ 2011-12-12 20:49 UTC (permalink / raw
  To: gentoo-user

> No nothing crazy:
> CFLAGS="-Os -pipe -mtune=i686"

No you're right, that's nothing crazy.

Perhaps you could paste the complete build log of your failed merge to
pastebin[1].
Portage tells you where you can find that log file. The output of %
emerge --info might prove useful too.

[1] http://pastebin.com/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 20:28   ` Joseph
  2011-12-12 20:49     ` Michael Hampicke
@ 2011-12-12 20:52     ` Michael Schreckenbauer
  2011-12-12 21:09       ` Michael Hampicke
  2011-12-13  0:28       ` [gentoo-user] [SOLVED] " Joseph
  1 sibling, 2 replies; 12+ messages in thread
From: Michael Schreckenbauer @ 2011-12-12 20:52 UTC (permalink / raw
  To: gentoo-user

Am Montag, 12. Dezember 2011, 13:28:39 schrieb Joseph:
> On 12/12/11 20:32, Michael Hampicke wrote:
> >> Configuring source in
> >> /var/tmp/portage/media-video/ffmpeg-0.7.8/work/ffmpeg-0.7.8 ...
> >> x86_64-pc-linux-gnu-gcc is unable to create an executable file.
> >> If x86_64-pc-linux-gnu-gcc is a cross-compiler, use the
> >> --enable-cross-compile option.
> >> Only do this if you know what cross compiling means.
> >> C compiler test failed.
> >
> >Do you have enabled the "cpudetection" and/or "custom-cflags" use flags?
> >Or do you use some crazy CFLAGS?
> >ffmpeg 0.7.8 compiles just fine on my amd64 box.
> 
> No nothing crazy:
> CFLAGS="-Os -pipe -mtune=i686"

i686? That's not amd64. You need something 64bit. Just use march=native 
instead of mtune=i686. 


> I'm not even sure if these flags are correct for my CPU:
> AMD FX(tm)-8150 Eight-Core Processor

:) They are not.

> The flags suggestion I found on gentoo wiki are crazy:
> http://en.gentoo-wiki.com/wiki/Safe_Cflags/AMD#AMD_FX-8xxx.2F6xxx.2F4xxx_.28
> Bulldozer.29
> 
> CFLAGS="-O2 -pipe -fomit-frame-pointer -march=bdver1 -mtune=bdver1 -mcx16
> -msahf -maes -mpclmul -mpopcnt -mabm -mlwp -mavx"
> Whoever suggested these flags must have been on some drugs :-/

Could well be, that this is what march=native gives for bdver1.

Best,
Michael




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 20:52     ` Michael Schreckenbauer
@ 2011-12-12 21:09       ` Michael Hampicke
  2011-12-12 21:15         ` Michael Hampicke
  2011-12-13  0:28       ` [gentoo-user] [SOLVED] " Joseph
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Hampicke @ 2011-12-12 21:09 UTC (permalink / raw
  To: gentoo-user

>> No nothing crazy:
>> CFLAGS="-Os -pipe -mtune=i686"
> 
> i686? That's not amd64. You need something 64bit. Just use march=native 
> instead of mtune=i686. 

Wait, what! I could swear I was reading march=native just a few minutes ago.

mtune=i686 on amd64 just doesn't seem right, but it should compile.

# echo | gcc -dM -E - -march=native
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1 -E -quiet -v -
-D_FORTIFY_SOURCE=2 -mtune=i686 -march=x86-64

gcc sets the correct march even if you set the wrong mtune.

But as Michael says, just use march=native and you should be fine.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] ffmpeg - fails to compile on amd64
  2011-12-12 21:09       ` Michael Hampicke
@ 2011-12-12 21:15         ` Michael Hampicke
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Hampicke @ 2011-12-12 21:15 UTC (permalink / raw
  To: gentoo-user

> # echo | gcc -dM -E - -march=native
> /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1 -E -quiet -v -
> -D_FORTIFY_SOURCE=2 -mtune=i686 -march=x86-64

Sorry, something went wrong while pasting this lines, here are the
correct ones:

# cc -mtune=i686 -E -v - </dev/null 2>&1 | grep cc1
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1 -E -quiet -v -
-D_FORTIFY_SOURCE=2 -mtune=i686 -march=x86-64



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] [SOLVED] ffmpeg - fails to compile on amd64
  2011-12-12 20:52     ` Michael Schreckenbauer
  2011-12-12 21:09       ` Michael Hampicke
@ 2011-12-13  0:28       ` Joseph
  1 sibling, 0 replies; 12+ messages in thread
From: Joseph @ 2011-12-13  0:28 UTC (permalink / raw
  To: gentoo-user

On 12/12/11 21:52, Michael Schreckenbauer wrote:
>Am Montag, 12. Dezember 2011, 13:28:39 schrieb Joseph:
>> On 12/12/11 20:32, Michael Hampicke wrote:
>> >> Configuring source in
>> >> /var/tmp/portage/media-video/ffmpeg-0.7.8/work/ffmpeg-0.7.8 ...
>> >> x86_64-pc-linux-gnu-gcc is unable to create an executable file.
>> >> If x86_64-pc-linux-gnu-gcc is a cross-compiler, use the
>> >> --enable-cross-compile option.
>> >> Only do this if you know what cross compiling means.
>> >> C compiler test failed.
>> >
>> >Do you have enabled the "cpudetection" and/or "custom-cflags" use flags?
>> >Or do you use some crazy CFLAGS?
>> >ffmpeg 0.7.8 compiles just fine on my amd64 box.
>>
>> No nothing crazy:
>> CFLAGS="-Os -pipe -mtune=i686"
>
>i686? That's not amd64. You need something 64bit. Just use march=native
>instead of mtune=i686.
>
>
>> I'm not even sure if these flags are correct for my CPU:
>> AMD FX(tm)-8150 Eight-Core Processor

Thanks, you are correct. 
The Cflags that were suggested by Gentoo wiki did not work at all so I wasn't sure what to enter and took them from Gen too Rescue CD that I bootstrap the 
system.
But after changing the flags to:
CFLAGS="-march=native -Os -pipe" 

ffmpeg compiled just fine.

-- 
Joseph



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-12-13  0:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-12 19:28 [gentoo-user] ffmpeg - fails to compile on amd64 Joseph
2011-12-12 19:32 ` Michael Hampicke
2011-12-12 20:28   ` Joseph
2011-12-12 20:49     ` Michael Hampicke
2011-12-12 20:52     ` Michael Schreckenbauer
2011-12-12 21:09       ` Michael Hampicke
2011-12-12 21:15         ` Michael Hampicke
2011-12-13  0:28       ` [gentoo-user] [SOLVED] " Joseph
2011-12-12 19:52 ` [gentoo-user] " Michael Mol
2011-12-12 20:23   ` Joseph
2011-12-12 20:29     ` Dale
2011-12-12 20:43       ` Joseph

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox