Skip to Content.
Sympa Menu

freetds - RE: [freetds] freeTDS / unixODBC / PHP on AIX 5.1

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] freeTDS / unixODBC / PHP on AIX 5.1
  • Date: Thu, 30 Sep 2004 10:21:51 +0200

>
> Well, back again with the same problem pretty much.
> In my previous thread "problem compiling on AIX 4.3.3.0"
> things were solved with compiling static instead of using shared.
> FreeTDS worked fine stand alone but what I really need is a
> a setup using freeTDS/unixODBC and PHP. It seems that unixODBC
> really wants shared libs in order to work at least that's
> what I think I
> need.
>
> I have been able to get access to an AIX box running 5.1 and a Visual
> Age compiler
> version 6. Maybe that will help things.
>
> Compiling static works great, But when I try shared it bombs at the
> same location it did
> on the 4.3.3.0 box.
>

Well... I discovered the problem. Looking at previous mail:

creating libtds_objects.la
(cd .libs && rm -f libtds_objects.la && ln -s ../libtds_objects.la
libtds_objects.la)
/bin/sh ../../libtool --mode=link cc -g -o libtds.la -rpath
/usr/local/lib -version-info 3:0:0 libtds_objec
ts.la -liconv ../replacements/libreplacements.la
generating symbol list for `libtds.la'
/usr/bin/nm -B -BCpg ./.libs/libtds_objects.a
../replacements/.libs/libreplacements.a | awk '{ if ((($2 == "T") || ($2
== "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' |
sort -u > .libs/libtds.exp
cc -Wl,-bM:SRE -o .libs/libtds.so.3 -liconv -lc
-Wl,-bE:.libs/libtds.exp -Wl,-bnoentry ${wl}-berok
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
make: 1254-004 The error code from the last command is 8.

Now, where this code come. It come from libtool. It seems that libtool
1.5.x it's a little broken with AIX... you should have GNU nm (check
with "nm -V" command). libtool strip all symbols starting with '.'
however Visual C compiler prefix ALL functions with '.' so it strip all
symbols we require...

>From configure you can find code similar (depending from libtool
version) to

aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we
don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
no_entry_flag=""
else
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU
nm
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk
'\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) &&
(substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u >
$export_symbols'
else
export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk
'\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) &&
(substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u >
$export_symbols'
fi
aix_use_runtimelinking=no

Try to remove lines that start with "export_symbols_cmds=" and run again
configure script. I'll write a bug report to libtool.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page