Hi,

I have been trying to build Mesa-7.1 with mingw. Probably should have tried with a RC, sorry.

Just two little things that I find.

1. Mesa-7.1/src/mesa/Makefile.mgw

This file references the CORE_SOURCES variable which no longer exists.
I used MESA_SOURCES and GLAPI_SOURCES to get it to work.

Patch Makefile.mgw.7.1.patch attached.

2. Mesa-7.1/src/mesa/main/imports.c

The _mesa_ffs function specifically tries to use the glibc inbuilt function rather than the code written here. Unfortunately this no longer compiles on my up to date cygwin-mingw system because the symbol _ffs is not found at link. I went back and tried to rebuild a previously successful build of 7.0.1 and that fails at linking too. I went looking to see if I could find record of a change in mingw but haven't found it yet. Even so I removed the specific use of this function for MINGW to get it working (I notice that the compilation step also warns that the function is not declared.)

Patch mesa-main-imports-7.1.patch attached.

With these two little patches mesa builds fine (although not GLU, but I didn't investigate).

Shane.
--- Mesa-7.1/src/mesa/Makefile.mgw	2008-08-26 02:46:42.000000000 +1200
+++ Mesa-7.1-24bit-mingw/src/mesa/Makefile.mgw	2008-09-10 11:53:57.000000000 +1200
@@ -152,11 +152,11 @@
 	drivers/windows/gdi/wmesa.c \
 	drivers/windows/gdi/wgl.c
 endif
 endif
 
-SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(COMMON_DRIVER_SOURCES) $(DRIVER_SOURCES)
+SOURCES = $(MESA_SOURCES) $(GLAPI_SOURCES) $(X86_SOURCES) $(DRIVER_SOURCES)
 
 OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
 
 X86_OBJECTS = $(addsuffix .o,$(basename $(X86_SOURCES)))
 
--- Mesa-7.1/src/mesa/main/imports.c	2008-08-26 02:46:44.000000000 +1200
+++ Mesa-7.1-24bit-mingw/src/mesa/main/imports.c	2008-09-10 11:15:53.000000000 +1200
@@ -557,11 +557,11 @@
  * Find the first bit set in a word.
  */
 int
 _mesa_ffs(int i)
 {
-#if (defined(_WIN32) && !defined(__MINGW32__) ) || defined(__IBMC__) || defined(__IBMCPP__)
+#if (defined(_WIN32) ) || defined(__IBMC__) || defined(__IBMCPP__)
    register int bit = 0;
    if (i != 0) {
       if ((i & 0xffff) == 0) {
          bit += 16;
          i >>= 16;
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to