Subject: [PORTS] Fw: Help compiling postgres libpgtcl.so on AIX
From: "Tim Dunnington" <[email-masked]>
To: <[email-masked]>
Date: Sat, 8 Jul 2000 15:25:06 -0400

Resending...I didn't see my post come back to me on the list...

----- Original Message ----- 
From: Tim Dunnington 
To: [email-masked] 
Sent: Friday, July 07, 2000 6:35 PM
Subject: Help compiling postgres libpgtcl.so on AIX

We're on AIX 4.3.3 64-bit.  I've compiled the entire postgres distro, except for tcl, which is very important to us.  The problem seems to be in linking the libpgtcl.so...it compiles to a static library just fine.

FYI, Tcl is embedded in our product and hence we have the Tcl sources in places not expected.  I've added as many library and include directories as I could think of, as you'll see in the ld dump below, but they obviously don't help.

I got the warning messages about the duplicate symbols during the compile at other stages, but only libpgtcl errors.

Perhaps even if you could tell me where these symbols are defined (what library or object), so that I can hack the linker and make it work...

Thanks for your help in advance!

Tim

gmake[2]: Entering directory `/home/postgres/postgresql-7.0.2/src/interfaces/lib
pgtcl'
../../backend/port/aix/mkldexport.sh libpgtcl.a /home/postgres/postgresql/lib >
libpgtcl.exp
ld -H512 -bM:SRE -bI:../../backend/postgres.imp -bE:libpgtcl.exp -o libpgtcl.so
libpgtcl.a -L/work/cloverrel/cloverleaf-external/Tcl/generic -L/work/cloverrel/c
loverleaf-external/Tcl/unix -L/work/cloverrel/cloverleaf-external/Tk/unix -lPW -
lcrypt -lld -lnsl -ldl -lm -lcurses  -L../../interfaces/libpq -lpq -lcrypt -lc
ld: 0711-224 WARNING: Duplicate symbol: ._ptrgl
ld: 0711-224 WARNING: Duplicate symbol: .PQclear
ld: 0711-224 WARNING: Duplicate symbol: .PQgetlength
ld: 0711-224 WARNING: Duplicate symbol: .PQgetvalue
ld: 0711-224 WARNING: Duplicate symbol: .PQfsize
ld: 0711-224 WARNING: Duplicate symbol: .PQftype
ld: 0711-224 WARNING: Duplicate symbol: .PQfnumber
ld: 0711-224 WARNING: Duplicate symbol: .PQfname
ld: 0711-224 WARNING: Duplicate symbol: .PQnfields
ld: 0711-224 WARNING: Duplicate symbol: .PQntuples
ld: 0711-224 WARNING: Duplicate symbol: .PQfn
ld: 0711-224 WARNING: Duplicate symbol: .PQexec
ld: 0711-224 WARNING: Duplicate symbol: .sprintf
ld: 0711-224 WARNING: Duplicate symbol: sprintf
ld: 0711-224 WARNING: Duplicate symbol: ._moveeq
ld: 0711-224 WARNING: Duplicate symbol: .bcopy
ld: 0711-224 WARNING: Duplicate symbol: .ovbcopy
ld: 0711-224 WARNING: Duplicate symbol: .memcpy
ld: 0711-224 WARNING: Duplicate symbol: .memmove
ld: 0711-224 WARNING: Duplicate symbol: .strlen
ld: 0711-224 WARNING: Duplicate symbol: strlen
ld: 0711-224 WARNING: Duplicate symbol: .vsnprintf
ld: 0711-224 WARNING: Duplicate symbol: vsnprintf
ld: 0711-224 WARNING: Duplicate symbol: .realloc
ld: 0711-224 WARNING: Duplicate symbol: realloc
ld: 0711-224 WARNING: Duplicate symbol: .free
ld: 0711-224 WARNING: Duplicate symbol: free
ld: 0711-224 WARNING: Duplicate symbol: .malloc
ld: 0711-224 WARNING: Duplicate symbol: malloc
ld: 0711-224 WARNING: Duplicate symbol: .bzero
ld: 0711-224 WARNING: Duplicate symbol: bzero
ld: 0711-224 WARNING: Duplicate symbol: .select
ld: 0711-224 WARNING: Duplicate symbol: select
ld: 0711-224 WARNING: Duplicate symbol: .strerror
ld: 0711-224 WARNING: Duplicate symbol: strerror
ld: 0711-224 WARNING: Duplicate symbol: .pqsignal
ld: 0711-224 WARNING: Duplicate symbol: .sigemptyset
ld: 0711-224 WARNING: Duplicate symbol: sigemptyset
ld: 0711-224 WARNING: Duplicate symbol: .sigaction
ld: 0711-224 WARNING: Duplicate symbol: sigaction
ld: 0711-224 WARNING: Duplicate symbol: .send
ld: 0711-224 WARNING: Duplicate symbol: send
ld: 0711-224 WARNING: Duplicate symbol: .fflush
ld: 0711-224 WARNING: Duplicate symbol: fflush
ld: 0711-224 WARNING: Duplicate symbol: .recv
ld: 0711-224 WARNING: Duplicate symbol: recv
ld: 0711-224 WARNING: Duplicate symbol: .close
ld: 0711-224 WARNING: Duplicate symbol: close
ld: 0711-224 WARNING: Duplicate symbol: .fprintf
ld: 0711-224 WARNING: Duplicate symbol: fprintf
ld: 0711-224 WARNING: Duplicate symbol: .strncpy
ld: 0711-224 WARNING: Duplicate symbol: .DLNewElem
ld: 0711-224 WARNING: Duplicate symbol: .DLMoveToFront
ld: 0711-224 WARNING: Duplicate symbol: .DLRemHead
ld: 0711-224 WARNING: Duplicate symbol: .DLAddTail
ld: 0711-224 WARNING: Duplicate symbol: .DLAddHead
ld: 0711-224 WARNING: Duplicate symbol: .DLRemove
ld: 0711-224 WARNING: Duplicate symbol: .DLGetSucc
ld: 0711-224 WARNING: Duplicate symbol: .DLGetPred
ld: 0711-224 WARNING: Duplicate symbol: .DLRemTail
ld: 0711-224 WARNING: Duplicate symbol: .DLGetTail
ld: 0711-224 WARNING: Duplicate symbol: .DLGetHead
ld: 0711-224 WARNING: Duplicate symbol: .DLFreeElem
ld: 0711-224 WARNING: Duplicate symbol: .DLFreeList
ld: 0711-224 WARNING: Duplicate symbol: .DLNewList
ld: 0711-224 WARNING: Duplicate symbol: .memset
ld: 0711-224 WARNING: Duplicate symbol: memset
ld: 0711-224 WARNING: Duplicate symbol: .strcpy
ld: 0711-224 WARNING: Duplicate symbol: .strncmp
ld: 0711-224 WARNING: Duplicate symbol: strncmp
ld: 0711-224 WARNING: Duplicate symbol: .strtoul
ld: 0711-224 WARNING: Duplicate symbol: strtoul
ld: 0711-224 WARNING: Duplicate symbol: .strspn
ld: 0711-224 WARNING: Duplicate symbol: strspn
ld: 0711-224 WARNING: Duplicate symbol: .strdup
ld: 0711-224 WARNING: Duplicate symbol: strdup
ld: 0711-224 WARNING: Duplicate symbol: .isascii
ld: 0711-224 WARNING: Duplicate symbol: isascii
ld: 0711-224 WARNING: Duplicate symbol: .isupper
ld: 0711-224 WARNING: Duplicate symbol: isupper
ld: 0711-224 WARNING: Duplicate symbol: .tolower
ld: 0711-224 WARNING: Duplicate symbol: tolower
ld: 0711-224 WARNING: Duplicate symbol: .strcmp
ld: 0711-224 WARNING: Duplicate symbol: .PQuntrace
ld: 0711-224 WARNING: Duplicate symbol: .PQtrace
ld: 0711-224 WARNING: Duplicate symbol: .setsockopt
ld: 0711-224 WARNING: Duplicate symbol: setsockopt
ld: 0711-224 WARNING: Duplicate symbol: .fcntl
ld: 0711-224 WARNING: Duplicate symbol: fcntl
ld: 0711-224 WARNING: Duplicate symbol: .strchr
ld: 0711-224 WARNING: Duplicate symbol: strchr
ld: 0711-224 WARNING: Duplicate symbol: .strrchr
ld: 0711-224 WARNING: Duplicate symbol: strrchr
ld: 0711-224 WARNING: Duplicate symbol: .getenv
ld: 0711-224 WARNING: Duplicate symbol: getenv
ld: 0711-224 WARNING: Duplicate symbol: .isspace
ld: 0711-224 WARNING: Duplicate symbol: isspace
ld: 0711-224 WARNING: Duplicate symbol: .crypt
ld: 0711-224 WARNING: Duplicate symbol: crypt
ld: 0711-224 WARNING: Duplicate symbol: .geteuid
ld: 0711-224 WARNING: Duplicate symbol: geteuid
ld: 0711-224 WARNING: Duplicate symbol: .getpwuid
ld: 0711-224 WARNING: Duplicate symbol: getpwuid
ld: 0711-224 WARNING: Duplicate symbol: .strcasecmp
ld: 0711-224 WARNING: Duplicate symbol: strcasecmp
ld: 0711-224 WARNING: Duplicate symbol: .inet_aton
ld: 0711-224 WARNING: Duplicate symbol: inet_aton
ld: 0711-224 WARNING: Duplicate symbol: .atoi
ld: 0711-224 WARNING: Duplicate symbol: atoi
ld: 0711-224 WARNING: Duplicate symbol: .socket
ld: 0711-224 WARNING: Duplicate symbol: socket
ld: 0711-224 WARNING: Duplicate symbol: .connect
ld: 0711-224 WARNING: Duplicate symbol: connect
ld: 0711-224 WARNING: Duplicate symbol: .strcat
ld: 0711-224 WARNING: Duplicate symbol: .ngetsockname
ld: 0711-224 WARNING: Duplicate symbol: ngetsockname
ld: 0711-224 WARNING: Duplicate symbol: .lo_export
ld: 0711-224 WARNING: Duplicate symbol: .lo_import
ld: 0711-224 WARNING: Duplicate symbol: .lo_unlink
ld: 0711-224 WARNING: Duplicate symbol: .lo_tell
ld: 0711-224 WARNING: Duplicate symbol: .lo_creat
ld: 0711-224 WARNING: Duplicate symbol: .lo_lseek
ld: 0711-224 WARNING: Duplicate symbol: .lo_write
ld: 0711-224 WARNING: Duplicate symbol: .lo_read
ld: 0711-224 WARNING: Duplicate symbol: .lo_close
ld: 0711-224 WARNING: Duplicate symbol: .lo_open
ld: 0711-224 WARNING: Duplicate symbol: .open
ld: 0711-224 WARNING: Duplicate symbol: open
ld: 0711-224 WARNING: Duplicate symbol: .write
ld: 0711-224 WARNING: Duplicate symbol: write
ld: 0711-224 WARNING: Duplicate symbol: .read
ld: 0711-224 WARNING: Duplicate symbol: read
ld: 0711-224 WARNING: Duplicate symbol: .strtok
ld: 0711-224 WARNING: Duplicate symbol: strtok
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendResult
ld: 0711-317 ERROR: Undefined symbol: .Tcl_Preserve
ld: 0711-317 ERROR: Undefined symbol: .Tcl_GlobalEval
ld: 0711-317 ERROR: Undefined symbol: .Tcl_AddErrorInfo
ld: 0711-317 ERROR: Undefined symbol: .Tcl_BackgroundError
ld: 0711-317 ERROR: Undefined symbol: .Tcl_Release
ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetChannel
ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetChannelType
ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetResult
ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetInt
ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetChannelInstanceData
ld: 0711-317 ERROR: Undefined symbol: .Tcl_QueueEvent
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteFileHandler
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteEvents
ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateFileHandler
ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetChannelName
ld: 0711-317 ERROR: Undefined symbol: .Tcl_ResetResult
ld: 0711-317 ERROR: Undefined symbol: .Tcl_FirstHashEntry
ld: 0711-317 ERROR: Undefined symbol: .Tcl_NextHashEntry
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteHashTable
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DontCallWhenDeleted
ld: 0711-317 ERROR: Undefined symbol: .Tcl_EventuallyFree
ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateChannel
ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetChannelOption
ld: 0711-317 ERROR: Undefined symbol: .Tcl_RegisterChannel
ld: 0711-317 ERROR: Undefined symbol: .Tcl_InitHashTable
ld: 0711-317 ERROR: Undefined symbol: .Tcl_CallWhenDeleted
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteHashEntry
ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetVar
ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetVar2
ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendElement
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringInit
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringAppendElement
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringFree
ld: 0711-317 ERROR: Undefined symbol: .Tcl_Eval
ld: 0711-317 ERROR: Undefined symbol: .Tcl_UnsetVar
ld: 0711-317 ERROR: Undefined symbol: .Tcl_UnregisterChannel
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringStartSublist
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringEndSublist
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringResult
ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateCommand
ld: 0711-317 ERROR: Undefined symbol: .Tcl_PkgProvide
gmake[2]: *** [libpgtcl.so] Error 8
gmake[2]: Leaving directory `/home/postgres/postgresql-7.0.2/src/interfaces/libp
gtcl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/postgres/postgresql-7.0.2/src/interfaces'
gmake: *** [all] Error 2