Re: 64bit build errors

2011-12-07 Thread Tom Evans
On Wed, Dec 7, 2011 at 12:40 AM, Da Rock
 wrote:
> I'm trying to build some newer versions of ffserver. But I keep getting asm
> build errors when I get to libavcodec/vp*.
>
> Error: `(%esi,%eax)' is not a valid 64 bit base/index expression
>
> If I set it to build static it fails at h264.
>
> "Error: `-1(%edi)'  is not a valid 64 bit base/index expression"
>
> Googling hasn't proved helpful in finding an answer. I've tried setting some
> configure options: arch=amd64/x86_64, disabling cmov/fast_cmov, ebx, etc.
>
> Any ideas how to fix this?
>
> Cheers

Yes, you need to use newer binutils from ports. It also helps with
ffmpeg/mplayer to use a newer gcc from ports as well (I use gcc46),
but the main thing is installing binutils and configuring with
--as=/usr/local/bin/as.

Cheers

Tom
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Da Rock

On 12/07/11 20:36, Tom Evans wrote:

On Wed, Dec 7, 2011 at 12:40 AM, Da Rock
  wrote:

I'm trying to build some newer versions of ffserver. But I keep getting asm
build errors when I get to libavcodec/vp*.

Error: `(%esi,%eax)' is not a valid 64 bit base/index expression

If I set it to build static it fails at h264.

"Error: `-1(%edi)'  is not a valid 64 bit base/index expression"

Googling hasn't proved helpful in finding an answer. I've tried setting some
configure options: arch=amd64/x86_64, disabling cmov/fast_cmov, ebx, etc.

Any ideas how to fix this?

Cheers

Yes, you need to use newer binutils from ports. It also helps with
ffmpeg/mplayer to use a newer gcc from ports as well (I use gcc46),
but the main thing is installing binutils and configuring with
--as=/usr/local/bin/as.



Cool! Thanks for that.

I got a manual to read by the looks of it anyway, but can anyone give me 
the inside gos on the why it does what it does? (Or something like 
that.. :) )


Cheers
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Da Rock

On 12/07/11 21:29, Tom Evans wrote:

On Wed, Dec 7, 2011 at 10:59 AM, Da Rock
  wrote:

Cool! Thanks for that.

I got a manual to read by the looks of it anyway, but can anyone give me the
inside gos on the why it does what it does? (Or something like that.. :) )



This email explains it:

http://lists.mplayerhq.hu/pipermail/mplayer-users/2011-July/083051.html

I really hate sounding like an idiot, but if I don't ask I'll never 
know: The assembler in base is not up-to-date with the latest 
instruction sets for the cpu, and is causing an error because its 
telling the cpu to do something it doesn't understand and is going WTF! 
So the port binutils provides the latest instruction sets for the latest 
cpus. And ffmpeg and friends use the latest cpu abilities to run as fast 
as they do? Right or way off? Otherwise I'd have problems building 
anything, wouldn't I?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Tom Evans
On Wed, Dec 7, 2011 at 10:59 AM, Da Rock
 wrote:
> Cool! Thanks for that.
>
> I got a manual to read by the looks of it anyway, but can anyone give me the
> inside gos on the why it does what it does? (Or something like that.. :) )
>
>

This email explains it:

http://lists.mplayerhq.hu/pipermail/mplayer-users/2011-July/083051.html

Cheers

Tom
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Tom Evans
On Wed, Dec 7, 2011 at 11:47 AM, Da Rock
 wrote:
> I really hate sounding like an idiot, but if I don't ask I'll never know:
> The assembler in base is not up-to-date with the latest instruction sets for
> the cpu, and is causing an error because its telling the cpu to do something
> it doesn't understand and is going WTF! So the port binutils provides the
> latest instruction sets for the latest cpus. And ffmpeg and friends use the
> latest cpu abilities to run as fast as they do? Right or way off? Otherwise
> I'd have problems building anything, wouldn't I?

The way I understand it is that they use compiler/assembler features
that did not exist in the version of binutils that is in base.

That might be related to CPU features - I know you need binutils from
ports to use SSE3 features, for example - but whether that is what
happens here, or whether it is due to ffmpeg using newer features
would have to be answered by someone who understands what is going on!

Cheers

Tom
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Dimitry Andric

On 2011-12-07 01:40, Da Rock wrote:

I'm trying to build some newer versions of ffserver. But I keep getting
asm build errors when I get to libavcodec/vp*.

Error: `(%esi,%eax)' is not a valid 64 bit base/index expression

If I set it to build static it fails at h264.

"Error: `-1(%edi)'  is not a valid 64 bit base/index expression"

Googling hasn't proved helpful in finding an answer. I've tried setting
some configure options: arch=amd64/x86_64, disabling cmov/fast_cmov,
ebx, etc.

Any ideas how to fix this?


At first glance, I'd say you are compiling it with a 32-bit compiler or
assembler.

In any case, I downloaded the latest version (0.8.7) from ffmpeg.org,
and it compiles just fine with base gcc.  What are the exact commands
you are running?
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Da Rock

On 12/07/11 22:17, Tom Evans wrote:

On Wed, Dec 7, 2011 at 11:47 AM, Da Rock
  wrote:

I really hate sounding like an idiot, but if I don't ask I'll never know:
The assembler in base is not up-to-date with the latest instruction sets for
the cpu, and is causing an error because its telling the cpu to do something
it doesn't understand and is going WTF! So the port binutils provides the
latest instruction sets for the latest cpus. And ffmpeg and friends use the
latest cpu abilities to run as fast as they do? Right or way off? Otherwise
I'd have problems building anything, wouldn't I?

The way I understand it is that they use compiler/assembler features
that did not exist in the version of binutils that is in base.

That might be related to CPU features - I know you need binutils from
ports to use SSE3 features, for example - but whether that is what
happens here, or whether it is due to ffmpeg using newer features
would have to be answered by someone who understands what is going on!


Ok, that did just answer it. For starters SSE3 is used in 
ffmpeg/mplayer, but there would be more (3DNOW, etc). So that explains 
it... interesting study. I'll have a closer look at the docs on binutils 
to find out more.


Cheers
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Tom Evans
On Wed, Dec 7, 2011 at 1:52 PM, Dimitry Andric  wrote:
> On 2011-12-07 01:40, Da Rock wrote:
>>
>> I'm trying to build some newer versions of ffserver. But I keep getting
>> asm build errors when I get to libavcodec/vp*.
>>
>> Error: `(%esi,%eax)' is not a valid 64 bit base/index expression
>>
>> If I set it to build static it fails at h264.
>>
>> "Error: `-1(%edi)'  is not a valid 64 bit base/index expression"
>>
>> Googling hasn't proved helpful in finding an answer. I've tried setting
>> some configure options: arch=amd64/x86_64, disabling cmov/fast_cmov,
>> ebx, etc.
>>
>> Any ideas how to fix this?
>
>
> At first glance, I'd say you are compiling it with a 32-bit compiler or
> assembler.
>
> In any case, I downloaded the latest version (0.8.7) from ffmpeg.org,
> and it compiles just fine with base gcc.  What are the exact commands
> you are running?

I imagine you are running CURRENT or 9.0, which has a newer binutils
than 8-STABLE, which is what causes/exposes this issue.

Cheers

Tom
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Garrett Cooper
On Dec 7, 2011, at 6:22 AM, Tom Evans  wrote:

> On Wed, Dec 7, 2011 at 1:52 PM, Dimitry Andric  wrote:
>> On 2011-12-07 01:40, Da Rock wrote:
>>> 
>>> I'm trying to build some newer versions of ffserver. But I keep getting
>>> asm build errors when I get to libavcodec/vp*.
>>> 
>>> Error: `(%esi,%eax)' is not a valid 64 bit base/index expression
>>> 
>>> If I set it to build static it fails at h264.
>>> 
>>> "Error: `-1(%edi)'  is not a valid 64 bit base/index expression"
>>> 
>>> Googling hasn't proved helpful in finding an answer. I've tried setting
>>> some configure options: arch=amd64/x86_64, disabling cmov/fast_cmov,
>>> ebx, etc.
>>> 
>>> Any ideas how to fix this?
>> 
>> 
>> At first glance, I'd say you are compiling it with a 32-bit compiler or
>> assembler.
>> 
>> In any case, I downloaded the latest version (0.8.7) from ffmpeg.org,
>> and it compiles just fine with base gcc.  What are the exact commands
>> you are running?
> 
> I imagine you are running CURRENT or 9.0, which has a newer binutils
> than 8-STABLE, which is what causes/exposes this issue.

The question is: what is the OP running? I don't think that's been identified 
yet..
Thanks!
-Garrett___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: CPUTYPE and friends, from 'make.conf' benchmark

2011-12-07 Thread rank1seeker
> > Time is SAME as with generic binaries, but score is just a 1.2 higher,
> which is too small to be relevant.
> > What do you think about this?
> >
> 
> I think this is why most people don't bother with setting CPUTYPE ;)
> 
> Chris
> 

DUH!
Why you didn't told me that right away. instead making me into "ALL THIS"!
Yes, yes, very funy! I'll remember this!
:P

> As usual, it very well *may* be true, but please use ministat(1) to
> confirm. This requires more than one test. I'm not trying to be
> difficult - but statistics and benchmarking is non-trivial.
> 
> -- 
> Eitan Adler

I understand and have read your link about statistics and benchmarking ...
Yes, I agree. It is science for itself.

I've never heard for ministat(1) and will throw an eye on:

> A few other good suggestions:
> 
> http://wiki.freebsd.org/BenchmarkAdvice
> 
> - Max
> 


I would like to ask a few questions, regarding setting up ENVIROMENT for 
benchmarking, regardless of what will be benched!
That is, point where benchmarking hasn't even started!

I see it should be SUM (single user mode), with enabled, only essential "things"
Should it be a regular or MD ROOT based SUM (FreeBSD running in RAM)


Domagoj Smolčić

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Mike Meyer
On Wed, 7 Dec 2011 12:17:57 +
Tom Evans  wrote:
> The way I understand it is that they use compiler/assembler features
> that did not exist in the version of binutils that is in base.

Which begs the question - why isn't the new version of the tools
(provided by ports) listed in BUILDDEPENDS in the port, then?

  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-12-07 Thread Arnaud Lacombe
Hi,

On Sat, Nov 19, 2011 at 5:01 AM, Gleb Kurtsou  wrote:
> Hi,
>
> I was lucky to write a bit of code which gcc 4.2 fails to compile
> correctly with -O2. Too keep long story short the code fails for gcc
> from base system and last gcc 4.2 snapshot from ports. It works with gcc
> 4.3, gcc 4.4 on FreeBSD and Linux. Clang from base is also good. -O and
> -Os optimization levels are fine (I've tried with all -f* flags
> mentioned in documentation)
>
> -O2 -fno-omit-frame-pointer combination is troublesome on amd64. I
> presume i386 should be fine. These options are also used for
> compilation of kernel (with debugging enabled) and modules.
>
> I'm not able to share the code, but have a test case reproducing the
> bug. I've encountered the issue over a week ago and tried narrowing it down
> to a simple test I could share but without much success.
>
> The code itself is very common: initialize two structs on stack, call a
> function with pointers to those stucts as arguments. A number of inlined
> assertion functions. gcc fails to correctly optimize struct assignments
> with -fno-omit-frame-pointer, I have a number of small structs assigned,
> gcc decides not to use data coping but to assign fields directly. I've
> tried disabling sra, tweaking sra parameters -- no luck in forcing it
> to copy data. Replacing one particular assignment with memcpy produces
> correct code, but that's not a solution.
>
> -O2 -fno-omit-frame-pointer -fno-inline is buggy
> -O2 -fno-omit-frame-pointer -frename-registers is buggy
>
> I found similar issue with gcc 4.6, but I'm not able to reproduce it
> with gcc test case:
> https://bugzilla.redhat.com/show_bug.cgi?id=679924
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47893
>
this PR seems highly irrelevant, the cause has been identified to a
commit made in mid-2010, that's 3 years older than gcc in base.

> I'll be glad to help debugging it and will be hanging on #bsddev during
> weekend as glk.
>
at least, can you share the testcase and miscompilation details ?

Thanks,
 - Arnaud
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Da Rock

On 12/08/11 00:45, Garrett Cooper wrote:

On Dec 7, 2011, at 6:22 AM, Tom Evans  wrote:


On Wed, Dec 7, 2011 at 1:52 PM, Dimitry Andric  wrote:

On 2011-12-07 01:40, Da Rock wrote:

I'm trying to build some newer versions of ffserver. But I keep getting
asm build errors when I get to libavcodec/vp*.

Error: `(%esi,%eax)' is not a valid 64 bit base/index expression

If I set it to build static it fails at h264.

"Error: `-1(%edi)'  is not a valid 64 bit base/index expression"

Googling hasn't proved helpful in finding an answer. I've tried setting
some configure options: arch=amd64/x86_64, disabling cmov/fast_cmov,
ebx, etc.

Any ideas how to fix this?


At first glance, I'd say you are compiling it with a 32-bit compiler or
assembler.

In any case, I downloaded the latest version (0.8.7) from ffmpeg.org,
and it compiles just fine with base gcc.  What are the exact commands
you are running?

I imagine you are running CURRENT or 9.0, which has a newer binutils
than 8-STABLE, which is what causes/exposes this issue.

The question is: what is the OP running? I don't think that's been identified 
yet..

For reference 8.1 and 8.2. I'll post once I've had a chance to confirm 
the solution, but I'm pretty sure it will solve it based on the info 
I've been given.


Cheers
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Da Rock

On 12/08/11 05:47, Mike Meyer wrote:

On Wed, 7 Dec 2011 12:17:57 +
Tom Evans  wrote:

The way I understand it is that they use compiler/assembler features
that did not exist in the version of binutils that is in base.

Which begs the question - why isn't the new version of the tools
(provided by ports) listed in BUILDDEPENDS in the port, then?

I'm not building the port. This is my own build, so the builddepends 
isn't existent.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: 64bit build errors

2011-12-07 Thread Da Rock

On 12/08/11 08:31, Da Rock wrote:

On 12/08/11 05:47, Mike Meyer wrote:

On Wed, 7 Dec 2011 12:17:57 +
Tom Evans  wrote:

The way I understand it is that they use compiler/assembler features
that did not exist in the version of binutils that is in base.

Which begs the question - why isn't the new version of the tools
(provided by ports) listed in BUILDDEPENDS in the port, then?

I'm not building the port. This is my own build, so the builddepends 
isn't existent.

Hence hackers@, else I would have posted ports@
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


[SOLVED]Re: 64bit build errors - use gcc46

2011-12-07 Thread Da Rock

On 12/08/11 08:33, Da Rock wrote:

On 12/08/11 08:31, Da Rock wrote:

On 12/08/11 05:47, Mike Meyer wrote:

On Wed, 7 Dec 2011 12:17:57 +
Tom Evans  wrote:

The way I understand it is that they use compiler/assembler features
that did not exist in the version of binutils that is in base.

Which begs the question - why isn't the new version of the tools
(provided by ports) listed in BUILDDEPENDS in the port, then?

I'm not building the port. This is my own build, so the builddepends 
isn't existent.

Hence hackers@, else I would have posted ports@
Just to let the list know, I changed as - ./configure 
--as=/usr/local/bin/as. I still had the exact same error oddly enough.


I then had to install gcc46; and the error changed.

I then had to update the configure script to comment out the v4l 
videodev headers (weird). Bingo! I had success.


So, it begs the question did the as option change things? Or does gcc46 
imply the use of it anyway?


I'll have to try again without the option to see for sure, but for now I 
have another project that I need to keep the status quo for.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: [nvi-iconv]Call for test

2011-12-07 Thread Zhihao Yuan
Hi,

I uploaded a new version, 2.0.2.

http://students.cs.niu.edu/~z1565938/distfiles/nvi2-freebsd-2011-12-07.diff.gz

Same as before, you need to remove usr.bin/vi/port.h after you applied
this patch.

In this version, I analyzed all of the PRs, patches/commits of
Debian's nvi package and NetBSD's nvi-1.81.6b5 in base. Many bug fixes
are merged. And 2 main features are gained:

1. Recognized non-ASCII letters' upper/lower cases (~);
2. Recognized non-ASCII word boundary (w, ^A, regex, etc.).

Btw, vim don't have such features.

I also solved all memory leak in all know tests. iconv_open(3) usage
part is rewrote.

2 changes from NetBSD are not merged:

1. To use signed char instead of unsigned char in 8-bit mode. This
requires to cast all character to at least unsigned char when passing
them to ctype(3). Test cases are required to convince me on this part;
2. 32-bit clean regex. According to the PRs and commit log, I don't
have enough confidence in NetBSD's code here. Although the current
regex in use is only 24-bit clean, but it works correctly and, my
final solution is to use TRE in base directly.

Comments and test reports are welcome.

-- 
Zhihao Yuan, nickname lichray
The best way to predict the future is to invent it.
___
4BSD -- http://4bsd.biz/
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"