Thanks for helping me solve this problem.

Finally I figured out what I did wrong. The Makefile in
~sapdb/indep_prog/demo/FirstSteps/ODBC
has ODBC driver libray as:
LIBS = $(SAPDBROOT)/lib/libsqlod.a
It did not complain when I compiled and linked the program, but I got segfault
when I execute it.
So I changed the Makefile to:
LIBS = $(SAPDBROOT)/lib/libsqlod.so
or
LIBS = -L$(SAPDBROOT)/lib -lsqlodc
and got no problem compiling and executing it. (I should have paid more
attention when Axel complained about the Makefile.)

So far things are working fine. I tried to leave 'ServerNode' blank in my
odbc.ini, it still works. It works even after I unstall the DNS, no matter 
which library I linked my program with(libsqlod.a or libsqlod.so). So the
question is why odbc manager(unixODBC) is needed? I remember reading
somewhere in the mailing list that some function implemented by manager
will not work without the manager software, but any other reasons we have to 
use a manager?

Thanks for your help,
Jenny

On Thursday 31 January 2002 04:15 am, you wrote:
> Yes, probably a combination of driver and OS. But after a lot of
> testing I found out how to avoid the segfault!
>
> My odbc.ini looked like this:
>
> [sapdb]
> Driver     = /opt/sapdb/interfaces/odbc/lib/libsqlod.so
> ServerDB   = TST
> ServerNode =
> SQLMode    = INTERNAL
>
> Which worked on Solaris, so I assumed it was ok.
> But it segfaults on my Red Hat.
> Now if I don't leave ServerNode empty, but set it to localhost:
>
> [sapdb]
> Driver     = /opt/sapdb/interfaces/odbc/lib/libsqlod.so
> ServerDB   = TST
> ServerNode = localhost
> SQLMode    = INTERNAL
>
> The problem is gone.
>
> Also, one more note for people having problems compiling DBD-ODBC:
> if you compiled directly against the SAP ODBC driver and the only test
> that fails at make test is t/02simple.t test 13, then you can ignore
> that error and do a make install.
>
> Regards,
>
> Jeroen Boomgaardt
>
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to