From: | "D'Arcy" "J(dot)M(dot)" Cain <darcy(at)druid(dot)net> |
---|---|
To: | tv(at)pobox(dot)com (Todd Vierling) |
Cc: | current-users(at)netbsd(dot)org, pgsql-hackers(at)PostgreSQL(dot)org |
Subject: | Re: More on shared objects problem |
Date: | 1999-07-27 17:08:56 |
Message-ID: | m119Ain-0000dMC@druid.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thus spake Todd Vierling
> On Tue, 27 Jul 1999, D'Arcy J.M. Cain wrote:
> : ld -shared -L${PGDIR}/lib --export-dynamic -rpath ${PGDIR}/lib \
> : -lpq -lc -o $@ $<
>
> --export-dynamic is only needed for _executables_. It is implied for shared
> objects.
So I have been told. Removing it didn't help though.
> BTW, for platform compatibility, may I suggest using -R instead of -rpath...
> that works on all NetBSD, a.out and ELF, linkers (and even some non-NetBSD
> ones :).
OK, I did that.
> ...and you don't have --export-dynamic on your _executable's_ link line.
> When linking the executable whose symbols will be used by a shared object,
> use:
>
> cc -Wl,-E ...
Hmm. OK, I'll try to get that into the PostgreSQL code. Is that flag
benign on a non-ELF system or do I have to test for ELF before adding
the flag?
> You need the sources of src/gnu/lib/libbfd and
> src/gnu/dist/{opcodes,bfd,libiberty} in order to build any libbfd using
> program. This is because there are a lot of internal bfd headers used by
> these programs. However, there is nothing wrong with your nm.
I just realized that I have not been supping gnu files. Didn't someone
say here that src/gnu was now included in /src? I supped the current
gnu down and will rebuild the world but I will try the -E first.
Bingo! That was it. OK, I'll see that the change gets back into PostgreSQL.
Hmmm. Looking at the code I see that it does expect to add that flag if
it is on an ELF system. I guess configure needs to be tweaked. I'll
copy (and set followups to) the PostgreSQL list to start discussions
there on that.
So how do we determine that a system is elf? I don't see it in uname. Do
we just run file(1) on the kernel and see if the string "ELF" shows up?
Many thanks for everyone's help.
--
D'Arcy J.M. Cain <darcy(at){druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-07-27 17:11:34 | Bug tracking system policy |
Previous Message | Rich Shepard | 1999-07-27 17:06:55 | Re: [ANNOUNCE] i386 RPMs available for v6.5.1 |