Skip to Content.
Sympa Menu

freetds - Re: Shared libs on Mac OS X Server 10.2

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark J. Lilback" <mark AT lilback.com>
  • To: freetds mailing list <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Shared libs on Mac OS X Server 10.2
  • Date: Wed, 16 Oct 2002 12:44:44 -0400


Doing a google search, I found this:

4) I changed autogen.sh to use libtoolize --version instead of
libtool --version to check for the existance of libtool. I did that
since on Darwin, there is a system command which is also called
libtool. Hence we renamce GNU libtool to glibtool (but libtoolize
stays as it is). Furthermore, virtually every other projects
(including various GNOME ones) I use looks for libtoolize, too.


So, the first change needed is to look for libtoolize instead of libtool.

However, with 10.2, Apple changed libtoolize to glibtoolize. But, a simple "ln /usr/bin/glibtoolize /usr/local/bin/glibtoolize" fixed that problem.

Then I installed autoconf 2.54 in /usr/local/autoconf-2.54 and added /usr/local/autoconf-2.54/bin to the front of my path (I never replace Apple installed binaries when I don't have to).

autogen.sh worked, until it tried to run configure and gave "./autogen.sh: ./configure: /bin/sh: bad interpreter: Permission denied". There were no execute permissions on configure, so a "chmod +x configure; ./configure" worked.

Then I got the multiple define errors that were reported.

The problem here is that the call to generate the shared libraries is showing every exported symbol in libtds_objects.al to be defined twice in the same file in the archive. This is because the call to gcc to build the shared library is including the archives twice. Here is the command issued by make in src/tds:

gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libtds.1.0.1.dylib -all_load ./.libs/libtds_objects.al ../replacements/.libs/libreplacements.al ./.libs/libtds_objects.al ../replacements/.libs/libreplacements.al -lc -install_name /usr/local/lib/libtds.1.dylib -compatibility_version 2 -current_version 2.1

Manually running this command after stripping out the duplicates works.

I looked around the makefile, but this is one of those areas where I have no clue what is going on. I can work with make, but I've never learned the whole unix build process, aside from compiling my own simple projects on whatever platform I am using.


--
__________________________________________________________________________
"They that can give up essential liberty
Mark J. Lilback to obtain a little temporary safety
<mark AT lilback.com> deserve neither liberty or safety."
http://www.lilback.com/ -- Benjamin Franklin




Archive powered by MHonArc 2.6.24.

Top of Page