Error in Makefile
Hi,
I've found an error during the compilation of PostgreSQL 6.5 and PostgreSQL
6.5.1.
If I give the option for include TCL support, the compilation is interrupted
with following error:
ld -shared -x -soname -o pltcl.so pltcl.o -L/usr/local/lib -ltcl80
/usr/libexec/elf/ld: cannot open pltcl.so: No such file or directory
gmake[2]: *** [pltcl.so] Error 1
I've fixed it quickly by hand changing the argument order of this comand,
in following manner:
$ cd pl/tcp
$ ld -shared -x -soname pltcl.o -o pltcl.so -L/usr/local/lib -ltcl80
Some info about my system: FreeBSD 3.0 stable and every tools (gcc,
ld, gmake, flex, ...) is the standard given with this distribution.
Bye, \fer
Hi,
I've found an error during the compilation of PostgreSQL 6.5 and PostgreSQL
6.5.1.
If I give the option for include TCL support, the compilation is interrupted
with following error:ld -shared -x -soname -o pltcl.so pltcl.o -L/usr/local/lib -ltcl80
/usr/libexec/elf/ld: cannot open pltcl.so: No such file or directory
gmake[2]: *** [pltcl.so] Error 1I've fixed it quickly by hand changing the argument order of this comand,
in following manner:$ cd pl/tcp
$ ld -shared -x -soname pltcl.o -o pltcl.so -L/usr/local/lib -ltcl80Some info about my system: FreeBSD 3.0 stable and every tools (gcc,
ld, gmake, flex, ...) is the standard given with this distribution.
OK, I run BSDI here, and this is the first time I have heard of this
problem. The original line is clearly wrong. Doing a 'gmake distclean'
I see:
#$ rgrep soname
./Makefile.shlib: LDFLAGS_SL := -x -Bshareable -soname $(shlib)
./Makefile.shlib: LDFLAGS_SL := -x -shared -soname $(shlib)
./Makefile.shlib: LDFLAGS_SL := -Bdynamic -shared -soname $(shlib)
Now, configure is generating other files that have some bug where the
-soname does not have the proper handling. Can you point me to where
this problem may be coming from?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian <maillist@candle.pha.pa.us> writes:
$ cd pl/tcp
$ ld -shared -x -soname pltcl.o -o pltcl.so -L/usr/local/lib -ltcl80
Now, configure is generating other files that have some bug where the
-soname does not have the proper handling. Can you point me to where
this problem may be coming from?
pl/tcl doesn't use Makefile.shlib --- it relies on information from
the local Tcl installation to build a Tcl-compatible shlib. I suspect
what we have here is either an error in Ferruccio's local tclConfig.sh,
or the pl/tcl Makefile is not fully understanding how to use the info
from tclConfig.sh. If you can build pl/tcl on your system then I'm
guessing the former? Hard to tell for sure, but it sure looks like
the shlib name is not getting inserted after -soname like it needs to.
regards, tom lane
Import Notes
Reply to msg id not found: YourmessageofWed25Aug1999102127-0400199908251421.KAA12832@candle.pha.pa.us | Resolved by subject fallback
Hi Tom Lane, on 25-Aug-99 you wrote:
Bruce Momjian <maillist@candle.pha.pa.us> writes:
$ cd pl/tcp
$ ld -shared -x -soname pltcl.o -o pltcl.so -L/usr/local/lib -ltcl80
Now, configure is generating other files that have some bug where the
-soname does not have the proper handling. Can you point me to where
this problem may be coming from?
pl/tcl doesn't use Makefile.shlib --- it relies on information from
the local Tcl installation to build a Tcl-compatible shlib. I suspect
what we have here is either an error in Ferruccio's local tclConfig.sh,
or the pl/tcl Makefile is not fully understanding how to use the info
guessing the former?
The tclConfig.sh comes from /usr/local/lib/tcl8.0/tclConfig.sh
and it's the SCCS: @# tclConfig.sh.in 1.20 97/07/01 11:40:19
If you need more information, you can ask me for.
Sorry I don't know TCL language yet and I can't be useful
to solve this.
Bye, \fer
Hi Tom Lane, on 25-Aug-99 you wrote:
Bruce Momjian <maillist@candle.pha.pa.us> writes:
$ cd pl/tcp
$ ld -shared -x -soname pltcl.o -o pltcl.so -L/usr/local/lib -ltcl80Now, configure is generating other files that have some bug where the
-soname does not have the proper handling. Can you point me to where
this problem may be coming from?pl/tcl doesn't use Makefile.shlib --- it relies on information from
the local Tcl installation to build a Tcl-compatible shlib. I suspect
what we have here is either an error in Ferruccio's local tclConfig.sh,
or the pl/tcl Makefile is not fully understanding how to use the info
guessing the former?The tclConfig.sh comes from /usr/local/lib/tcl8.0/tclConfig.sh
and it's the SCCS: @# tclConfig.sh.in 1.20 97/07/01 11:40:19If you need more information, you can ask me for.
Sorry I don't know TCL language yet and I can't be useful
to solve this.
With no one else seeing the problem, we may just have to wait for
another bug report.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Ferruccio Zamuner <solo3@chierinet.it> sent me the contents of his
tclConfig.sh file, and the problem is pretty obvious: the file has
# Base command to use for combining object files into a shared library:
TCL_SHLIB_LD='ld -shared -x -soname $@'
When this is fed through pl/tcl/mkMakefile.tcldefs.sh, the $@ gets
prematurely evaluated and reduced to nothing, leading to the bogus
link command that we already saw. In short, pltcl is broken on any
FreeBSD system (as well as anything else that uses a -soname like
switch).
As a workaround I suppose Ferruccio can hand-edit
pl/tcl/Makefile.tcldefs to put back the $@.
For a real fix, I think we have no alternative but to abandon the way
that mkMakefile.tcldefs.sh does its job --- this horsing around with
"eval eval" is just not going to replicate the quoting/evaluation
behavior you get from executing the script. I am guessing that what
we should do is source the tclConfig script, then examine the output of
"env". Does anyone know offhand how tclConfig.sh is normally used for
Tcl builds?
regards, tom lane
Import Notes
Reply to msg id not found: YourmessageofThu26Aug1999093946+0100yam7907.2329.142301152@mail.chierinet.it | Resolved by subject fallback
I wrote:
For a real fix, I think we have no alternative but to abandon the way
that mkMakefile.tcldefs.sh does its job --- this horsing around with
"eval eval" is just not going to replicate the quoting/evaluation
behavior you get from executing the script.
This issue seemed familiar, and upon digging through my inbox I find
that Albert Chin reported related problems in pgsql-hackers on 7/10/99.
That discussion tapered off without quite agreeing on a fix. Albert was
recommending using "sed" to remove quote marks, but I'm thinking that we
really ought to just source the darn script rather than trying to
emulate the shell's evaluation rules...
regards, tom lane
Import Notes
Reply to msg id not found: YourmessageofThu26Aug1999102440-04004454.935677480@sss.pgh.pa.us | Resolved by subject fallback
I believe I have corrected src/pl/tcl/mkMakefile.tcldefs.sh.in's
problems with shell special characters in the values provided
by tclConfig.sh. Try the following version of the script (you'll
need to re-run configure and then remake to get the fix to propagate
all the way).
BTW, there is an identical mkMakefile.tcldefs.sh.in and a closely
related mkMakefile.tkdefs.sh.in in src/bin/pgtclsh/. You might need
to change those too in order to build a working pgtclsh on some
platforms, though I have not heard any complaints about that.
I have committed these fixes into both current and REL6_5 branches.
regards, tom lane
#! /bin/sh
if [ ! -r @TCL_CONFIG_SH@ ]; then
echo "@TCL_CONFIG_SH@ not found"
echo "I need this file! Please make a symbolic link to this file"
echo "and start make again."
exit 1
fi
# Source the file to obtain the correctly expanded variable definitions
. @TCL_CONFIG_SH@
# Read the file a second time as an easy way of getting the list of variable
# definitions to output.
cat @TCL_CONFIG_SH@ |
egrep '^TCL_|^TK_' |
sed 's/^\([^=]*\)=.*$/\1/' |
while read var
do
eval echo "\"$var = \$$var\""
done >Makefile.tcldefs
exit 0
Import Notes
Reply to msg id not found: YourmessageofThu26Aug1999151235-04005085.935694755@sss.pgh.pa.us | Resolved by subject fallback