[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: Adding a new extension to the Windows compilation order

Hi Tyler,

For external dependencies the Dependency class in config_msys.py has an optional libs argument. I believe it is what you want. Just set it to a list of library root names.

Here is the ffmpeg library I built:



It was cross compiled with from linux with mingw. I added ffmpeg to msys_build_deps.py on your branch. It sets the --enable-memalign-hack flag for configure, so maybe that is what is needed for the stack error. If you use the prebuilt library then unzip the file into the prebuilt directory. You will need to add ffmpeg to prebuilt\Config_Win.in. If you so me the part of the Setup file that is between "#--StartConfig" and "#--EndConfig" I will give you an undated version and also add it to prebuilt-template in your branch.


Tyler Laing wrote:
Unfortunately, I get an error when I execute my module, that says basically

"Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. Do not report crashes to FFmpeg developers."

It suggest recompiling with gcc4.2 or greater, so I've been trying to get a mingw version of gcc, 4.2 or greater, but it fails everytime. I do recall someone managing to compile the ffmpeg libraries before on windows? If I could get those, I have a feeling, things will work properly.

But I don't think we will have windows functionality for the module just yet, unfortunately. *sighs*

On Thu, Aug 13, 2009 at 11:17 AM, Tyler Laing <trinioler@xxxxxxxxx <mailto:trinioler@xxxxxxxxx>> wrote:

    I finally got it working. It was dependent on the order of the
    libraries, as well as two extra libraries, winsock and zlib. How
    would I go about adding these flags only for windows compilation?


    On Wed, Aug 12, 2009 at 11:00 PM, Lenard Lindstrom
    <len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>> wrote:

        Tyler Laing wrote:

            On Wed, Aug 12, 2009 at 6:25 PM, Lenard Lindstrom
            <len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>
            <mailto:len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>>> wrote:

               Hi Tyler,

               Ignore config_win.py. It is for using the prebuilts and
               compiled with Visual C++. Visual C++ prebuilt
            compilation has not
               been maintained for awhile and is moot anyway since
            ffmpeg is not
               designed to compile with it. So add ffmpeg to config_mys.py
               instead. This will use msys/1.0/local/ stuff. You have
            to add a
               separate Dependency inststance for each shared library
            of ffmpeg.
               I have already added the ffmpeg libraries to dll.py, so
            look there
               for the names to use: AVCODEC, AVFORMAT and so on. I
            see I did not
               update the prebuilt-template\Config_Win.in for ffmpeg.
            It is used
               with the prebuilts.

               Lenard Lindstrom

            Thanks Lenard, I'll try that tomorrow. Do you guys mind if
            I add a big documentation note to config_win.py that it
            hasn't been updated or maintained in awhile? Just so no
            one else goes down the same fruitless red brick road as I
            did, lol.



        Please do. Obviously the note at the top about file searches
        being broken was too subtle a warning. If you do place the
        warning at the top just be sure to mention that
        setup_prebuilt() is still relevant and used.


-- Visit my blog at http://oddco.ca/zeroth/zblog

Visit my blog at http://oddco.ca/zeroth/zblog