Subject: Re: problem building magicpoint-1.10a
To: Dan Winship <danw@NetBSD.org>
From: Ronald van der Pol <Ronald.vanderPol@rvdp.org>
List: tech-pkg
Date: 05/25/2004 16:25:20
On Tue, May 25, 2004 at 07:56:37 -0400, Dan Winship wrote:

> Yeah, I noticed that too, but I got the same results on NetBSD 1.6, so 
> I assumed that it wasn't a bug... But maybe the package just got broken 
> at some point?

On MacOSX configure doesn't set $LIBS correctly (-L without argument):

+ eval echo 'configure:4247: "$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5"'
++ echo configure:4247: 'gcc -o conftest -g -O2   conftest.c -lttf  -L -lm  >&5'
+ ac_status=1
+ echo 'configure:4250: $? = 1'
+ exit 1
+ echo 'configure: failed program was:'
+ cat conftest.c
+ ac_cv_lib_ttf_TT_Init_FreeType=no
+ rm -f conftest.o conftest conftest.c
+ LIBS=-L -lm 
+ echo 'configure:4267: result: no'
+ echo no
no
+ test no = yes
+ echo 'Fatal: libttf.a not found'
Fatal: libttf.a not found
+ exit 1
+ exit_status=1

If I do it by hand with
cc -o conftest -g -O2   conftest.c -lttf  -L/usr/pkg/lib -lm
it compiles, but coredumps when run:

spock# ./conftest 
Bus error

Host Name:      spock-rfc1918
Date/Time:      2004-05-25 16:15:42 +0200
OS Version:     10.3.3 (Build 7F44)
Report Version: 2

Command: conftest
Path:    ./conftest
Version: ??? (???)
PID:     18345
Thread:  0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000001

Thread 0 Crashed:
0   libttf.4.dylib      0x0002d358 TT_Init_FreeType + 0xac
1   conftest            0x00001dc8 main + 0x18
2   conftest            0x00001ae0 _start + 0x188 (crt.c:267)
3   conftest            0x00001954 start + 0x30

PPC Thread State:
  srr0: 0x0002d358 srr1: 0x0000f030                vrsave: 0x00000000
    cr: 0x24000244  xer: 0x0000000c   lr: 0x0002d328  ctr: 0x00000000
    r0: 0x005001d0   r1: 0xbffffcd0   r2: 0x005001d4   r3: 0x00000000
    r4: 0x00000800   r5: 0x00000000   r6: 0x00000030   r7: 0x00000c03
    r8: 0x00000040   r9: 0x00000005  r10: 0x00000040  r11: 0x00000100
   r12: 0x900f5cc0  r13: 0x00000000  r14: 0x00000000  r15: 0x00000000
   r16: 0x00000000  r17: 0x00000000  r18: 0x00000000  r19: 0x00000000
   r20: 0x00000000  r21: 0x00000000  r22: 0x00000000  r23: 0x00000000
   r24: 0x00000000  r25: 0x00000000  r26: 0xbffffe30  r27: 0x00000008
   r28: 0x00000001  r29: 0x00000001  r30: 0x00000000  r31: 0x0000196c

Binary Images Description:
    0x1000 -     0x1fff conftest        ./conftest
    0xd000 -    0x12fff libintl.4.dylib         /usr/pkg/lib/libintl.4.dylib
   0x2c000 -    0x4cfff libttf.4.dylib  /usr/pkg/lib/libttf.4.dylib
0x8fe00000 - 0x8fe4ffff dyld    /usr/lib/dyld
0x90000000 - 0x90122fff libSystem.B.dylib       /usr/lib/libSystem.B.dylib
0x939d0000 - 0x939d4fff libmathCommon.A.dylib   /usr/lib/system/libmathCommon.A.
dylib
0x96cb0000 - 0x96d9efff libiconv.2.dylib        /usr/lib/libiconv.2.dylib

	rvdp

BTW, after 'pkg_delete -R freetype-1.3.1nb1' I lost my libttf.a. I had to
reinstall freetype-lib-1.3.1nb1. So I guess it magicpoint needs a dependance
on it?