#20 failed to build SDL trunk, _aligned_malloc conflict

closed
nobody
None
5
2010-01-11
2009-12-27
No

x86_64-w64-mingw32-gcc toolchain is built from the newest source code from scratch
when build SDL ( www.libsdl.org) trunk , got the following error :

libtool: compile: x86_64-w64-mingw32-gcc -g -O2 -Iinclude -I/compile/mingw-w64-dgn/lib_source/SDL/include -D_GNU_SOURCE=1 -mmmx -m3dnow -MMD -MT build/SDL_alphamult.lo -c /compile/mingw-w64-dgn/lib_source/SDL/src/video/SDL_alphamult.c -DDLL_EXPORT -DPIC -o build/.libs/SDL_alphamult.o
In file included from /compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.0/include/xmmintrin.h:39:0,
from /compile/mingw-w64-dgn/lib_source/SDL/src/video/SDL_blit.h:34,
from /compile/mingw-w64-dgn/lib_source/SDL/src/video/SDL_alphamult.c:24:
/compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.0/include/mm_malloc.h:31:1: error: static declaration of '_aligned_malloc' follows non-static declaration
/compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/include/stdlib.h:413:25: note: previous declaration of '_aligned_malloc' was here
/compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.0/include/mm_malloc.h:68:1: error: static declaration of '_aligned_free' follows non-static declaration
/compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/include/stdlib.h:412:24: note: previous declaration of '_aligned_free' was here
make: *** [build/SDL_alphamult.lo] error 1

[drangon@dgncnt5 mingw-w64-dgn]$ x86_64-w64-mingw32-gcc -v
Using built-in specs.
COLLECT_GCC=x86_64-w64-mingw32-gcc
COLLECT_LTO_WRAPPER=/compile/mingw-w64-dgn/cross/libexec/gcc/x86_64-w64-mingw32/4.5.0/lto-wrapper
Target: x86_64-w64-mingw32
Configured with: /compile/mingw-w64-dgn/source/gcc/configure --target=x86_64-w64-mingw32 --disable-nls --disable-multilib --with-gmp=/compile/mingw-w64-dgn/build/for_cross --enable-languages=c,c++ --disable-libstdcxx-pch --prefix=/compile/mingw-w64-dgn/cross --with-sysroot=/compile/mingw-w64-dgn/cross
Thread model: win32
gcc version 4.5.0 20091227 (experimental) (GCC)

Discussion

  • Kai Tietz

    Kai Tietz - 2009-12-27

    Hello,

    this issue is related to the different definition of aligned_malloc in gcc's headers and what msvcrt really expects. Therefore we support the intrin.h header file, which should be used here instead of including directly gcc's intrinsic headers.
    This should fix your issue.

    Sorry, but for this we can't do much in our header-set.

    Cheers,
    Kai

     
  • Kai Tietz

    Kai Tietz - 2009-12-27
    • status: open --> pending
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks