Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Programming and Hacking > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st March 2007, 21:36   #41  |  Link
cc979
Curious BetaTester
 
Join Date: Oct 2005
Posts: 430
Quote:
Originally Posted by morph166955 View Post
well i succesfully got 4.2 working on an svn update from earlier today on both c & c++ so that was nice. im now trying to tweak it a little to be more optimized so that it runs faster and all that jazz.
did you patch your gcc 4.2 to fix alias thunk problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27067

regarding gcc 4.3 did you update to the latest binutils - with patched winres?

hope devs include the patch in 4.2 & 4.3 has they did not with gcc 4.1.2

i'll dig a bit further to see whats up, cheers
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT

Tools: ProcessExplorer & ProcessMonitor - BatchCompressor

Guide: MinGW Compiling GCC
cc979 is offline   Reply With Quote
Old 1st March 2007, 21:39   #42  |  Link
cc979
Curious BetaTester
 
Join Date: Oct 2005
Posts: 430
Quote:
Originally Posted by Yong View Post
just tried compile ffdshow.ax without -mtune -march options, still no luck
snap - just tried again, think i'll revert to an previous svn try and debug it

cheers
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT

Tools: ProcessExplorer & ProcessMonitor - BatchCompressor

Guide: MinGW Compiling GCC
cc979 is offline   Reply With Quote
Old 2nd March 2007, 02:39   #43  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
i did not do any patches at all. i compiled 4.2 successfully from yesterdays svn with:
Code:
../gcc-4.2.0/configure -v --enable-optimize --enable-languages=c,c++ --prefix=/mingw \
--enable-threads --oldincludedir=/mingw/include --disable-shared \
--with-cpu=prescott --with-arch=prescott --with-tune=prescott \
--with-ld=/mingw/bin/ld.exe --with-as=/mingw/bin/as.exe --disable-checking \
--without-x --disable-win32-registry --disable-nls --disable-werror --disable-libssp

make "CFLAGS=-O3 -march=prescott -mtune=prescott -msse -msse2 -msse3 -mmmx" "LDFLAGS=-s"
i realize the make line is a little excessive and probably unnecessary with the sse stuff but i figured it couldnt hurt. i was shooting for the most optimized and fastest compiler i could get and i figured that telling it to compile with the extra instruction sets put in would be nice (i wasnt looking to distribute this to anyone else and im only using it on this system).

as for 4.3, the snapshot from back in december works with out any problems. the current svn doesnt work. i think the reason why is because they moved things around and created a libgcc folder which is whats causing my problem (atleast one of them). i think something is screwed up with the way they do the dependancys for it creating the .dep files and not deleting them.

what im probably going to do is see the exact point they did that move and then try to get an svn of the version right before it (maybe ill go back a few from that just to be safe) and see if it works. wish me luck, ill let ya know how it goes.
morph166955 is offline   Reply With Quote
Old 2nd March 2007, 02:56   #44  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
sorry missed your point bout binutils...i pulled an svn down like 3 days ago and successfully built and installed that so i believe that should be good (unless the patch is something i have to add on top of that). afaik binutils has things like ar and ld, so below are my version info on those. im rebuilding/installing them from the most current svn now just incase althoguh i doubt it will do anything for me.

GNU ld version 2.17.50 20070228
GNU ar 2.17.50 20070228
morph166955 is offline   Reply With Quote
Old 2nd March 2007, 03:49   #45  |  Link
cc979
Curious BetaTester
 
Join Date: Oct 2005
Posts: 430
Quote:
Originally Posted by morph166955 View Post
sorry missed your point bout binutils...i pulled an svn down like 3 days ago and successfully built and installed that so i believe that should be good (unless the patch is something i have to add on top of that). afaik binutils has things like ar and ld, so below are my version info on those. im rebuilding/installing them from the most current svn now just incase althoguh i doubt it will do anything for me.

GNU ld version 2.17.50 20070228
GNU ar 2.17.50 20070228
mingw binutils was patched to handle spaces in filenames, the link is on page1

the gcc 4.2 patch i was talking about fixes a problem about 'thunk alias's' - it was working in gcc 4.0 branch put they broke or changed something in gcc 4.2 and gcc 4.3 - so you might have problems compiling somethings

looking at your config sames like you can't it any faster, maybe if you use profiledbootstrap (but thats a different ball game - should be docs floating around about it)

you could re-compile gcc 4.2 with 'make bootstrap' just to check for errors

cheers
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT

Tools: ProcessExplorer & ProcessMonitor - BatchCompressor

Guide: MinGW Compiling GCC
cc979 is offline   Reply With Quote
Old 2nd March 2007, 04:18   #46  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
ill test the mingw binutils but if memory serves i used that before building my own and i had the same issue. thanks
morph166955 is offline   Reply With Quote
Old 2nd March 2007, 09:00   #47  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
its officially 3am but i just thought id post this up for now...ill explain tomorrow morning when I am consious

Code:
$ gcc --version
gcc.exe (GCC) 4.3.0 20070301 (experimental)
thats off of the current svn btw. the ONLY change I had to make was to add "rm -f *.dep" to libgcc/Makefile.in immeadiately above the make line i believe it was under the "all" category. ill make a diff tomorrow and upload it...that is a fully optimized version of gcc btw...and i got both c and c++ to compile. im considering trying to make java work too so that I can do some of my java work also on it, but thats for later. my next task, getting mplayer working on this again but this time im going to have all of my libraries optimized for core2/ssse3...
morph166955 is offline   Reply With Quote
Old 2nd March 2007, 19:22   #48  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
so interesting quirk. mplayer wont compile at -O0 or -O4 but does on -O1

i get an "'asm' operand has impossible constraint" error with libavcodec/i386/dsputil_mmx.c on line 636 (that matches the first asm volatile call in static inline void transpose4x4). my quick searching on google shows that this could be a gcc 4.2/4.3 error however i also found something on the gcc buglist about a similar file/problem from oct 2006 (h264.c http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440) and this is exhibiting identical signs. any advice?

EDIT: so yea...seems that it works...sometimes. its kinda weird...ive run it now twice at -O4 with no changes to the system at all and it worked once and failed once...im doing more runs with different options on the gcc line to see what caused the failure...

EDIT2: ok ignore the whole thing bout -O what ever...it was crashing only when using "-march=core2 -mtune=core2" however i tested it on prescott and that worked...im looking more into it. im thinking the way i built/optimized 4.3 may have had something to do with it so im making another build now that is completely unoptimized to double check.

Last edited by morph166955; 2nd March 2007 at 20:12.
morph166955 is offline   Reply With Quote
Old 3rd March 2007, 01:16   #49  |  Link
cc979
Curious BetaTester
 
Join Date: Oct 2005
Posts: 430
Quote:
Originally Posted by morph166955 View Post
so interesting quirk. mplayer wont compile at -O0 or -O4 but does on -O1

i get an "'asm' operand has impossible constraint" error with libavcodec/i386/dsputil_mmx.c on line 636 (that matches the first asm volatile call in static inline void transpose4x4). my quick searching on google shows that this could be a gcc 4.2/4.3 error however i also found something on the gcc buglist about a similar file/problem from oct 2006 (h264.c http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440) and this is exhibiting identical signs. any advice?

EDIT: so yea...seems that it works...sometimes. its kinda weird...ive run it now twice at -O4 with no changes to the system at all and it worked once and failed once...im doing more runs with different options on the gcc line to see what caused the failure...

EDIT2: ok ignore the whole thing bout -O what ever...it was crashing only when using "-march=core2 -mtune=core2" however i tested it on prescott and that worked...im looking more into it. im thinking the way i built/optimized 4.3 may have had something to do with it so im making another build now that is completely unoptimized to double check.
if you use 'make bootstrap' it should tell if you have errors
also there's 'make check' but you need some others files, i think dejagnu

i've just trying to do a cross-compile with linux - not had much look yet

cheers
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT

Tools: ProcessExplorer & ProcessMonitor - BatchCompressor

Guide: MinGW Compiling GCC
cc979 is offline   Reply With Quote
Old 3rd March 2007, 01:56   #50  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
ive run make bootstrap and it works also. im attempting a cygwin cross-compile now (im still at the stage that im compiling/loading gmp,bison, etc). i can get 4.3 to compile and work when its in "prescott mode" its just agrivating that i cant get libavcodec to compile with core2 set.

the other issue im still having (and i loaded the binutils from sf.net already as well as my own) is that when gcc is run with -MM i still get output that has C:/msys... in it. the colon is whats causing my problem cause for some reason it isnt converting that to /c/msys and im not sure how to force that to do it. im kinda stumped on that one and i think if i fixed that then things would be much easier in this build for me.
morph166955 is offline   Reply With Quote
Old 3rd March 2007, 02:51   #51  |  Link
cc979
Curious BetaTester
 
Join Date: Oct 2005
Posts: 430
Quote:
Originally Posted by morph166955 View Post
ive run make bootstrap and it works also. im attempting a cygwin cross-compile now (im still at the stage that im compiling/loading gmp,bison, etc). i can get 4.3 to compile and work when its in "prescott mode" its just agrivating that i cant get libavcodec to compile with core2 set.

the other issue im still having (and i loaded the binutils from sf.net already as well as my own) is that when gcc is run with -MM i still get output that has C:/msys... in it. the colon is whats causing my problem cause for some reason it isnt converting that to /c/msys and im not sure how to force that to do it. im kinda stumped on that one and i think if i fixed that then things would be much easier in this build for me.
is libavutil patched with this http://lists.mplayerhq.hu/pipermail/...er/005868.html
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT

Tools: ProcessExplorer & ProcessMonitor - BatchCompressor

Guide: MinGW Compiling GCC
cc979 is offline   Reply With Quote
Old 3rd March 2007, 03:02   #52  |  Link
cc979
Curious BetaTester
 
Join Date: Oct 2005
Posts: 430
just found that compiling gmp & mfpr using gcc-4.1.2, fail the 'make check' so the libs can't be trusted - they are fine using gcc-4.0.4
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT

Tools: ProcessExplorer & ProcessMonitor - BatchCompressor

Guide: MinGW Compiling GCC
cc979 is offline   Reply With Quote
Old 3rd March 2007, 20:12   #53  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
i havent patched it yet no...i was waiting to get a vanilla version working before going any further with patches and such. My cygwin cross-compile failed but I think its cause my cygwin isnt setup properly (ive never used it before and I just installed it).

I have a freebsd 6.1 box that im going to try to compile it on today to see if that works. assuming I can get it working I'll be happy although I have a feeling that I'm going to have a similar problem that I have now. I'm probably going to end up upgrading that box to have 4.3 locally so that it can create my core2 optimized version of 4.3 for mingw after that works.
morph166955 is offline   Reply With Quote
Old 4th March 2007, 03:45   #54  |  Link
cc979
Curious BetaTester
 
Join Date: Oct 2005
Posts: 430
i've successfully cross-compiled gcc 4.0.4 using linux, i'll post a guide soon - more testing first

then i'll try doing a cross-compiled 4.2 & 4.3

cheers
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT

Tools: ProcessExplorer & ProcessMonitor - BatchCompressor

Guide: MinGW Compiling GCC
cc979 is offline   Reply With Quote
Old 4th March 2007, 03:55   #55  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
can you by chance give me a cliff notes of what you did or at least your configure line to use as a base? i JUST finished upgrading gcc natively on my bsd box and im getting ready to do the cross compile in the next half hour.
morph166955 is offline   Reply With Quote
Old 4th March 2007, 04:16   #56  |  Link
cc979
Curious BetaTester
 
Join Date: Oct 2005
Posts: 430
cross-compile

it's tricky -- tuck about 2days of re-learning

you will need bison,flex libtool, and maybe others

first you compile binutils with
Quote:
../configure --prefix=/mingw --target=i686-pc-mingw32
make && make install

then

PATH=$PATH:/mingw/bin
(so it knows where the new mingw32-cross is)

then you need mingw32-includes & libs in the correct folder
eg. /mingw/i686-pc-mingw32/

then compile gcc with
Quote:
../configure --prefix=/mingw --target=mingw32
make && make install

then

CC=/usr/bin/gcc
and re-compile with
Quote:
../configure --prefix=/mingw --build=i686-pc-linux-gnu --host=i686-pc-mingw32
then then final-recompile

Quote:
$ gcc -v
Using built-in specs.
Target: i686-pc-mingw32
Configured with: ../configure --build=i686-pc-linux-gnu --host=i686-pc-mingw32 --enable-languages=c,c++ --prefix=/mingw -v --enable-optimize --enable-threads --disable-nls --disable-win32-registry --disable-shared --without-x
Thread model: win32
gcc version 4.0.4
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT

Tools: ProcessExplorer & ProcessMonitor - BatchCompressor

Guide: MinGW Compiling GCC
cc979 is offline   Reply With Quote
Old 4th March 2007, 04:37   #57  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
ok i get the first gcc compile...but why the second with --build and --host instead of --target? everything ive seen has not had that final step. also why am i setting CC=... for that phase?
morph166955 is offline   Reply With Quote
Old 4th March 2007, 04:58   #58  |  Link
cc979
Curious BetaTester
 
Join Date: Oct 2005
Posts: 430
build=is always the systems-compiler
host=is what system its going to run on
target=create code for the desired system

cross-compile is the target=mingw
and build=system(as it needs to run the code it makes)
and target=mingw

so the last step is a cross-compiler that can on run on its own system and produce=mingw too

there's plenty of docs on the net but hard to follow, as there scripts what never work for me

cheers
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT

Tools: ProcessExplorer & ProcessMonitor - BatchCompressor

Guide: MinGW Compiling GCC
cc979 is offline   Reply With Quote
Old 4th March 2007, 05:06   #59  |  Link
morph166955
Registered User
 
Join Date: Mar 2006
Posts: 443
well thats my point...none of the docs i have read online including whats on the mingw site have said anythingabout that last step that i was asking about...atleast not anything to do with changing build...i think one showed doing something to host.
morph166955 is offline   Reply With Quote
Old 4th March 2007, 05:15   #60  |  Link
ffmpeg
king.dev
 
Join Date: Dec 2004
Posts: 44
good,I will try to compile
__________________
http://quiclive.com
ffmpeg is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:57.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.