cross compiling from Interix 5.2 to 3.5 (Full Version)

All Forums >> [SFU / Interix / SUA Technology] >> Windows Server 2003 R2 SUA



Message


breiter -> cross compiling from Interix 5.2 to 3.5 (Mar. 6, '06, 8:58:24 PM)

How do I build SFU/Interix 3.5 binaries with gcc from SUA/Interix 5.2?




jerker_back -> RE: cross compiling from Interix 5.2 to 3.5 (Mar. 13, '06, 11:29:17 AM)

According to MS, SFU 3.5 binaries should run in SUA. I've tested this and had NO problem. You can NOT have both the SUA and SFU environment installed side by side.

To compile and link -easy- use Visual Studio and point your dependencies to SFU 3.5 headers and libs. It's perfectly OK just to copy them from installation folders. Just disable the security checks (/GS-) since SFU don't have them. Using cc or gcc from SUA? Scary, but might work.

The hard part is to be able to test and debug your builds in a working SFU environment. XP with SFU 3.5 in a virtual machine? Remote debug???

regards Jerker




jerker_back -> RE: cross compiling from Interix 5.2 to 3.5 (Mar. 13, '06, 11:54:57 AM)

Sorry, I've read your question again - understand the problem.
I think, the gcc implementation is the same in SUA and SFU. Anyway, even if they are not it doesn't matter. The important part is what's in '/usr/include' and '/usr/lib' - right? Why not rename these to:
/usr/inc_SUA, /usr/lib_SUA etc
and do a

ln -s /usr/inc_SFU /usr/include
ln -s /usr/lib_SFU /usr/lib

you can then shift between the environments with a simple ln command

regards Jerker




breiter -> RE: cross compiling from Interix 5.2 to 3.5 (Mar. 13, '06, 5:18:31 PM)

Well, actually, the issue is that when you build stuff in SUA it links against the 5.2 shared libraries. For example, here's xgalaga built for SUA:

% objdump -p xgalaga | egrep -i needed
NEEDED libX11.so.5.2
NEEDED libXext.so.5.2
NEEDED libXpm.so
NEEDED libc.so.5.2

Since libc.so.5.2, libX11.so.5.2 and libXext.so.5.2 don't exist on Interix 3.5 I'm assuming this binary won't run. However the *.so.3.5 libraries exist on SUA/Interix 5.2. What's the incantation to get a binary linked against the 3.5 shared libs when building on 5.2?




Rodney -> RE: cross compiling from Interix 5.2 to 3.5 (Mar. 13, '06, 9:44:19 PM)

From what I've heard there are a couple of minor differences between gcc on 3.5 and 5.2.
The 5.2 version is supposed to have the DEP problem fixed. Note that this does NOT fix the 3.5
DEP situation unless you static build with all libraries being 5.2 built.

Try setting "-L" to the location of the 3.5 libs and adding "-rpath" to the link to ensure a runtime of 3.5.




breiter -> RE: cross compiling from Interix 5.2 to 3.5 (Mar. 15, '06, 10:35:32 AM)

quote:

Try setting "-L" to the location of the 3.5 libs and adding "-rpath" to the link to ensure a runtime of 3.5.


-L doesn't help because the *.so.3.5 and *.so.5.2 libraries are in the same directory. -rpath doesn't help for the same reason.




breiter -> RE: cross compiling from Interix 5.2 to 3.5 (Mar. 15, '06, 11:18:23 AM)

It looks like libc.so.5.2 is hard-coded into gcc.

% strings gcc | egrep 5.2
libc.so.5.2

Maybe the thing to do is to use the Interix 3.5 version of gcc?




Rodney -> RE: cross compiling from Interix 5.2 to 3.5 (Mar. 15, '06, 1:47:08 PM)

> Maybe the thing to do is to use the Interix 3.5 version of gcc?

I don't know for sure... though the DEP thing still exists with it.

Another option may be to try the gcc 4.X tarball.




Page: [1]



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.031