On Mon, Apr 02, 2001 at 03:15:37PM -0700, Trent Mick wrote:
I am having difficulty building the samplemain.cc file that comes with the
p4api.tar packages on linux. Specifically I get stuck when trying to link. I
get the following error:
[...]
clientapi.o(.text+0x72): undefined reference to `__eh_pc'
[...]
and I my guess is that "__eh_pc" is a symbol exported by old versions of gcc:
Correct. You can see what versions of GCC various versions of p4api.tar
were compiled with by using "objdump -j .comment -s". You get eg:
r99.2/bin.linux52x86: GCC: (GNU) 2.8.1
r99.2/bin.linux60x86: [...] egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
r00.1/bin.linux52x86: GCC: (GNU) 2.8.1
r00.1/bin.linux60x86: [...] egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
r00.2/bin.linux52x86: GCC: (GNU) 2.8.1
The ones compiled with (the ancient) 2.8.1 need __eh_pc for some
exception handling support or something, while the egcs-1.1.2 ones are
linkable with vaguely modern versions of GCC.
Is anybody else encoutering the same problems? Any help would be appreciated.
So what we need is for a r00.2/bin.linux60x86/p4api.tar to get released.
In the meantime, I find that r00.1/bin.linux60x86/p4api.tar works fine
with GCC 2.95.x, and you probably will too.
It'd be nice if perforce compiled this stuff with something recent like
GCC 2.95.3. Perhaps they're waiting for GCC 3.0...
John