Re: [AD] Patch to allow Allegro 4.3.10plus to build on Haiku

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, Oct 20, 2008 at 10:11 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On 2008-10-20, scott mc <scottmc2@xxxxxxxxxx> wrote:
>>
>> For TRACE I'm getting an error:
>> arguments given to macro `TRACE'
>>
>> Here's my terminal session trying to build 4.3.10plus r11120 on haiku.
>>  When hitting one of the TRACE cases, I commented that line out and
>> reran make. I clipped out the redundant parts of the terminal session.
>
> I think I've found the bug. In bealleg.h there is a line:
>
>    # undef TRACE
>
> Hence, it's not calling Allegro's TRACE at all.  Do the BeOS headers
> define TRACE?  We should probably rename ours to _AL_TRACE or something.
>
>>  Now it's erroring out on some stub, not even getting to the
>> obj/beos/alleg/beos part yet.
>> Couple of questions, where is the TRACE macro defined, and what's this
>> stub error?  Also there's a few warnings that pop-up in the build, let
>> me know if any of those should be addressed.
>> -scottmc
>
>> gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -Wno-multichar
>> -Wno-ctor-dtor-privacy -mcpu=i586 -O6 -funroll-loops -ffast-math
>> -fomit-frame-pointer -DALLEGRO_NO_ASM -I. -I./include -o
>> obj/beos/alleg/bmousapi.o -c src/beos/bmousapi.cpp
>> /boot/home/4.3.10plus/src/beos/bmousapi.cpp:34: warning: `CLAMP' redefined
>> /boot/home/4.3.10plus/include/allegro/base.h:82: warning: this is the
>> location of the previous definition
>> /boot/home/4.3.10plus/src/beos/bmousapi.cpp:81: arguments given to macro `TRACE'
>> make: *** [obj/beos/alleg/bmousapi.o] Error 1
>
> I've deleted this definition of `CLAMP' now.
>
>> obj/beos/alleg/cmiscs.o: In function `_stub_bank_switch':
>> src/c/cmiscs.s:(.text+0x0): multiple definition of `_stub_bank_switch'
>> obj/beos/alleg/cmisc.o:cmisc.c:(.text+0x74): first defined here
>> obj/beos/alleg/cmiscs.o: In function `_stub_unbank_switch':
>> src/c/cmiscs.s:(.text+0x8): multiple definition of `_stub_unbank_switch'
>> obj/beos/alleg/cmisc.o:cmisc.c:(.text+0x88): first defined here
>> obj/beos/alleg/cmiscs.o: In function `_stub_bank_switch_end':
>> src/c/cmiscs.s:(.text+0xc): multiple definition of `_stub_bank_switch_end'
>> obj/beos/alleg/cmisc.o:cmisc.c:(.text+0x8c): first defined here
>> collect2: ld returned 1 exit status
>> make: *** [lib/beos/liballeg-4.3.11.so] Error 1
>> ~/4.3.10plus>
>
> My fault.  I wasn't sure if deleting `cmiscs' from makefile.be was
> correct.  It's deleted now.
>
> Peter
>
>

Ok, trying with r11124, I got the TRACE error, so I commented out the
undef in bealleg.h, and not got this:
In file included from /boot/develop/headers/be/SupportKit.h:13,
                 from /boot/develop/headers/be/Be.h:14,
                 from /boot/home/allegro/include/bealleg.h:51,
                 from /boot/home/allegro/src/beos/baccel.cpp:19:
/boot/develop/headers/be/support/Debug.h:77: warning: `TRACE' redefined
/boot/home/allegro/include/allegro/debug.h:40: warning: this is the
location of the previous definition
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -Wno-multichar
-Wno-ctor-dtor-privacy -mcpu=i586 -O6 -funroll-loops -ffast-math
-fomit-frame-pointer -DALLEGRO_NO_ASM -I. -I./include -o
obj/beos/alleg/bdispsw.o -c src/beos/bdispsw.cpp
In file included from /boot/develop/headers/be/SupportKit.h:13,
                 from /boot/develop/headers/be/Be.h:14,
                 from /boot/home/allegro/include/bealleg.h:51,
                 from /boot/home/allegro/src/beos/bdispsw.cpp:18:
/boot/develop/headers/be/support/Debug.h:77: warning: `TRACE' redefined
/boot/home/allegro/include/allegro/debug.h:40: warning: this is the
location of the previous definition
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -Wno-multichar
-Wno-ctor-dtor-privacy -mcpu=i586 -O6 -funroll-loops -ffast-math
-fomit-frame-pointer -DALLEGRO_NO_ASM -I. -I./include -o
obj/beos/alleg/bdwindow.o -c src/beos/bdwindow.cpp
In file included from /boot/develop/headers/be/SupportKit.h:13,
                 from /boot/develop/headers/be/Be.h:14,
                 from /boot/home/allegro/include/bealleg.h:51,
                 from /boot/home/allegro/src/beos/bdwindow.cpp:20:
/boot/develop/headers/be/support/Debug.h:77: warning: `TRACE' redefined
/boot/home/allegro/include/allegro/debug.h:40: warning: this is the
location of the previous definition
/boot/home/allegro/src/beos/bdwindow.cpp:264: arguments given to macro `TRACE'
make: *** [obj/beos/alleg/bdwindow.o] Error 1
~/allegro>

So yes, perhaps _AL_TRACE_ might be a good idea.
-scott




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/