Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Compiling and using FreeTDS on Mac OS X: msg#00197

db.tds.freetds

Subject: Re: Compiling and using FreeTDS on Mac OS X

Hi,

I'm using Panther and gcc3.3:

gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)

I downloaded the nightly freetds-0.62.dev.20031118.

As Mark Lilback mentioned a few days ago, the problem with the build on OS X seems to be libtds_objects.a being linked in twice in a few places, causing a bunch of multiple symbol definition errors.

Removing libtds_objects.la in the following lines seems to fix the build, don't know if it's the right way of doing it though, or if it breaks other platforms:

src/tds/Makefile.am:
libtds_la_LIBADD = libtds_objects.la $(NETWORK_LIBS) $(LIBICONV) ../replacements/libreplacements.la

src/ctlib/Makefile.am:
libct_la_LIBADD = ../tds/libtds_objects.la $(NETWORK_LIBS) $(LIBICONV) ../replacements/libreplacements.la

src/dblib/Makefile.am:
libsybdb_la_LIBADD= ../tds/libtds_objects.la $(NETWORK_LIBS) $(LIBICONV) ../replacements/libreplacements.la

src/odbc/Makefile.am:
libtdsodbc_la_LIBADD= ../tds/libtds_objects.la $(ODBCLIB) $(NETWORK_LIBS) $(LIBICONV) ../replacements/libreplacements.la

src/server/Makefile.am:
libtdssrv_la_LIBADD = ../tds/libtds_objects.la $(NETWORK_LIBS) $(LIBICONV) ../replacements/libreplacements.la


So then I had to add ../tds/libtds_objects.la in these lines (and I suppose all other library users will also have to do the same):

src/apps/Makefile.am:
tsql_LDADD = ../tds/libtds_objects.la $(READLINE_LIBS) $(LDADD) $(NETWORK_LIBS)
freebcp_LDADD = ../dblib/libsybdb.la ../tds/libtds_objects.la $(NETWORK_LIBS)

src/pool/Makefile.am:
LDADD = ../tds/libtds.la ../tds/libtds_objects.la ../server/libtdssrv.la $(NETWORK_LIBS)

Also the OS X toolchain doesn't really like -Bsymbolic, so I removed it from this line to build:

src/odbc/Makefile.am:
libtdsodbc_la_LDFLAGS = -export-symbols-regex '^(SQL|ODBCINST).*' -Wl,-Bsymbolic

With these hacks libtds builds fine on OS X, though I haven't tried it out to see if it's usable.

I'm really a newbie to freetds, so please excuse me for the lack of a proper patch, I'm not even sure this is the correct approach to fix the problem, just providing a hint.

Thanks,
Duncan


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation