Subject Re: [ib-support] FB Mac OS X
Author John Bellardo
Nato,

On Thursday, October 24, 2002, at 12:56 AM, Naoto Gohko wrote:

>
> [...]

> elsif ($os eq 'darwin')
>> {
>> my $ib_lib = dir_choice("InterBase lib directory",
>> [qw(/Library/Frameworks/Firebird.framework
>> /opt/interbase/lib)],
>> [qw(Firebird libgds.dylib)]);
>> $MakeParams{'CCFLAGS'} = "-framework Firebird";

This passes "-framework Firebird" to the compiler, not the linker.

>> $MakeParams{'LIBS'} = "-L$ib_lib";

Try
$MakeParams{'LIBS'} = "-framework Firebird";
here instead.

>
>
> [...]
> cc -c -I"/Library/Frameworks/Firebird.framework/Headers"
> -I"/Users/chroum/Library/Perl/darwin/auto/DBI" -framework Firebird -Os
> -DVERSION=\"0.40\" -DXS_VERSION=\"0.40\"
> -I/System/Library/Perl/darwin/CORE InterBase.c

Here you can see -framework Firebird being passed to the compiler, but
linking is not performed at this point due to the "-c" option.

> [...]
> LD_RUN_PATH="" cc -o blib/arch/auto/DBD/InterBase/InterBase.bundle
> -bundle -flat_namespace -undefined suppress InterBase.o dbdimp.o

Here you can see the linking being performed, but without the
"-framework Firebird" option. This means the dynamic link editor will
not try to resolve symbols against the firebird library, and you will
get a lot of undefined symbols, which is exactly what happened below:

> [...]
> t/00base...........dyld: /usr/bin/perl Undefined symbols:
> _isc_attach_database
> _isc_blob_info
> _isc_cancel_blob
> _isc_cancel_events
> _isc_close_blob
> _isc_commit_retaining
> [... lots more undefined symbols ...]
>

-John