Re: [AD] Porting Allegro to Haiku |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Wed, Aug 27, 2008 at 1:54 AM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On 2008-08-27, Peter Wang <novalazy@xxxxxxxxxx> wrote:
>>
>> It's in include/allegro/platform/alunixac.hin, selected with `configure'
>> on traditional Unix.
>>
>> /* Define as the return type of signal handlers (`int' or `void'). */
>> #undef RETSIGTYPE
>>
>> But, you probably don't want usigalrm.c anyway. Instead you should be
>> using uthreads.c. Probably you didn't define HAVE_LIBPTHREAD somewhere.
>>
>
> Actually, you might not want that either, as there is a BeOS timer
> implementation in btimeapi.cpp. It should be updated to take into
> account actual sleep times, however (see uptimer.c for what I mean).
>
> Peter
>
Ok. I'm making some progress on this. I put in a simple ifdef check
in usigalrm.c and uptimer.c, the real fix is to figure out why Haiku
isn't setting HAVE_LIBPTHREAD when it does. I then ran into a couple
of case where -lm was assumed. I'll look into a proper fix for that
when i get time. One should never "assume" that -lm is required, just
add a check for it, such as checking to see if cos or sqrt is in libm
and if so then use the -lm. Anyways, after removing the '-lm's I ran
into a few more errors and created patches for them. My latest patch
is now on the HaikuPorts site:
http://ports.haiku-files.org/browser/haikuports/trunk/media-libs/allegro/allegro-4.3.10-haiku-4.diff?rev=155
Here's where it's now failing during make:
http://ports.haiku-files.org/wiki/media-libs/allegro/4.3.10/1?version=5
It appears that allegro-config didn't get made?
I just searched and it did, but didn't get installed into
/boot/common/bin. I copied it there and then a few more were not in
the right place so copied those over and found another -lm... fixed
that and .....
it compiled....
now to test it out.
looks like i also need a symlink, liballeg.so.4.3.
Trying the shooter demo:
~/allegro-4.3.10-haiku-test/demos/shooter> shooter
runtime_loader: elf_resolve_symbol: could not resolve symbol
'_colorconv_rgb_scale_5x35'
resolve symbol "_colorconv_rgb_scale_5x35" returned: -2147478780
runtime_loader: troubles relocating: 0x80001304 (image:
/boot/common/lib/liballeg-4.3.10.so, liballeg.so.4.3)
Looks like still more work needed...
I'll work on cleaning up and adding in fixes to get the libs put into
the right places.
-scottmc