error compiling 7.3.2 on solaris 8- library conflict

Started by Richard Sandabout 23 years ago3 messagesgeneral
Jump to latest
#1Richard Sand
rsand@vgalleries.com

Hi all,

I have a newly installed Solaris 8 Sparc. To install Postgresql 7.3.2, I
installed a variety of gnu tools, including gcc 3.2.2, make 3.8, and
readline 4.2. I installed the last after my first attempt at "configure"
said that it couldn't find it. Then, when I installed it and made certain
that the include and libpaths were part of the configure, it still refused
to find readline. In the configure.log file, it appears as if it does in
fact find readline but there is some sort of conflict:

configure:5837: gcc -o
conftest -I/usr/local/include -I/usr/local/include -L/usr/local/lib -L/us
r/local/lib
conftest.c -lreadline -lrt -lresolv -lgen -lsocket -lnsl -ldl -lm >&5
ld: fatal: symbol `__dso_handle' is multiply-defined:
(file /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/crtbegin.o
and file /usr/local/lib/libreadline.so);
ld: fatal: symbol `_init' is multiply-defined:
(file /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/crti.o and
file /usr/local/lib/libreadline.so);
ld: fatal: symbol `_start' is multiply-defined:
(file /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/crt1.o and
file /usr/local/lib/libreadline.so);
ld: fatal: symbol `_fini' is multiply-defined:
(file /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/crti.o and
file /usr/local/lib/libreadline.so);
ld: fatal: symbol `_lib_version' is multiply-defined:
(file /usr/ccs/lib/values-Xa.o and file
/usr/local/lib/libreadline.so);
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status

Can someone explain what has happened here? Is it a problem with the gcc
3.2.2 compiler? Should I be using the older 2.95 version (the other gcc
option I found on the gnu-sun freeware archive).

Thanks for any help!

Best regards,

Richard

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Richard Sand (#1)
Re: error compiling 7.3.2 on solaris 8- library conflict

"Richard Sand" <rsand@vgalleries.com> writes:

I have a newly installed Solaris 8 Sparc. To install Postgresql 7.3.2, I
installed a variety of gnu tools, including gcc 3.2.2, make 3.8, and
readline 4.2. I installed the last after my first attempt at "configure"
said that it couldn't find it. Then, when I installed it and made certain
that the include and libpaths were part of the configure, it still refused
to find readline. In the configure.log file, it appears as if it does in
fact find readline but there is some sort of conflict:

configure:5837: gcc -o
conftest -I/usr/local/include -I/usr/local/include -L/usr/local/lib -L/us
r/local/lib
conftest.c -lreadline -lrt -lresolv -lgen -lsocket -lnsl -ldl -lm >&5
ld: fatal: symbol `__dso_handle' is multiply-defined:
(file /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/crtbegin.o
and file /usr/local/lib/libreadline.so);

Yeah, you seem to have a misbuilt libreadline.so. Did you build it
yourself, or install someone else's? If all else fails, rebuild it
as a non-shared library.

I have some recollection of a similar problem being discussed awhile
back... try searching the PG archives.

regards, tom lane

#3Justin Clift
justin@postgresql.org
In reply to: Richard Sand (#1)
Re: error compiling 7.3.2 on solaris 8- library conflict

Hi Richard,

Richard Sand wrote:

Hi all,

<snip>

Can someone explain what has happened here? Is it a problem with the gcc
3.2.2 compiler? Should I be using the older 2.95 version (the other gcc
option I found on the gnu-sun freeware archive).

Tom Lane has pointed out that it's probably a version of readline that
was compiled with a different version of gcc.

If it's any help, the step by step "Packaging for Solaris" guide was
just updated with the version numbers used when compiling PostgreSQL for
Solaris:

http://techdocs.postgresql.org/guides/PackagingForSolaris

Hope that helps.

Regards and best wishes,

Justin Clift

Thanks for any help!

Best regards,

Richard

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi