Re: [AD] Problem Building 4.9 SVN |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2008-10-25, Michael Swiger <mokkan@xxxxxxxxxx> wrote:
> Today, I checked out a fresh copy of 4.9 from the SVN repository and
> tried to build it. My environment is Windows XP Pro, and my compiler
> is an unofficial build of MinGW (gcc 4.3.2-tdm-1). It gave me the
> following:
>
> [ 23%] Building C object CMakeFiles/allegro_shared.dir/src/win/wgl_disp.c.obj
> Linking CXX shared library lib\liballegro-4.9.6.dll
> Creating library file: lib\liballegro-4.9.6.dll.a
> Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
> Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
> Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
> Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
> CMakeFiles\allegro_shared.dir\src\events.c.obj:events.c:(.text+0x2a): undefined
> reference to `___sync_sub_and_fetch_4'
> CMakeFiles\allegro_shared.dir\src\inline.c.obj:inline.c:(.text+0x116): undefined
> reference to `___sync_sub_and_fetch_4'
> CMakeFiles\allegro_shared.dir\src\inline.c.obj:inline.c:(.text+0x12a): undefined
> reference to `___sync_fetch_and_add_4'
> collect2: ld returned 1 exit status
> mingw32-make[2]: *** [lib/liballegro-4.9.6.dll] Error 1
> mingw32-make[1]: *** [CMakeFiles/allegro_shared.dir/all] Error 2
> mingw32-make: *** [all] Error 2
>
> Anyone know what's going on? 4.9 built for me just fine a few weeks ago...
Has anyone else tried 4.9 with mingw gcc 4.1+ recently? Then __sync_*
builtins were introduced with gcc 4.1 but I don't know if they're
supported on mingw (I assumed they were).
Meanwhile, you can change line 4 of
include/allegro5/internal/aintern_atomicops.h to (untested):
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && !defined(ALLEGRO_MINGW32)
Peter