it appears that there's a problem building postgresql with
--enable-debug on Solaris with the Sun compilers.
noisy$ /opt/spro11/SUNWspro/bin/cc -Xa -v -DSUNOS4_CC
-I../../../../src/include -g -c s_lock.c
/opt/spro11/SUNWspro/prod/bin/fbe: "/tmp/yabeAAAdBaiW5", line 484:
error: can't compute difference between symbols in different segments
Failure in /opt/spro11/SUNWspro/prod/bin/fbe, status = 0x100
Fatal Error exec'ing /opt/spro11/SUNWspro/prod/bin/fbe
cc: acomp failed for s_lock.c
It appears that explicitly adding "-xO0" to the compile statement
resolves this problem. In fact, any optimization level seems to make
this error go away which is why it's not seen in a normal build.
The core of the problem seems to be a
directive which is emitted by the compiler.
Without the any -xO specifier this directive ends up in a different
.section due to the two .section directives in the s_lock.c code.
Adding any -xO options relocates the code so that the section mismatch
isn't a problem.
This brings up the question: why are the two .section directives
there at all in s_lock.c:299?
I don't see what they add and they're confusing assembler (fbe
actually). The data section obviously isn't needed and given this code
is already nested in a function, the text section is redundant too.
Anyway, seems we have two solutions:
1) explicitly specify a -xO0 option along with -g
2) remove the .section specifiers
pgsql-ports by date
|Next:||From: Tom Lane||Date: 2006-05-11 19:24:55|
|Subject: Re: Compiling on 8.1.3 on Openserver 5.05 |
|Previous:||From: Mark Campbell||Date: 2006-05-11 19:11:03|
|Subject: Re: Compiling on 8.1.3 on Openserver 5.05|