RE-SENT DUE TO TYPO: [freetds] sqsh and freetds: link error

Anthony Kong anthony.kong at
Mon May 5 06:06:33 EDT 2003

(Sorry some typo in my previous mail. Here is a better one)

Hi, all,

I am sorry if sqsh is not supposed to be covered in this forum. But I have
nowhere to turn to :-) Please ignore me if you consider the post OT, or
indicate to me where I should look for more info. 

I have download the freetds0.61 source and compiled it. I have used "make
install" to install the tds package. tsql runs beautifully. Very solid work.

Now, as advised in some document in tds, I download the sqsh source and try
to build it. 

I have export SYBASE=/usr/src/freetds-0.61 (the location where I have put
the source code. I did that because if otherwise, the configure script will
complaint about the missing header files)

Then when it comes to the link phase, make failed.  It is because there is
no /usr/src/freetds-0.61/lib. Obviously when using "make install" in tds,
lib files are copied to /usr/local/lib only and no /usr/src/freetds-0.61/lib
is created.

So I try to run the link myself (the -L parameter is changed):

# gcc    -L/usr/local/lib:/usr/lib  cmd_alias.o cmd_bcp.o cmd_buf.o
cmd_connect.o cmd_do.o cmd_echo.o cmd_exit.o cmd_for.o cmd_func.o cmd_go.o
cmd_help.o cmd_history.o cmd_if.o cmd_input.o cmd_jobs.o cmd_kill.o
cmd_lock.o cmd_loop.o cmd_misc.o cmd_read.o cmd_reconnect.o cmd_redraw.o
cmd_reset.o cmd_return.o cmd_rpc.o cmd_set.o cmd_shell.o cmd_show.o
cmd_sleep.o cmd_wait.o cmd_warranty.o cmd_while.o var_ctlib.o var_date.o
var_debug.o var_dsp.o var_hist.o var_misc.o var_passwd.o var_readline.o
var_thresh.o dsp.o dsp_bcp.o dsp_conv.o dsp_desc.o dsp_horiz.o dsp_html.o
dsp_meta.o dsp_none.o dsp_out.o dsp_pretty.o dsp_vert.o dsp_x.o sqsh_alias.o
sqsh_args.o sqsh_avl.o sqsh_buf.o sqsh_cmd.o sqsh_compat.o sqsh_ctx.o
sqsh_debug.o sqsh_env.o sqsh_error.o sqsh_expand.o sqsh_fd.o sqsh_filter.o
sqsh_fork.o sqsh_func.o sqsh_getopt.o sqsh_global.o sqsh_history.o
sqsh_init.o sqsh_job.o sqsh_readline.o sqsh_sig.o sqsh_sigcld.o sqsh_stdin.o
sqsh_strchr.o sqsh_tok.o sqsh_varbuf.o sqsh_main.o -ldl -lm     -o sqsh

and all sort of undefined reference comes up.

I have run ldconfig before doing this.

I hope to know:

1) Is the build process documented somehow and I simply haven't read it?
2) May someone point out what I have done wrong or forgot to do?

Any suggestion is appreciated.



FreeTDS mailing list
FreeTDS at

More information about the FreeTDS mailing list