Thread: Compile errors on Solaris 8

Compile errors on Solaris 8

From
William Osmond
Date:
Yes, I am going to be running everything on the solaris 8 machine.  I have, however, answered my own question and
managedget it to compile correctly.  To fix it (in case anyone posts a similar problem in the future, change the
followingin src/Makefile.shlibs 
----
ifeq ($(PORTNAME), solaris)
  shlib                 := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_
VERSION)
  LINK.shared           = $(COMPILER) -G
  ifeq ($(with_gnu_ld), yes)
    LINK.shared         += -Wl,-soname,$(soname)
  else
    LINK.shared         += -Wl,-h,$(soname)
  endif
  SHLIB_LINK            += -lm -lc -lsocket -lnsl
endif
----
The SHLIB_LINK line only contained lm and lc, and lsocket and lnsl needed to be added in order for the unresolved
symbolsto go away. 

I'm now having a different problem, though.
When I run isql to test my configuration with the current driver, I get the following:
----
root@commcon:/usr/local/unixODBC# bin/isql -v test
[unixODBC]Could not connect to the server;
Could not connect to remote socket.
[ISQL]ERROR: Could not SQLConnect
----
and the error logs say...
----
DSN info: DSN=test,server='localhost',port='5432',dbase='test',user='postgres',passwd='test'
          onlyread='No',protocol='6.4',showoid='No',fakeoidindex='No',showsystable='No'
          conn_settings=''
          translation_dll='',translation_option=''
conn = 156040, SQLConnect(DSN='test', UID='postgres', PWD='test')
Global Options: Version='07.01.0004', fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=254,
max_longvarchar_size=8190
                disable_optimizer=1, ksqo=1, unique_index=0, use_declarefetch=0
                text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1
                extra_systable_prefixes='dd_;', conn_settings=''
CONN ERROR: func=SQLConnect, desc='Error on CC_connect', errnum=101, errmsg='Could not connect to the server'
            ------------------------------------------------------------
            henv=155016, conn=156040, status=0, num_stmts=16
            sock=162512, stmts=170768, lobj_type=-999
            ---------------- Socket Info -------------------------------
            socket=-1, reverse=0, errornumber=4, errormsg='Could not connect to remote socket.'
            buffer_in=162560, buffer_out=166664
            buffer_filled_in=0, buffer_filled_out=0, buffer_read_in=0
----
If anyone knows what might be causing this and how to fix it, then please let me know.

Thanks,
Bill Osmond

 p.s. just so that nobody wonders about the obvious....
# ps -ef | grep postmaster
postgres 25797     1  0 17:09:59 ?        0:00 bin/postmaster -D /usr/local/pgsql/data
so yes it is running

------------------------------------------
On Mon, 21 May 2001 09:36:56 +0300 (IDT), Cedar Cox wrote:
>Please note, you only need to compile odbc here if you are going to use
>odbc on this machine.  If you were planning on using odbc from a windoze
>machine you only need a precompiled driver from the ftp site (or you can
>compile it yourself).
>
>On Wed, 16 May 2001, William Osmond wrote:
>
>> Hi everyone, I'm attempting to compile the odbc interface for postgresql 7.1, and it keeps giving me these
unresolvedsymbol errors.  Any help would be appreciated, as I am admittedly somewhat of a novice with regards to the
solarisenvironment. 
>>
>> ----
>> ar crs libpsqlodbc.a `lorder info.o bind.o columninfo.o connection.o convert.o drvconn.o environ.o execute.o lobj.o
misc.ooptions.o pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o statement.o gpps.o tuple.o tuplelist.o
dlg_specific.o| tsort` 
>> UX tsort: INFORM: cycle in data
>>     results.o
>>     parse.o
>>     info.o
>> UX tsort: INFORM: cycle in data
>>     psqlodbc.o
>>     dlg_specific.o
>>     convert.o
>>     connection.o
>>     results.o
>>     parse.o
>>     statement.o
>>     bind.o
>> UX tsort: INFORM: cycle in data
>>     socket.o
>>     psqlodbc.o
>>     dlg_specific.o
>>     convert.o
>>     connection.o
>>     results.o
>>     qresult.o
>>     columninfo.o
>> UX tsort: INFORM: cycle in data
>>     socket.o
>>     psqlodbc.o
>>     dlg_specific.o
>>     convert.o
>>     connection.o
>> UX tsort: INFORM: cycle in data
>>     pgtypes.o
>>     psqlodbc.o
>>     dlg_specific.o
>>     convert.o
>> UX tsort: INFORM: cycle in data
>>     psqlodbc.o
>>     dlg_specific.o
>>     misc.o
>> UX tsort: INFORM: cycle in data
>>     dlg_specific.o
>>     psqlodbc.o
>> ranlib libpsqlodbc.a
>> gcc  -Wall -Wmissing-prototypes -Wmissing-declarations -fPIC -G -Wl,-h,libpsqlodbc.so.0 -Wl,-Bsymbolic info.o bind.o
columninfo.oconnection.o convert.o drvconn.o environ.o execute.o lobj.o misc.o options.o pgtypes.o psqlodbc.o qresult.o
results.osocket.o parse.o statement.o gpps.o tuple.o tuplelist.o dlg_specific.o  -lm -lm -lc -Wl,-R/usr/local/pgsql/lib
-olibpsqlodbc.so.0.26 
>> Undefined                       first referenced
>> symbol                             in file
>> socket                              socket.o
>> recv                                socket.o
>> gethostbyname                       socket.o
>> send                                socket.o
>> inet_addr                           socket.o
>> main                                /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/crt1.o
>> connect                             socket.o
>> ld: warning: Symbol referencing errors
>>
>> Thank you in advance,
>> Bill Osmond
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 6: Have you searched our list archives?
>>
>> http://www.postgresql.org/search.mpl
>>



Re: Compile errors on Solaris 8

From
Hiroshi Inoue
Date:
William Osmond wrote:
>
> Yes, I am going to be running everything on the solaris 8 machine.  I have, however, answered my own question and
managedget it to compile correctly.  To fix it (in case anyone posts a similar problem in the future, change the
followingin src/Makefile.shlibs 
> ----
> ifeq ($(PORTNAME), solaris)
>   shlib                 := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_
> VERSION)
>   LINK.shared           = $(COMPILER) -G
>   ifeq ($(with_gnu_ld), yes)
>     LINK.shared         += -Wl,-soname,$(soname)
>   else
>     LINK.shared         += -Wl,-h,$(soname)
>   endif
>   SHLIB_LINK            += -lm -lc -lsocket -lnsl
> endif
> ----
> The SHLIB_LINK line only contained lm and lc, and lsocket and lnsl needed to be added in order for the unresolved
symbolsto go away. 
>

Are you compiling on a PostgreSQL source tree ?
You seem to be using unixODBC driver manager.
unixODBC has its own source for postgres driver.
You had better use the driver for unixODBC.

> I'm now having a different problem, though.
> When I run isql to test my configuration with the current driver, I get the following:

Did you start the postmaster with -i option ?
Did you change the pg_hba.conf to allow an access
from localhost ?
What message could you see in the server log ?

regards,
Hiroshi Inoue

Re: Compile errors on Solaris 8

From
William Osmond
Date:
I am, and unfortunately I had tried their driver to no avail. I kept getting an invalid protocol character during
authenticationerror message and was unable to connect with theirs, but using it with the postgresql supplied driver
(onceI restarted it with the -i option... heh whoops) I was able to get a SQL> prompt from isql. 
So that part of things is working.  But if anyone is reading this, then I'm running into one more problem.  It is a
problemspecific to iPlanet Web Server Enterprise Edition 4.1, so if nobody knows what might be causing this then that
iscertainly understandable.  When I fire up the SSJS (Livewire) component and use the 'dbadmin' utility that they
providewith it, I get the error message "No access library for 'libnsrwodb.so'". 

Thanks,
Bill Osmond



------------------------------------------
On Fri, 25 May 2001 19:12:42 +0900, Hiroshi Inoue wrote:
>William Osmond wrote:
>>
>> Yes, I am going to be running everything on the solaris 8 machine.  I have, however, answered my own question and
managedget it to compile correctly.  To fix it (in case anyone posts a similar problem in the future, change the
followingin src/Makefile.shlibs 
>> ----
>> ifeq ($(PORTNAME), solaris)
>>  shlib                 := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_
>> VERSION)
>>  LINK.shared           = $(COMPILER) -G
>>  ifeq ($(with_gnu_ld), yes)
>>   LINK.shared         += -Wl,-soname,$(soname)
>>  else
>>   LINK.shared         += -Wl,-h,$(soname)
>>  endif
>>  SHLIB_LINK            += -lm -lc -lsocket -lnsl
>> endif
>> ----
>> The SHLIB_LINK line only contained lm and lc, and lsocket and lnsl needed to be added in order for the unresolved
symbolsto go away. 
>>
>
>Are you compiling on a PostgreSQL source tree ?
>You seem to be using unixODBC driver manager.
>unixODBC has its own source for postgres driver.
>You had better use the driver for unixODBC.
>
>> I'm now having a different problem, though.
>> When I run isql to test my configuration with the current driver, I get the following:
>
>Did you start the postmaster with -i option ?
>Did you change the pg_hba.conf to allow an access
>from localhost ?
>What message could you see in the server log ?
>
>regards,
>Hiroshi Inoue
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://www.postgresql.org/search.mpl


----------------------( SupplyEdge )
William Osmond, william@supplyedge.com
Message Sent on 05/25/2001
Phone:  800.733.3380x114
Fax:    626.585.2785