Skip to Content.
Sympa Menu

freetds - Re: [freetds] Mac OSX make error Undefined symbols

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Mac OSX make error Undefined symbols
  • Date: Thu, 23 Oct 2003 02:32:19 -0400

On Thu, 23 Oct 2003 10:06:54 +0530, "Vijoy Varghese"
<viijv AT thedifferenZ.com> wrote:
> But, I feel like I have to disable threadsafe, during the ./autogen,
> right? --disable-treadsafe, right?

autogen.sh produces (and runs) the "configure" script. You don't have to
re-run autogen.sh unless you change its sources, things like configure.in
and Makefile.am. Otherwise, you can just re-run "configure". (It's
quicker.)

If you do:

./configure --with-tdsver=7.0 --enable-threadsafe=no

you should get a config.log that says:

$ grep -C threadsafe config.log
generated by GNU Autoconf 2.57. Invocation command line was

$ ../configure --with-tdsver=7.0 --enable-threadsafe=no

--
configure:10054: result: no
configure:10296: checking threadsafety
configure:10304: result: disabled
^^^^^^^^ that verifies it.

The "configure" script will *not* complain if you hand it an invalid
switch. That's actually a feature, believe it or not. So it's good to
check the log.

> > I think if you "touch src/apps/tsql", that should let the rest of
> > "make install" run. Either that, or configure without thread support?
> Do you mean i have to run 'touch src/apps/tsql' after doing the
> 'unfinished' make?
> I checked doing that that before ./autogen and after the unfinished
> make, but both didn't worked :-(

Sorry. I was trying a shortcut. Here's the long version. Bear in mind,
I don't have a Mac. I'm just talking about how the build works.

By the time you see:

> gcc -g -O2 -o .libs/freebcp
> freebcp.o -L/usr/local//lib
> -L/Users/admin/documents/vijoy/freetds-0.62.dev.20031022/yes/lib
> -L../dblib/.libs -lsybdb -L/usr/local/lib -liconv ld: warning -L:
> directory
> name(/Users/admin/documents/vijoy/freetds-0.62.dev.20031022/yes/lib)
> does not exist
> ld: Undefined symbols:
> _gethostbyaddr_r

you're almost home, yaar. You've built the FreeTDS libraries. All that's
left is to install them, move them to /usr/local/lib or wherever. Before
it installs the libraries for you, "make" builds tsql and freebcp, both
of which are nice to have. It's stopping there, because of the threadsafe
problem.

The right way to fix that (I think) is to reconfigure, as above, then
"make clean; make; make install". That should allow tsql and freebcp to
be built normally, albeit without thread support.

A cheap workaround (my earlier suggestion) is to trick make into thinking
it worked. Make compares the ages of its inputs and outputs to decide
what to compile, so if you "touch tsql", it thinks tsql was built and goes
on to the next thing. The next thing is freebcp, which is where you
stopped. You could touch that too, and probably everything would be fine
... except you wouldn't have tsql and freebcp, of course, just empty files
by those names.

HTH. :-) Now, I'm sure where you are, the sun is shining, and as a
matter of fact, it will be here, too, before too long. But before then, I
think I'll get some sleep.

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page