IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New ABI: Application Binary Interface
It's the bit that directs how C++ names are mangled. Find me two C++ compilers that use the same ABI and then we'll talk about compatibility. The ABI is different across gcc 2.95, 2.96, 3.0, 3.1, and 3.2. It's different for Forte. It's different for Intel. It's different for any compiler you care to name.

with the notable exception of any GNU compiler before 3.0, and any Microsift compiler
Well goll-ee gee whillikers, shoot me in the head for having to use MSVC 6 and gcc 2.95.X. I guess that's my fault. All I have to do is buy a $700 C++ compiler instead of using the one that comes with my platforms, and everything is A-OK!

We're using gcc 2.95.2 on Solaris, gcc 2.95.4 on Linux, and MSVC on Windows. We've tried using Forte; the porting effort was fairly major. We've tried using gcc 3.x. The porting effort was fairly major. I'm looking at Intel C++ 7.0; I've gotten through one of our modules and already the porting effort is looking to be fairly major.

So while theoretically ANSI standards would dictate that porting would be terrifically easy, the reality (at least with the code base I'm on; cf. discussion about protecting against other people's stupidity) is that it's a nightmare. I've got about 800K lines of C++ code alone to port... and I'm not having too much fun.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New I used to think Direct To SOM compilers would fix this
The efficiencey freaks refused to use or adopt it.

MS compiles everything to COM - which does kind of the same thing.

Stroustrup's name mangling scheme was a really bad idea and its made C++ a bad citizen on the OS. Prior to C++ it was easy to mix compiled libs written in C, Fortran, Pascal, whatever, in the same program. C++'s "link mechanism" broke that.

Some people just shouldn't design languages.

Gosling and Stroustrup are two notable examples of smart guys with no talent for the task.



I think that it's extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customer got shafted every now and then, and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful, error-free perfect use of these machines. I don't think we are. I think we're responsible for stretching them, setting them off in new directions, and keeping fun in the house. I hope the field of computer science never loses its sense of fun. Above all, I hope we don't become missionaries. Don't feel as if you're Bible salesmen. The world has too many of those already. What you know about computing other people will learn. Don't feel as if the key to successful computing is only in your hands. What's in your hands, I think and hope, is intelligence: the ability to see the machine as more than when you were first led up to it, that you can make it more.

--Alan Perlis
New Some progress has been made.
There's a new ABI on 32-bit Linux that gcc 3.2 is targetting. Supposedly, other compilers on the platform are targetting it as well. The only one I've found actually claiming this is Intel's compiler, and they're actually targetting "gcc compatibility", not "standard ABI compatibility".

Regardless, by their own documentation, they aren't there quite yet.

What year is it again?
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Snide remark and a question
First the snide remark: So you'd want to be able to compile some of your program in Sun's Java, some in J Builder, and some in Visual J++, and have them all work together? Yeah, right.

Now the question: What exactly is your porting problem. Is it that you're trying to link modules compiled by different compilers? Is it that the code itself is so non-standard that compiler B will not compile what Compiler A compiles? Is it that the associated libraries are so different that even well-formed C++ won't "compile" because the library calls are non-existant?
jb4
"They lead. They don't manage. The carrot always wins over the stick. Ask your horse. You can lead your horse to water, but you can't manage him to drink."
Richard Kerr, United Technologies Corporation, 1990
New Snide response.
First the snide remark: So you'd want to be able to compile some of your program in Sun's Java, some in J Builder, and some in Visual J++, and have them all work together? Yeah, right.
Yes, actually, I've done exactly that with no issues whatsoever. The Java code we have here compiles flawlessly across all three platforms. I've never had issues porting Java code.

My porting problem is that
  1. portions of the code may or may not be nonstandard. cf, for the THIRD or FOURTH time, this is not my code. I don't care if you are lucky enough to be able to control your code 100%; I don't have that luxury. I've believe I've made that point several times.
  2. the compilers may or may not compile the same code whether it is standard or not.
  3. Even when the compilers DO compile the code, it isn't always compiled correctly. gcc 3.2.1 forgets about #defines. gcc 2.95.2 has broken exception handling when throwing exceptions in shared libs. MSVC has a broken STL implementation. Now I'm trying another C++ compiler, Intel's. See other thread for new issues arising from that.
The list goes on and on. Standards will technically give compatibility; in the real world that seems not to be the case.

All of this is beside the inherent stupidities of the C++ language itself.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Libraries - remember those?
So you'd want to be able to compile some of your program in Sun's Java, some in J Builder, and some in Visual J++, and have them all work together? Yeah, right.

But this does work. The binary format of java classes is strictly defined. Unlike the binary format of C++ "objects" or the name mangling schemes.

People get jar files (java's version of a library) all the time. It doesn't matter if they're compiled with jikes or sun's java compiler, they all work. C++ was the first language to toss binary interoperability out the window.



I think that it's extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customer got shafted every now and then, and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful, error-free perfect use of these machines. I don't think we are. I think we're responsible for stretching them, setting them off in new directions, and keeping fun in the house. I hope the field of computer science never loses its sense of fun. Above all, I hope we don't become missionaries. Don't feel as if you're Bible salesmen. The world has too many of those already. What you know about computing other people will learn. Don't feel as if the key to successful computing is only in your hands. What's in your hands, I think and hope, is intelligence: the ability to see the machine as more than when you were first led up to it, that you can make it more.

--Alan Perlis
New Exactly.
C, Fortran, whatever... pretty much anything OTHER than C++ that creates a .so will all work together.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Reality check: why libraries matter:
I have STLPort compiled under gcc 2.95.2.

I want to use it under the Intel compiler to test the bug I noted in the other thread. However, because of the name mangling, I can't do that: I have to recompile the library under the Intel compiler now. And once I've done that, I won't be able to use it with gcc any longer.

*grumble*
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Libraries - remember those?
So you'd want to be able to compile some of your program in Sun's Java, some in J Builder, and some in Visual J++, and have them all work together? Yeah, right.

But this does work. The binary format of java classes is strictly defined. Unlike the binary format of C++ "objects" or the name mangling schemes.

People get jar files (java's version of a library) all the time. It doesn't matter if they're compiled with jikes or sun's java compiler, they all work. C++ was the first language to toss binary interoperability out the window.



I think that it's extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customer got shafted every now and then, and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful, error-free perfect use of these machines. I don't think we are. I think we're responsible for stretching them, setting them off in new directions, and keeping fun in the house. I hope the field of computer science never loses its sense of fun. Above all, I hope we don't become missionaries. Don't feel as if you're Bible salesmen. The world has too many of those already. What you know about computing other people will learn. Don't feel as if the key to successful computing is only in your hands. What's in your hands, I think and hope, is intelligence: the ability to see the machine as more than when you were first led up to it, that you can make it more.

--Alan Perlis
New a day late and a dollar short...but extern "C"
wouldn't using extern "C" on modules solve the name-mangling?
New For a 3rd party module? No.
C++ can be made less insane if you control all the pieces. But most 3rd party libraries on Solaris are compiled in Forte... if you don't use Forte, you're screwed.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New If you export C++ mangled functions, you're screwed.
Any sane library developer should use 'extern "C"' to export functions. It's painful, but it works.
--

We have only 2 things to worry about: That
things will never get back to normal, and that they already have.
New Or, rather: Export C++ mangled functions in a lib you sell..
...and your CUSTOMERS are screwed. :-(


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
     Re: There is NOTHING wrong with pointers! - (admin) - (46)
         Re: There is NOTHING wrong with pointers! - (dshellman) - (5)
             Cross-platform can be nasty. - (admin)
             Er,...really? - (jb4) - (3)
                 Java pointer problems - (ChrisR) - (2)
                     OT: threading - (admin)
                     Just a nit - (dshellman)
         Re: There is NOTHING wrong with pointers! - (deSitter) - (1)
             Re: There is NOTHING wrong with pointers! - (admin)
         I guess I don't see the problems with the compiler - (jb4) - (33)
             Hmmmm - seems this thread got derailed due to ... - (dmarker) - (27)
                 Java isn't a systems language at all, IMO. - (admin) - (26)
                     I sure wouldn't use Java for Systems work - (dmarker) - (25)
                         Which brings up the point: what IS systems work - (admin) - (24)
                             The other aspect is... - (ChrisR) - (18)
                                 Stroustrup has a great quote about that: - (admin)
                                 Which is why C/C++ can be easily integrated with anything - (Arkadiy) - (16)
                                     *C* is the lingua franca. - (admin) - (15)
                                         ObjectiveC++ - (tuberculosis)
                                         Welcom to my nightmare! - (jb4) - (13)
                                             ABI: Application Binary Interface - (admin) - (12)
                                                 I used to think Direct To SOM compilers would fix this - (tuberculosis) - (1)
                                                     Some progress has been made. - (admin)
                                                 Snide remark and a question - (jb4) - (5)
                                                     Snide response. - (admin)
                                                     Libraries - remember those? - (tuberculosis) - (2)
                                                         Exactly. - (admin)
                                                         Reality check: why libraries matter: - (admin)
                                                     Libraries - remember those? - (tuberculosis)
                                                 a day late and a dollar short...but extern "C" - (Simon_Jester) - (3)
                                                     For a 3rd party module? No. - (admin) - (2)
                                                         If you export C++ mangled functions, you're screwed. - (Arkadiy) - (1)
                                                             Or, rather: Export C++ mangled functions in a lib you sell.. - (CRConrad)
                             Simple - (deSitter)
                             No - (Arkadiy) - (2)
                                 But, in the hands of a good programmer, it's a sharp tool. - (admin) - (1)
                                     Like Cathie Ryan said... - (Arkadiy)
                             Friend of a Friend - (tuberculosis)
             Re: I guess I don't see the problems with the compiler - (admin) - (2)
                 OK, here's where we agree to disagree, and agree to agree... - (jb4) - (1)
                     Re: OK, here's where we agree to disagree, and agree to agre - (admin)
             Geronimo! - (tuberculosis)
             Attacking Java doesn't make C++ better - (tuberculosis)
         does the content of this thread indicate Bryce is right? :-) -NT - (boxley) - (3)
             Inasmuch as: - (admin)
             C++ implements OO programming - (tuberculosis)
             Not at all. - (static)

Did you, ummmmmmm, see the TPS memo?
165 ms