* Compaq's c++ succesfully runs under Debian woody
@ 2000-04-01 5:00 Abraham Theodorus Stolk
2000-04-03 4:00 ` Compaq C/C++ Team
2000-04-07 4:00 ` Abraham Theodorus Stolk
0 siblings, 2 replies; 13+ messages in thread
From: Abraham Theodorus Stolk @ 2000-04-01 5:00 UTC (permalink / raw)
Hello,
Compaq has released the long awaited C++ compiler for linux/alpha.
Fortunately, the provided rpm packages can be used succesfully with Debian.
For the release announcement, see:
http://www.unix.digital.com/linux/compaq_cxx/
To use it with Debian/woody, you need to
convert these RPMs with alien:
libots
cpml
ccc
cxx
I don't think you do not have to install compaqs binutils, as the current
woody binutils is up to date.
For gcc emulation, use -stdgnu (and not '-std gnu' as stated in docs)
I have one remaining problem though:
Now I have a gnu and a compaq compiler installed, and I would like
to print runtime msgs in my app, stating the compiler that was used.
Unfortunately, compaqs compiler seems to come without a
/usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/cpp,
so gnu's cpp is used, which expands the __VERSION__ macro to
gcc's version string, and not ccc's version string.
Bram
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Bram Stolk "Linux - Why use windows, if there is a door?"
work: bram@sara.nl
priv: bram.s@chello.nl
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-01 5:00 Compaq's c++ succesfully runs under Debian woody Abraham Theodorus Stolk
@ 2000-04-03 4:00 ` Compaq C/C++ Team
2000-04-04 4:00 ` Greg Lindahl
2000-04-07 4:00 ` Abraham Theodorus Stolk
1 sibling, 1 reply; 13+ messages in thread
From: Compaq C/C++ Team @ 2000-04-03 4:00 UTC (permalink / raw)
Abraham Theodorus Stolk wrote:
> I have one remaining problem though:
> Now I have a gnu and a compaq compiler installed, and I would like
> to print runtime msgs in my app, stating the compiler that was used.
>
> Unfortunately, compaqs compiler seems to come without a
> /usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/cpp,
> so gnu's cpp is used, which expands the __VERSION__ macro to
> gcc's version string, and not ccc's version string.
>
> Bram
Neither of the compilers normally invoke gnu cpp to perform
preprocessing, nor do they provide a separate standalone
preprocessor program. Instead they perform preprocessing
as an integrated part of compiler, and if you ask for explicit
preprocessor output, the -E or -P flag gets passed into the
compiler telling it to produce preprocessor output without
going any further into the compilation process.
The version of the compiler is available as a predefined
macro, __DECC_VER for ccc and __DECCXX_VER for cxx. Each of
these macros expands to an integer that encodes the complete
version number of the compiler (excluding the "repackaging
number") in fixed decimal digit positions as follows:
For V6.2-002, __DECC_VER = 60290002:
6 . 2 V -002
6 02 9 0002
For T6.3-003, __DECCXX_VER = 60360003:
6 . 3 T -003
6 03 6 0003
If you want to print it in an application, you can just print
the integer, or break it down into its components with / and %.
- Compaq C/C++ Team
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-04 4:00 ` Alex Rhomberg
@ 2000-04-04 4:00 ` Compaq C/C++ Team
2000-04-04 4:00 ` Bram Stolk
1 sibling, 0 replies; 13+ messages in thread
From: Compaq C/C++ Team @ 2000-04-04 4:00 UTC (permalink / raw)
Alex Rhomberg wrote:
>
> The description from Compaq seems to indicate that you could use
>
> #if defined(__DECC_VER) || defined(__DECCXX_VER)
>
> #endif
>
> To determine the compiler at compile time. No command lines needed
>
> - Alex
Right.
No guarantees on code quality/style, but if you wanted to printf
the name of the compiler and its version, handing Compaq C/C++
and gcc/g++, one way might be as follows:
%cat ver.c
#if defined(__DECC_VER) || defined(__DECCXX_VER)
# define VERletnum(x) (((x)/10000) % 10)
# define VERletter(x) (VERletnum(x) == 9 ? 'V' \
: VERletnum(x) == 6 ? 'T' \
: 'X' )
# define VERmajor(x) ((x)/10000000)
# define VERminor(x) (((x)/100000) %100)
# define VERedit(x) ((x) % 10000)
# if defined(__DECC_VER)
# define VERname "Compaq C"
# define VERnum __DECC_VER
# else
# define VERname "Compaq C++"
# define VERnum __DECCXX_VER
# endif
# define VERPRINT() printf("%s %c%d.%d-%03d\n", \
VERname, VERletter(VERnum), \
VERmajor(VERnum), VERminor(VERnum), \
VERedit(VERnum))
#elif defined(__GNUC__)
# ifdef __cplusplus
# define VERname "g++"
# else
# define VERname "gcc"
# endif
# define VERPRINT() printf("%s %d.%d\n", VERname, \
__GNUC__, __GNUC_MINOR__)
#else
# define VERPRINT() printf("UNKNOWN compiler\n")
#endif
#include <stdio.h>
int main(void)
{
VERPRINT();
return 0;
}
% gcc ver.c
% ./a.out
gcc 2.90
% g++ ver.c
% ./a.out
g++ 2.90
% ccc ver.c
% ./a.out
Compaq C V6.2-002
% cxx -x cxx ver.c
This beta test software will expire on April 15, 2000.
Please contact Compaq to receive a more recent version.
% ./a.out
Compaq C++ T6.3-003
Of course, if you were going to provide the version of the
compiler for the purpose of reporting a problem, you would
want to invoke the Compaq compilers with the -V option,
or the GNU compilers with the --version option.
- Compaq C/C++ Team
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-03 4:00 ` Compaq C/C++ Team
@ 2000-04-04 4:00 ` Greg Lindahl
2000-04-04 4:00 ` Bram Stolk
0 siblings, 1 reply; 13+ messages in thread
From: Greg Lindahl @ 2000-04-04 4:00 UTC (permalink / raw)
Compaq C/C++ Team <compaq_c@zko.dec.com> writes:
> Neither of the compilers normally invoke gnu cpp to perform
> preprocessing, nor do they provide a separate standalone
> preprocessor program. Instead they perform preprocessing
> as an integrated part of compiler,
But it's worth noting that the Compaq Fortran compiler does use gcc's
preprocessor.
-- g
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-04 4:00 ` Greg Lindahl
@ 2000-04-04 4:00 ` Bram Stolk
2000-04-04 4:00 ` Alex Rhomberg
0 siblings, 1 reply; 13+ messages in thread
From: Bram Stolk @ 2000-04-04 4:00 UTC (permalink / raw)
Greg Lindahl wrote:
>
> Compaq C/C++ Team <compaq_c@zko.dec.com> writes:
>
> > Neither of the compilers normally invoke gnu cpp to perform
> > preprocessing, nor do they provide a separate standalone
> > preprocessor program. Instead they perform preprocessing
> > as an integrated part of compiler,
>
> But it's worth noting that the Compaq Fortran compiler does use gcc's
> preprocessor.
I see.
So in order for me to test runtime for ccc/gcc compilation, I need
to add my own define to the cmdline?
thanks,
Bram
> -- g
--
------------------------------------------------------------------------------
Bram Stolk, VR Specialist.
SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
email: bram@sara.nl Phone +31-20-5923059 Fax +31-20-6683167
"I heard if you play the NT-4.0-CD backwards, you get a satanic message."
"Thats nothing, if you play it forward, it installs NT-4.0"
------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-04 4:00 ` Bram Stolk
@ 2000-04-04 4:00 ` Alex Rhomberg
2000-04-04 4:00 ` Compaq C/C++ Team
2000-04-04 4:00 ` Bram Stolk
0 siblings, 2 replies; 13+ messages in thread
From: Alex Rhomberg @ 2000-04-04 4:00 UTC (permalink / raw)
Bram Stolk wrote:
> I see.
> So in order for me to test runtime for ccc/gcc compilation, I need
> to add my own define to the cmdline?
The description from Compaq seems to indicate that you could use
#if defined(__DECC_VER) || defined(__DECCXX_VER)
#endif
To determine the compiler at compile time. No command lines needed
- Alex
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-04 4:00 ` Alex Rhomberg
2000-04-04 4:00 ` Compaq C/C++ Team
@ 2000-04-04 4:00 ` Bram Stolk
1 sibling, 0 replies; 13+ messages in thread
From: Bram Stolk @ 2000-04-04 4:00 UTC (permalink / raw)
Alex Rhomberg wrote:
>
> Bram Stolk wrote:
>
> > I see.
> > So in order for me to test runtime for ccc/gcc compilation, I need
> > to add my own define to the cmdline?
>
> The description from Compaq seems to indicate that you could use
>
> #if defined(__DECC_VER) || defined(__DECCXX_VER)
>
> #endif
>
> To determine the compiler at compile time. No command lines needed
>
Thanks for the info!
Bram
--
------------------------------------------------------------------------------
Bram Stolk, VR Specialist.
SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
email: bram@sara.nl Phone +31-20-5923059 Fax +31-20-6683167
"I heard if you play the NT-4.0-CD backwards, you get a satanic message."
"Thats nothing, if you play it forward, it installs NT-4.0"
------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-01 5:00 Compaq's c++ succesfully runs under Debian woody Abraham Theodorus Stolk
2000-04-03 4:00 ` Compaq C/C++ Team
@ 2000-04-07 4:00 ` Abraham Theodorus Stolk
2000-04-09 4:00 ` James Macnicol
1 sibling, 1 reply; 13+ messages in thread
From: Abraham Theodorus Stolk @ 2000-04-07 4:00 UTC (permalink / raw)
Abraham Theodorus Stolk wrote:
>
> Hello,
>
> Compaq has released the long awaited C++ compiler for linux/alpha.
> Fortunately, the provided rpm packages can be used succesfully with Debian.
*BLUSH*
Ever lasting shame for me.
I screwed up big time. I thought I was using compaq's c++ compiler,
but I wasn't (c++ still refered to g++ on my sys. Argh!)
So to rectify:
My claim of cxx succes on debian is false!
As a matter of fact, ccc compiles just fine, but when linking,
crt1.o is not found.
stolk@jerom:/tmp$ ccc -v l.cpp
comp.config contains: | -SysIncDir /usr/lib/compaq/ccc-6.2/alpha-linux/include
-SysIncDir /usr/local/include -SysIncDir /usr/alpha-redhat-linux/include
-SysIncDir /usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.90.29/include
-L/usr/lib/compaq/ccc-6.2/alpha-linux/lib -L/usr/local/lib
-L/usr/alpha-redhat-linux/lib -L/usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.90.29
/usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/ld -O1 -m elf64alpha -G 8
-L/usr/lib/compaq/ccc-6.2/alpha-linux/lib -L/usr/local/lib
-L/usr/alpha-redhat-linux/lib -L/usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.90.29
-dynamic-linker /lib/ld-linux.so.2
/usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crt1.o
/usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crti.o
/usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crtbegin.o l.cpp -lgcc -lc -lgcc
-lots /usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crtend.o
/usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crtn.o
/usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/ld: cannot open
/usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crt1.o: No such file or
directory
And cxx has problems finding stdlib.h.
Bram
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Bram Stolk "Linux - Why use windows, if there is a door?"
work: bram@sara.nl
priv: bram.s@chello.nl
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-07 4:00 ` Abraham Theodorus Stolk
@ 2000-04-09 4:00 ` James Macnicol
2000-04-09 4:00 ` Abraham Theodorus Stolk
0 siblings, 1 reply; 13+ messages in thread
From: James Macnicol @ 2000-04-09 4:00 UTC (permalink / raw)
Abraham Theodorus Stolk <bram.s@chello.nl> wrote:
> And cxx has problems finding stdlib.h.
I have found that the Compaq C++ compiler *does* work on
Debian 2.2 (potato). What you have to do is to update the config
files for the compilers (both C and C++) with the scripts provided,
called create-comp-config.sh which are in
/usr/lib/compaq/{cxx-6.3.6.9,ccc-6.2.9.002-2}/alpha-linux/bin. Once
you get that done you're set. Note that you will definitely need the
Compaq binutils to link, even the latest binutils from Debian won't
work (the linker falls over).
I'm finding that porting to the new compiler will be a lot of
work: lots of extra "std::" qualifiers to add (I'm using -std
strict_ansi since using -std gnu breaks the qualified names I'm
already using [error message is 'namespace "std" has no member
"blah"']. It also seems very picky about pointers to functions as
arguments to constructors etc. It should be great when I get it all
to work, though. My previous experiments with the C compiler on
RedHat/Alpha showed that gcc generate lousy, slow code in comparison.
--
James Macnicol
j-macnicol@adfa.edu.au
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-09 4:00 ` James Macnicol
@ 2000-04-09 4:00 ` Abraham Theodorus Stolk
2000-04-10 4:00 ` James Macnicol
0 siblings, 1 reply; 13+ messages in thread
From: Abraham Theodorus Stolk @ 2000-04-09 4:00 UTC (permalink / raw)
James Macnicol wrote:
> called create-comp-config.sh which are in
> /usr/lib/compaq/{cxx-6.3.6.9,ccc-6.2.9.002-2}/alpha-linux/bin. Once
> you get that done you're set. Note that you will definitely need the
> Compaq binutils to link, even the latest binutils from Debian won't
> work (the linker falls over).
>
Indeed.
Ken Block helped me a lot, so I can now compile.
linking still fails, so I will try your suggestion to
install compaq's binutils.
> I'm finding that porting to the new compiler will be a lot of
> work: lots of extra "std::" qualifiers to add (I'm using -std
> strict_ansi since using -std gnu breaks the qualified names I'm
> already using [error message is 'namespace "std" has no member
> "blah"']. It also seems very picky about pointers to functions as
> arguments to constructors etc. It should be great when I get it all
> to work, though. My previous experiments with the C compiler on
> RedHat/Alpha showed that gcc generate lousy, slow code in comparison.
I wonder: did you try STL templates?
It looks like the following templates are missing:
multiset
multimap
hash_set
hash_multise
hash_map
hash_multimap
using gcc's templates from /usr/include/g++-3 does not work.
> --
> James Macnicol
> j-macnicol@adfa.edu.au
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Bram Stolk "Linux - Why use windows, if there is a door?"
work: bram@sara.nl
priv: bram.s@chello.nl
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq's c++ succesfully runs under Debian woody
2000-04-09 4:00 ` Abraham Theodorus Stolk
@ 2000-04-10 4:00 ` James Macnicol
2000-04-10 4:00 ` Compaq c++ compiler and debian's binutils Bram Stolk
0 siblings, 1 reply; 13+ messages in thread
From: James Macnicol @ 2000-04-10 4:00 UTC (permalink / raw)
Abraham Theodorus Stolk <bram.s@chello.nl> wrote:
>> called create-comp-config.sh which are in
>> /usr/lib/compaq/{cxx-6.3.6.9,ccc-6.2.9.002-2}/alpha-linux/bin. Once
>> you get that done you're set. Note that you will definitely need the
>> Compaq binutils to link, even the latest binutils from Debian won't
>> work (the linker falls over).
>>
> Indeed.
> Ken Block helped me a lot, so I can now compile.
> linking still fails, so I will try your suggestion to
> install compaq's binutils.
Yep. However this seems to have nasty side-effects on the Debian
packaging system since if you have the Compaq binutils (which is
2.9.1.something) then the gcc package (which requires 2.9.5.something)
has an unsatisfied dependency which stuffs things up if you try to
install extra software on your machine. Of course you don't
necessarily want the extra C compiler but you do need the headers from
that package and you can't compile the kernel with ccc. I'm not too
experienced with the Debian package management stuff so if someone can
show me how to make this work I'd be grateful.
> I wonder: did you try STL templates?
> It looks like the following templates are missing:
> multiset
> multimap
> hash_set
> hash_multise
> hash_map
> hash_multimap
I can't say I've tried any of these. My code (which I haven't had
time to try to compile fully yet) only uses std::string and std::vector.
> using gcc's templates from /usr/include/g++-3 does not work.
Hmm, this is interesting in itself. Isn't the STL code more-or-less
portable (it comes from the SGI STL after all) ?
--
James Macnicol
j-macnicol@adfa.edu.au
^ permalink raw reply [flat|nested] 13+ messages in thread
* Compaq c++ compiler and debian's binutils
2000-04-10 4:00 ` James Macnicol
@ 2000-04-10 4:00 ` Bram Stolk
2000-04-10 4:00 ` Goswin Brederlow
0 siblings, 1 reply; 13+ messages in thread
From: Bram Stolk @ 2000-04-10 4:00 UTC (permalink / raw)
James Macnicol wrote:
>
> > linking still fails, so I will try your suggestion to
> > install compaq's binutils.
>
> Yep. However this seems to have nasty side-effects on the Debian
> packaging system since if you have the Compaq binutils (which is
> 2.9.1.something) then the gcc package (which requires 2.9.5.something)
> has an unsatisfied dependency which stuffs things up if you try to
> install extra software on your machine. Of course you don't
> necessarily want the extra C compiler but you do need the headers from
> that package and you can't compile the kernel with ccc. I'm not too
> experienced with the Debian package management stuff so if someone can
> show me how to make this work I'd be grateful.
I've made a bug-report to debian about binutils/ld on dec-alpha.
For now, I reinstall debian's binutils, every time I install new
packages on my system.
When I am done upgrading, I "downgrade" binutils again to
compaq/redhat's version.
By the way: I always thought g++ was slow. (not the code it produces,
but the compiler itself).
However, cxx is a lot slower, even without optimization turned on!
> > I wonder: did you try STL templates?
> > It looks like the following templates are missing:
> > multiset
> > multimap
> > hash_set
> > hash_multise
> > hash_map
> > hash_multimap
>
> I can't say I've tried any of these. My code (which I haven't had
> time to try to compile fully yet) only uses std::string and std::vector.
>
> > using gcc's templates from /usr/include/g++-3 does not work.
>
> Hmm, this is interesting in itself. Isn't the STL code more-or-less
> portable (it comes from the SGI STL after all) ?
it looks like it's not fully portable.
Most compilers ship their own version, and compaq's version has quite
a few custom #ifdefs in it.
For the time being, I've replaced my std::hash_map's with std::map's.
Bram
>
> --
> James Macnicol
> j-macnicol@adfa.edu.au
--
------------------------------------------------------------------------------
Bram Stolk, VR Specialist.
SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
email: bram@sara.nl Phone +31-20-5923059 Fax +31-20-6683167
"I heard if you play the NT-4.0-CD backwards, you get a satanic message."
"Thats nothing, if you play it forward, it installs NT-4.0"
------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Compaq c++ compiler and debian's binutils
2000-04-10 4:00 ` Compaq c++ compiler and debian's binutils Bram Stolk
@ 2000-04-10 4:00 ` Goswin Brederlow
0 siblings, 0 replies; 13+ messages in thread
From: Goswin Brederlow @ 2000-04-10 4:00 UTC (permalink / raw)
Bram Stolk <bram@sara.nl> writes:
> By the way: I always thought g++ was slow. (not the code it produces,
> but the compiler itself).
> However, cxx is a lot slower, even without optimization turned on!
Extra checkings and error/waring messages take time. :)
>
> > > I wonder: did you try STL templates?
> > > It looks like the following templates are missing:
> > > multiset
> > > multimap
> > > hash_set
> > > hash_multise
> > > hash_map
> > > hash_multimap
bitfields are broken (at least at compacs own testdrive system)
...
> it looks like it's not fully portable.
> Most compilers ship their own version, and compaq's version has quite
> a few custom #ifdefs in it.
>
> For the time being, I've replaced my std::hash_map's with std::map's.
May the Source be with you.
Goswin
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2000-04-10 4:00 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-01 5:00 Compaq's c++ succesfully runs under Debian woody Abraham Theodorus Stolk
2000-04-03 4:00 ` Compaq C/C++ Team
2000-04-04 4:00 ` Greg Lindahl
2000-04-04 4:00 ` Bram Stolk
2000-04-04 4:00 ` Alex Rhomberg
2000-04-04 4:00 ` Compaq C/C++ Team
2000-04-04 4:00 ` Bram Stolk
2000-04-07 4:00 ` Abraham Theodorus Stolk
2000-04-09 4:00 ` James Macnicol
2000-04-09 4:00 ` Abraham Theodorus Stolk
2000-04-10 4:00 ` James Macnicol
2000-04-10 4:00 ` Compaq c++ compiler and debian's binutils Bram Stolk
2000-04-10 4:00 ` Goswin Brederlow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox