3 messages in com.perforce.perforce-user[p4] problems building (linking actua...
FromSent OnAttachments
Trent Mick02 Apr 2001 15:15 
John Marshall02 Apr 2001 16:05 
Trent Mick02 Apr 2001 16:21 
Subject:[p4] problems building (linking actually) samplemain.cc in p4api.tar on linux
From:John Marshall (john@palm.com)
Date:04/02/2001 04:05:22 PM
List:com.perforce.perforce-user

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