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

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



Thanks Lenard,

I have it compiling and linking and everything. However, the windows and the linux versions require very different library linking. So right now I've got two separate lines in Setup.in, one that is for windows, and one that is for Linux. Just comment or decomment them. The problem, however, is, is there a way to have the ./configure selectively use one line or the other?

I also ran into a problem executing my module, once compiled and linked together correctly:

      0 [main] us 0 open_stackdumpfile: Dumping stack trace to us.stackdump
Traceback (most recent call last):
  File "movie_test.py", line 7, in <module>
    import pygame._movie as movie
ImportError: DLL load failed: Invalid access to memory location.

I'm going to do a bunch of documentation updates, and then turn back to the windows functionality. I don't think I'll get it(windows port) in time for the pencils down deadline on monday. At the very least, it will be an alpha release.

Sorry guys, I overestimated the difficulty of the project. I will do what I can over the next school semester to get it to a much more capable and stable state.

-Tyler

On Thu, Aug 13, 2009 at 3:13 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
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:

http://www3.telus.net/len_l/pygame/experimental/ffmpeg.tar.gz

md5sum:
db4d51a61dbd56a1453e332774dfa494

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.

Lenard


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*

-Tyler
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?

   -Tyler


   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
           stuff
              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.

           :)

           -Tyler

       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.

       Lenard




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




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




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