🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1609

Problems with IV3.1 on Esix SVR4 and GCC (Was: ) Re: (none)

#1609
From: Peter Johansson
Date: Tue, 05 Jan 1993 16:02
127 lines
4630 bytes
In article <9301051445.AA17240@osfhrh01.rz.FH-Osnabrueck.DE> boedeker@OSFHRH01.RZ.FH-OSNABRUECK.DE writes:
>
> I WANT TO BE ON THE INTERVIEW'S MAILING LIST
>
> I WANT TO GET CONTACT TO SOMEBODY WHO ALSO WANT TO INSTALL INTERVIEW'S
> ON 386-UNIX ESIX 4.04.
>
>---
>
>PROBLEM`S
>
>I try to install Interview's 3.1 on Esix System V Release 4.04 with 
>XFree86 (X11R5) with the GCC-Compiler 2.3.2 the libg++ 2.3. I have 
>several problems.

I have finally managed to install InterViews 3.1 on Esix SVR4 4.0.3A
using GCC 2.3.3 and have encountered the same problem as you. I haven't
managed to completely solved them, but now I seem to have it working at least.

>
>============================================================================
>
>A) The GCC-Compiler make's no serious mistakes, but later, if I try to link 
>   program's doc,ibuild etc, etc there comes the errormessage: 
>
>g++  -O2   -o a.out *.o     -L../../../.././src/lib/IV/X386 -lIV  -lXext -lX11 -lm  -lg++ -lsocket -lnsl
>Undefined                       first referenced
> symbol                             in file
>_vt.7istream.3ios                   Application.o
>ld: a.out: fatal error: Symbol referencing errors. No output written to a.out
>*** Error code 1 (bu21)
>make: fatal error.
>
[ stuff deleted]
>
>but not with then full name. I use NO DEBUGGING and FULL OPTIMIZING, in 
>local.def. Idemo runs without problem's.
>
>In the older Version of IV, 3.1-BETA3 I don't have this Mistake. 
>
>Im not an expert in C++ programming,  do somebody know anything about this
>problem ? 
>

I got this error as well and as far as I can see it seems to be related
to GCC. This error will show up if you use optimizing so a work-around
is to compile Application.c without optimizing turned on. There is a
couple of other files that will give you the same error, I can't
remember which though. To find them execute

	'nm -r *.o | grep _vt.7istream.3ios'

in the various object code directories. Recompiling those files without
optimizing turned on will produce correct(?) code.

>B) Shared Lib's on ESIX 4.04
>In your Readme File tell you that you only support SUNOS Shared-Lib's 
>exist any problem's if I try to make a port to Esix 4.04 SYSTEM V 386er
>Shared Lib's ? I try it, and if ld try to make libIV.so.3.1 it end's with a 
>segmentations fault and an core dump.  libUnidraw.so.3.1 make mo problem's. 
>I use the LDFLAG -G. Is this an System Error or an Interview's error. Have 
>somebody experience about this and can halp me. 
>

I haven't found a soloution for this, but I tried to do it the same way
you did. The problem seems to be with the object code that GCC produced
that looks like this:

.globl mysymbol

	leal mysymbol@GOTOFF(%ebx),%ecx

Changing the 'leal' instruction to something else wont make any difference.
The only time the problem occurs (that I found) is when you use @GOTOFF with
a global symbol. 'as' haven't got any problems with this, so it's seem like
it's the linker that is the problem.

A short C++ example file that will give this error is:

---- errtest.C ----
class A
{
public:
  A();
  void f();

  void (A::*g)();
};

A::A()
{
  g = f; // This will make 'ld' dump core
}

void A::f()
{
}

---- end errtest.C ----
Compile this with

	g++ -fpic -c errtest.C
	ld -G -o myerrlib.so errtest.o

and ld will dump core

This problem occurs in maybe six or seven files in the lib/IV/X386 directory.
In the lib/Unidraw/X386 directory you wont have this problem.


>===========================================================================
>
>If I solve this problems by myself I gave you an message.
>
>			NILS BOEDEKER
>			FH-OSNABRUECK-HASTE
>			EMAIL: BOEDEKER@OSFHRH01.RZ.FH-OSNABRUECK.DE
>			GERMANY

	/Peter

-- 
===============================================================================
Peter Johansson                      Phone:       08-530 362 18
Email:   d89-pjo@nada.kth.se         Snailmail:   Isbergs Backe 6
                                                  147 63  Uttran
                                                  Sweden
Technical Details
Message-ID: <1993Jan5.160259.10571@kth.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!kth.se!dront.nada.kth.se!d89-pjo

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!kth.se!dront.nada.kth.se!d89-pjo
From: d89-pjo@dront.nada.kth.se (Peter Johansson)
Subject: Problems with IV3.1 on Esix SVR4 and GCC (Was: ) Re: (none)
Message-ID: <1993Jan5.160259.10571@kth.se>
Sender: usenet@kth.se (Usenet)
Nntp-Posting-Host: dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Tue, 5 Jan 1993 16:02:59 GMT
Lines: 127